Map/unmap enqueue fixes [2/n]: CPU operations on limited range

- Curently each non-zerocopy CPU operation on map/unmap make a full copy
  using hostPtr
- This commit adds functionality to select specific range of copy
- Multiple mapping with different size is not supported yet,
  so copy will be made on full range for now. This is for future usage.

Change-Id: I7652e85482ba6fffb2474169447baf9b080dcd1e
This commit is contained in:
Dunajski, Bartosz
2018-02-08 20:55:31 +01:00
committed by sys_ocldev
parent ff44e9922d
commit 4f2a05ac88
18 changed files with 405 additions and 274 deletions

View File

@ -731,6 +731,10 @@ cl_mem CL_API_CALL clCreateImage(cl_context context,
break;
}
}
if ((flags & (CL_MEM_COPY_HOST_PTR | CL_MEM_USE_HOST_PTR)) && !hostPtr) {
retVal = CL_INVALID_HOST_PTR;
break;
}
image = Image::validateAndCreateImage(pContext, flags, imageFormat, imageDesc, hostPtr, retVal);
} while (false);