Files
compute-runtime/opencl/source/memory_manager/compression_selector_ocl.cpp
Mateusz Jablonski b182917d9d refactor: correct naming of allocation types
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-11 16:23:37 +01:00

28 lines
779 B
C++

/*
* Copyright (C) 2020-2023 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/product_helper.h"
namespace NEO {
bool CompressionSelector::preferCompressedAllocation(const AllocationProperties &properties) {
switch (properties.allocationType) {
case AllocationType::globalSurface:
case AllocationType::constantSurface:
case AllocationType::svmGpu:
case AllocationType::printfSurface: {
return CompressionSelector::allowStatelessCompression();
}
default:
return false;
}
}
} // namespace NEO