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:
Dunajski, Bartosz
2018-02-01 13:40:30 +01:00
parent ac3c032af0
commit 844f956244
18 changed files with 163 additions and 111 deletions

View File

@ -2470,13 +2470,10 @@ cl_int CL_API_CALL clEnqueueUnmapMemObject(cl_command_queue commandQueue,
"event", event);
if (retVal == CL_SUCCESS) {
retVal = pMemObj->unmapObj(
pCommandQueue,
mappedPtr,
numEventsInWaitList,
eventWaitList,
event);
if (mappedPtr != pMemObj->getMappedPtr()) {
return CL_INVALID_VALUE;
}
retVal = pCommandQueue->enqueueUnmapMemObject(pMemObj, mappedPtr, numEventsInWaitList, eventWaitList, event);
if (retVal == CL_SUCCESS) {
pMemObj->decMapCount();