mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Create storage info in one place
Related-To: NEO-2860 Change-Id: Ic37b89f2a80267b499227a8311aabd1fc6fb2754 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
@@ -48,14 +48,12 @@ Pipe *Pipe::create(Context *context,
|
||||
MemoryManager *memoryManager = context->getMemoryManager();
|
||||
DEBUG_BREAK_IF(!memoryManager);
|
||||
|
||||
MemoryProperties memoryProperties;
|
||||
memoryProperties.flags = flags;
|
||||
MemoryProperties memoryProperties{flags};
|
||||
while (true) {
|
||||
auto size = static_cast<size_t>(packetSize * (maxPackets + 1) + intelPipeHeaderReservedSpace);
|
||||
AllocationProperties allocProperties =
|
||||
MemObjHelper::getAllocationProperties(memoryProperties, true, size, GraphicsAllocation::AllocationType::PIPE);
|
||||
StorageInfo storageInfo = MemObjHelper::getStorageInfo(memoryProperties);
|
||||
GraphicsAllocation *memory = memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, storageInfo, nullptr);
|
||||
GraphicsAllocation *memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
|
||||
if (!memory) {
|
||||
errcodeRet = CL_OUT_OF_HOST_MEMORY;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user