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

@@ -9,6 +9,7 @@
#include "runtime/context/context.h"
#include "runtime/helpers/get_info.h"
#include "runtime/helpers/memory_properties_flags_helpers.h"
#include "runtime/mem_obj/mem_obj_helper.h"
#include "runtime/memory_manager/memory_manager.h"
@@ -49,10 +50,11 @@ Pipe *Pipe::create(Context *context,
DEBUG_BREAK_IF(!memoryManager);
MemoryProperties memoryProperties{flags};
MemoryPropertiesFlags memoryPropertiesFlags = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(memoryProperties);
while (true) {
auto size = static_cast<size_t>(packetSize * (maxPackets + 1) + intelPipeHeaderReservedSpace);
AllocationProperties allocProperties =
MemoryPropertiesParser::getAllocationProperties(memoryProperties, true, size, GraphicsAllocation::AllocationType::PIPE, false);
MemoryPropertiesParser::getAllocationProperties(memoryPropertiesFlags, true, size, GraphicsAllocation::AllocationType::PIPE, false);
GraphicsAllocation *memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
if (!memory) {
errcodeRet = CL_OUT_OF_HOST_MEMORY;