Pass compression hints to memory properties

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-11-25 13:11:34 +00:00
committed by Compute-Runtime-Automation
parent fb376639ee
commit 6098290a0b
5 changed files with 64 additions and 7 deletions

View File

@@ -12,9 +12,6 @@
namespace NEO {
void ClMemoryPropertiesHelper::addExtraMemoryProperties(MemoryProperties &properties, cl_mem_flags flags, cl_mem_flags_intel flagsIntel) {
}
bool ClMemoryPropertiesHelper::parseMemoryProperties(const cl_mem_properties_intel *properties, MemoryProperties &memoryProperties,
cl_mem_flags &flags, cl_mem_flags_intel &flagsIntel,
cl_mem_alloc_flags_intel &allocflags, MemoryPropertiesHelper::ObjType objectType, Context &context) {

View File

@@ -16,7 +16,6 @@ class Context;
class ClMemoryPropertiesHelper {
public:
static void addExtraMemoryProperties(MemoryProperties &properties, cl_mem_flags flags, cl_mem_flags_intel flagsIntel);
static MemoryProperties createMemoryProperties(cl_mem_flags flags, cl_mem_flags_intel flagsIntel,
cl_mem_alloc_flags_intel allocflags, const Device *pDevice);

View File

@@ -85,9 +85,16 @@ MemoryProperties ClMemoryPropertiesHelper::createMemoryProperties(cl_mem_flags f
memoryProperties.flags.resource48Bit = true;
}
memoryProperties.pDevice = pDevice;
if (isValueSet(flags, CL_MEM_COMPRESSED_HINT_INTEL) ||
isValueSet(flagsIntel, CL_MEM_COMPRESSED_HINT_INTEL)) {
memoryProperties.flags.compressedHint = true;
}
if (isValueSet(flags, CL_MEM_UNCOMPRESSED_HINT_INTEL) ||
isValueSet(flagsIntel, CL_MEM_UNCOMPRESSED_HINT_INTEL)) {
memoryProperties.flags.uncompressedHint = true;
}
addExtraMemoryProperties(memoryProperties, flags, flagsIntel);
memoryProperties.pDevice = pDevice;
return memoryProperties;
}