mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Compression selector to check for stateless compression
Related-To: NEO-5107 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8cc5decd60
commit
15f0642d60
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user