mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Merge MemoryPropertiesFlags files
Move mem_properties_parser_helper files to memory_properties_flags_helpers Rename MemoryPropertiesParser to MemoryPropertiesHelper Related-To: NEO-4143 Change-Id: Ib35360bceff90be2383696083226f8be1e47538c Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
fd65d45744
commit
cb8e9656ee
@@ -13,7 +13,7 @@
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/helpers/get_info_status_mapper.h"
|
||||
#include "opencl/source/helpers/memory_properties_flags_helpers.h"
|
||||
#include "opencl/source/helpers/memory_properties_helpers.h"
|
||||
#include "opencl/source/mem_obj/mem_obj_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
@@ -27,7 +27,7 @@ Pipe::Pipe(Context *context,
|
||||
GraphicsAllocation *gfxAllocation)
|
||||
: MemObj(context,
|
||||
CL_MEM_OBJECT_PIPE,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
MemoryPropertiesHelper::createMemoryProperties(flags, 0, 0),
|
||||
flags,
|
||||
0,
|
||||
static_cast<size_t>(packetSize * (maxPackets + 1) + intelPipeHeaderReservedSpace),
|
||||
@@ -54,16 +54,16 @@ Pipe *Pipe::create(Context *context,
|
||||
MemoryManager *memoryManager = context->getMemoryManager();
|
||||
DEBUG_BREAK_IF(!memoryManager);
|
||||
|
||||
MemoryProperties memoryProperties = MemoryPropertiesParser::createMemoryProperties(flags, 0, 0);
|
||||
MemoryProperties memoryProperties = MemoryPropertiesHelper::createMemoryProperties(flags, 0, 0);
|
||||
while (true) {
|
||||
auto size = static_cast<size_t>(packetSize * (maxPackets + 1) + intelPipeHeaderReservedSpace);
|
||||
auto rootDeviceIndex = context->getDevice(0)->getRootDeviceIndex();
|
||||
AllocationProperties allocProperties =
|
||||
MemoryPropertiesParserHelper::getAllocationProperties(rootDeviceIndex, memoryProperties,
|
||||
true, // allocateMemory
|
||||
size, GraphicsAllocation::AllocationType::PIPE,
|
||||
false, // isMultiStorageAllocation
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation());
|
||||
MemoryPropertiesHelper::getAllocationProperties(rootDeviceIndex, memoryProperties,
|
||||
true, // allocateMemory
|
||||
size, GraphicsAllocation::AllocationType::PIPE,
|
||||
false, // isMultiStorageAllocation
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation());
|
||||
GraphicsAllocation *memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
|
||||
if (!memory) {
|
||||
errcodeRet = CL_OUT_OF_HOST_MEMORY;
|
||||
|
||||
Reference in New Issue
Block a user