Remove OCL object from MemoryProperties 4/n

Wire in MemoryPropertiesFlags support to:
-getAllocationPropertiesWithImageInfo
-getAllocationProperties
-fillPoliciesInProperties

Related-To: NEO-3132
Change-Id: I70d7c2d2ebb4814f4d36518b9098a97c88b88f46
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2019-08-12 10:36:23 +02:00
committed by sys_ocldev
parent c2a0031a9b
commit ea47f9745d
11 changed files with 40 additions and 24 deletions

View File

@@ -253,7 +253,8 @@ Image *Image::create(Context *context,
if (isValueSet(properties.flags, CL_MEM_USE_HOST_PTR)) {
if (!context->isSharedContext) {
AllocationProperties allocProperties = MemObjHelper::getAllocationPropertiesWithImageInfo(imgInfo, false, properties);
MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
AllocationProperties allocProperties = MemObjHelper::getAllocationPropertiesWithImageInfo(imgInfo, false, memoryProperties);
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties, hostPtr);
@@ -277,7 +278,8 @@ Image *Image::create(Context *context,
mapAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, hostPtr);
}
} else {
AllocationProperties allocProperties = MemObjHelper::getAllocationPropertiesWithImageInfo(imgInfo, true, properties);
MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(properties);
AllocationProperties allocProperties = MemObjHelper::getAllocationPropertiesWithImageInfo(imgInfo, true, memoryProperties);
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
if (memory && MemoryPool::isSystemMemoryPool(memory->getMemoryPool())) {