service read_only memory passed to CreateBuffer

- only when cl_mem_flags allows for read only memory
and USE_HOST_PTR is used

Change-Id: Id023f9cb551f7d81ec680de9cc546005980e6f75
This commit is contained in:
Hoppe, Mateusz
2018-03-05 15:52:35 +01:00
committed by sys_ocldev
parent 385fcdb7ca
commit 76dd4ac1f3
4 changed files with 170 additions and 1 deletions

View File

@@ -185,7 +185,7 @@ class MemoryManager {
return createGraphicsAllocationWithRequiredBitness(size, ptr, false);
}
GraphicsAllocation *createGraphicsAllocationWithRequiredBitness(size_t size, void *ptr, bool forcePin) {
MOCKABLE_VIRTUAL GraphicsAllocation *createGraphicsAllocationWithRequiredBitness(size_t size, void *ptr, bool forcePin) {
if (force32bitAllocations && is64bit) {
return allocate32BitGraphicsMemory(size, ptr, MemoryType::EXTERNAL_ALLOCATION);
} else {