mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Remove redundant/recursive checks in unmap operations
- Some of the paths were made only for ULTs - Params like mappedPtr were ignored - Improve confusing method names - Fix for memory leak in map shared buffer path (not tested code) Change-Id: I8a69035f1d1c340f2d131a6f8d7e13116e3ddabc
This commit is contained in:
@@ -45,7 +45,7 @@ void *CommandQueueHw<GfxFamily>::enqueueMapSharedBuffer(Buffer *buffer, cl_bool
|
||||
auto memoryManager = device->getMemoryManager();
|
||||
if (!buffer->getMappedPtr()) {
|
||||
auto memory = memoryManager->allocateSystemMemory(buffer->getGraphicsAllocation()->getUnderlyingBufferSize(), 0);
|
||||
buffer->setMappedPtr(memory);
|
||||
buffer->setAllocatedMappedPtr(memory);
|
||||
}
|
||||
|
||||
auto returnPtr = ptrOffset(buffer->getMappedPtr(), offset);
|
||||
@@ -59,4 +59,4 @@ void *CommandQueueHw<GfxFamily>::enqueueMapSharedBuffer(Buffer *buffer, cl_bool
|
||||
buffer->setMappedOffset(offset);
|
||||
return returnPtr;
|
||||
}
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user