mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Create map for deviceBitfields per rootDeviceIndex
Pass rootDeviceIndex to getDeviceBitfieldForAllocation Related-To: NEO-4589 Change-Id: Ib325a8bf822351ba36b225d94d4173fd725e8766 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
e28f937683
commit
214342f405
@@ -255,7 +255,7 @@ Buffer *Buffer::create(Context *context,
|
||||
if (!memory) {
|
||||
AllocationProperties allocProperties = MemoryPropertiesHelper::getAllocationProperties(rootDeviceIndex, memoryProperties,
|
||||
allocateMemory, size, allocationType, context->areMultiStorageAllocationsPreferred(),
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation());
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation(rootDeviceIndex));
|
||||
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties, hostPtr);
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ Buffer *Buffer::create(Context *context,
|
||||
AllocationProperties allocProperties = MemoryPropertiesHelper::getAllocationProperties(rootDeviceIndex, memoryProperties,
|
||||
true, // allocateMemory
|
||||
size, allocationType, context->areMultiStorageAllocationsPreferred(),
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation());
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation(rootDeviceIndex));
|
||||
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ Buffer *Buffer::create(Context *context,
|
||||
false, // allocateMemory
|
||||
size, GraphicsAllocation::AllocationType::MAP_ALLOCATION,
|
||||
false, // isMultiStorageAllocation
|
||||
context->getDeviceBitfieldForAllocation()};
|
||||
context->getDeviceBitfieldForAllocation(rootDeviceIndex)};
|
||||
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = true;
|
||||
mapAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, hostPtr);
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ Image *Image::create(Context *context,
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationPropertiesWithImageInfo(rootDeviceIndex, imgInfo,
|
||||
false, // allocateMemory
|
||||
memoryProperties, context->getDevice(0)->getHardwareInfo(),
|
||||
context->getDeviceBitfieldForAllocation());
|
||||
context->getDeviceBitfieldForAllocation(rootDeviceIndex));
|
||||
|
||||
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties, hostPtr);
|
||||
|
||||
@@ -293,7 +293,7 @@ Image *Image::create(Context *context,
|
||||
false, // allocateMemory
|
||||
imgInfo.size, GraphicsAllocation::AllocationType::SHARED_CONTEXT_IMAGE,
|
||||
false, // isMultiStorageAllocation
|
||||
context->getDeviceBitfieldForAllocation()},
|
||||
context->getDeviceBitfieldForAllocation(rootDeviceIndex)},
|
||||
hostPtr);
|
||||
memory->setDefaultGmm(gmm);
|
||||
zeroCopy = true;
|
||||
@@ -303,7 +303,7 @@ Image *Image::create(Context *context,
|
||||
false, // allocateMemory
|
||||
hostPtrMinSize, GraphicsAllocation::AllocationType::MAP_ALLOCATION,
|
||||
false, // isMultiStorageAllocation
|
||||
context->getDeviceBitfieldForAllocation()};
|
||||
context->getDeviceBitfieldForAllocation(rootDeviceIndex)};
|
||||
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = true;
|
||||
mapAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, hostPtr);
|
||||
}
|
||||
@@ -311,7 +311,7 @@ Image *Image::create(Context *context,
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationPropertiesWithImageInfo(rootDeviceIndex, imgInfo,
|
||||
true, // allocateMemory
|
||||
memoryProperties, context->getDevice(0)->getHardwareInfo(),
|
||||
context->getDeviceBitfieldForAllocation());
|
||||
context->getDeviceBitfieldForAllocation(rootDeviceIndex));
|
||||
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
|
||||
|
||||
if (memory && MemoryPool::isSystemMemoryPool(memory->getMemoryPool())) {
|
||||
|
||||
@@ -371,7 +371,7 @@ void *MemObj::getBasePtrForMap(uint32_t rootDeviceIndex) {
|
||||
false, // allocateMemory
|
||||
getSize(), GraphicsAllocation::AllocationType::MAP_ALLOCATION,
|
||||
false, //isMultiStorageAllocation
|
||||
context->getDeviceBitfieldForAllocation()};
|
||||
context->getDeviceBitfieldForAllocation(rootDeviceIndex)};
|
||||
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, memory);
|
||||
setMapAllocation(allocation);
|
||||
|
||||
@@ -64,7 +64,7 @@ Pipe *Pipe::create(Context *context,
|
||||
true, // allocateMemory
|
||||
size, GraphicsAllocation::AllocationType::PIPE,
|
||||
false, // isMultiStorageAllocation
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation());
|
||||
context->getDevice(0)->getHardwareInfo(), context->getDeviceBitfieldForAllocation(rootDeviceIndex));
|
||||
GraphicsAllocation *memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
|
||||
if (!memory) {
|
||||
errcodeRet = CL_OUT_OF_HOST_MEMORY;
|
||||
|
||||
Reference in New Issue
Block a user