diff --git a/opencl/source/memory_manager/CMakeLists.txt b/opencl/source/memory_manager/CMakeLists.txt index 5c0e0751ad..47255a3a6c 100644 --- a/opencl/source/memory_manager/CMakeLists.txt +++ b/opencl/source/memory_manager/CMakeLists.txt @@ -6,7 +6,7 @@ set(RUNTIME_SRCS_MEMORY_MANAGER ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/compression_selector_ocl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/compression_selector_ocl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cpu_page_fault_manager_memory_sync.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mem_obj_surface.h ${CMAKE_CURRENT_SOURCE_DIR}/migration_controller.cpp diff --git a/opencl/source/memory_manager/compression_selector_ocl.cpp b/opencl/source/memory_manager/compression_selector_ocl.cpp index a5099f27db..cd0dcaf309 100644 --- a/opencl/source/memory_manager/compression_selector_ocl.cpp +++ b/opencl/source/memory_manager/compression_selector_ocl.cpp @@ -5,11 +5,24 @@ * */ +#include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/compression_selector.h" namespace NEO { bool CompressionSelector::preferRenderCompressedBuffer(const AllocationProperties &properties, const HardwareInfo &hwInfo) { - return GraphicsAllocation::AllocationType::BUFFER_COMPRESSED == properties.allocationType; + switch (properties.allocationType) { + case GraphicsAllocation::AllocationType::BUFFER_COMPRESSED: + return true; + case GraphicsAllocation::AllocationType::GLOBAL_SURFACE: + case GraphicsAllocation::AllocationType::CONSTANT_SURFACE: + case GraphicsAllocation::AllocationType::SVM_GPU: + case GraphicsAllocation::AllocationType::PRINTF_SURFACE: { + auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); + return hwHelper.allowStatelessCompression(hwInfo); + } + default: + return false; + } } } // namespace NEO