mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Correct logic in getBasePtrForMap
Add ULT to verify that all mapAllocations are destroyed Related-To: NEO-4672 Change-Id: If7d00cc9101c15bedf7ecf14a24ca9893f3f7c51 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
ef833ed334
commit
eca0ef41a1
@@ -353,8 +353,11 @@ void *MemObj::getBasePtrForMap(uint32_t rootDeviceIndex) {
|
||||
if (getMapAllocation(rootDeviceIndex)) {
|
||||
return getMapAllocation(rootDeviceIndex)->getUnderlyingBuffer();
|
||||
} else {
|
||||
auto memory = memoryManager->allocateSystemMemory(getSize(), MemoryConstants::pageSize);
|
||||
setAllocatedMapPtr(memory);
|
||||
auto memory = getAllocatedMapPtr();
|
||||
if (!memory) {
|
||||
memory = memoryManager->allocateSystemMemory(getSize(), MemoryConstants::pageSize);
|
||||
setAllocatedMapPtr(memory);
|
||||
}
|
||||
AllocationProperties properties{rootDeviceIndex,
|
||||
false, // allocateMemory
|
||||
getSize(), GraphicsAllocation::AllocationType::MAP_ALLOCATION,
|
||||
|
||||
Reference in New Issue
Block a user