Files
compute-runtime/opencl/source/memory_manager/compression_selector_ocl.cpp
Kamil Kopryk 232b886056 Rename HwInfoConfig to ProductHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-14 14:39:52 +01:00

29 lines
899 B
C++

/*
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/memory_manager/allocation_properties.h"
#include "shared/source/memory_manager/compression_selector.h"
#include "shared/source/memory_manager/graphics_allocation.h"
#include "shared/source/os_interface/hw_info_config.h"
namespace NEO {
bool CompressionSelector::preferCompressedAllocation(const AllocationProperties &properties, const HardwareInfo &hwInfo) {
switch (properties.allocationType) {
case AllocationType::GLOBAL_SURFACE:
case AllocationType::CONSTANT_SURFACE:
case AllocationType::SVM_GPU:
case AllocationType::PRINTF_SURFACE: {
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
return productHelper.allowStatelessCompression(hwInfo);
}
default:
return false;
}
}
} // namespace NEO