Set GPU base address only if EXTERNAL allocation requested.

Change-Id: Ia3a4c195f368f2e0bdedcfbe8b32bb0dd3e88e1e
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
Mrozek, Michal
2019-08-09 12:26:28 +02:00
committed by sys_ocldev
parent 874ae355f7
commit 230c86b95e

View File

@ -317,7 +317,9 @@ MemoryAllocation *OsAgnosticMemoryManager::createMemoryAllocation(GraphicsAlloca
auto memoryAllocation = new MemoryAllocation(allocationType, driverAllocatedCpuPointer, pMem, limitedGpuAddress, memSize,
count, pool, multiOsContextCapable, uncacheable, flushL3Required);
memoryAllocation->setGpuBaseAddress(GmmHelper::canonize(gfxPartition->getHeapBase(heap)));
if (heap == HeapIndex::HEAP_EXTERNAL) {
memoryAllocation->setGpuBaseAddress(GmmHelper::canonize(gfxPartition->getHeapBase(heap)));
}
memoryAllocation->sizeToFree = alignedSize;
return memoryAllocation;