Reuse graphics allocation from mapped buffers in OpenCL

Related-To: NEO-6352
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2021-10-18 15:07:01 +00:00
committed by Compute-Runtime-Automation
parent f164acad0b
commit f1b6b733f0
21 changed files with 376 additions and 54 deletions

View File

@@ -428,7 +428,8 @@ void *CommandQueue::enqueueReadMemObjForMap(TransferProperties &transferProperti
void *returnPtr = ptrOffset(basePtr, mapPtrOffset);
if (!transferProperties.memObj->addMappedPtr(returnPtr, transferProperties.memObj->calculateMappedPtrLength(transferProperties.size),
transferProperties.mapFlags, transferProperties.size, transferProperties.offset, transferProperties.mipLevel)) {
transferProperties.mapFlags, transferProperties.size, transferProperties.offset, transferProperties.mipLevel,
transferProperties.memObj->getMapAllocation(getDevice().getRootDeviceIndex()))) {
errcodeRet = CL_INVALID_OPERATION;
return nullptr;
}