Service read only memory passed as host_ptr

- read only memory cannot be used for allocation,
Oses cannot create graphics alocation for such memory
- if memory allocation fails for host_ptr passed
to enqueueWrite calls, then try doing new allocation
and copy host_ptr on cpu

Change-Id: I415a4673ae1319ea8f77e53bd8fba7489fe85218
This commit is contained in:
Hoppe, Mateusz
2018-02-28 12:09:48 +01:00
parent d62bd0b687
commit a1a20a3b34
33 changed files with 774 additions and 163 deletions

View File

@@ -99,8 +99,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBuffer(
void *srcPtr = const_cast<void *>(ptr);
HostPtrSurface hostPtrSurf(srcPtr, size, true);
MemObjSurface bufferSurf(buffer);
HostPtrSurface hostPtrSurf(srcPtr, size);
Surface *surfaces[] = {&bufferSurf, &hostPtrSurf};
if (size != 0) {