Map/unmap enqueue fixes [5/n]: Unify offset calculation

Change-Id: I53eafe89532d43c5cf5139ed3fac0a87619dc7a3
This commit is contained in:
Dunajski, Bartosz
2018-02-21 15:25:46 +01:00
committed by sys_ocldev
parent 63732513bb
commit b4f79e036f
9 changed files with 56 additions and 48 deletions

View File

@ -2482,6 +2482,9 @@ cl_int CL_API_CALL clEnqueueUnmapMemObject(cl_command_queue commandQueue,
"event", event);
if (retVal == CL_SUCCESS) {
if (pMemObj->peekClMemObjType() == CL_MEM_OBJECT_PIPE) {
return CL_INVALID_MEM_OBJECT;
}
if (!mappedPtr || mappedPtr != pMemObj->getMappedPtr()) {
return CL_INVALID_VALUE;
}