mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Pass device bitfield to allocation properties when creating mem obj
Related-To: NEO-4484 Change-Id: I961e9122591dc7293e37d5c1ca58cbcd649ee653 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
8f0380a00b
commit
0c404bc880
@@ -407,7 +407,7 @@ bool CommandStreamReceiver::createGlobalFenceAllocation() {
|
||||
|
||||
bool CommandStreamReceiver::createPreemptionAllocation() {
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
AllocationProperties properties{rootDeviceIndex, true, hwInfo->capabilityTable.requiredPreemptionSurfaceSize, GraphicsAllocation::AllocationType::PREEMPTION, false};
|
||||
AllocationProperties properties{rootDeviceIndex, hwInfo->capabilityTable.requiredPreemptionSurfaceSize, GraphicsAllocation::AllocationType::PREEMPTION};
|
||||
properties.flags.uncacheable = hwInfo->workaroundTable.waCSRUncachable;
|
||||
properties.alignment = 256 * MemoryConstants::kiloByte;
|
||||
this->preemptionAllocation = getMemoryManager()->allocateGraphicsMemoryWithProperties(properties);
|
||||
@@ -422,7 +422,11 @@ AllocationsList &CommandStreamReceiver::getAllocationsForReuse() { return intern
|
||||
|
||||
bool CommandStreamReceiver::createAllocationForHostSurface(HostPtrSurface &surface, bool requiresL3Flush) {
|
||||
auto memoryManager = getMemoryManager();
|
||||
AllocationProperties properties{rootDeviceIndex, false, surface.getSurfaceSize(), GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR, false};
|
||||
AllocationProperties properties{rootDeviceIndex,
|
||||
false, // allocateMemory
|
||||
surface.getSurfaceSize(), GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR,
|
||||
false, // isMultiStorageAllocation
|
||||
osContext->getDeviceBitfield()};
|
||||
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = requiresL3Flush;
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, surface.getMemoryPointer());
|
||||
if (allocation == nullptr && surface.peekIsPtrCopyAllowed()) {
|
||||
|
||||
Reference in New Issue
Block a user