Disable compression when using hostPtr

Change-Id: Ifa066a3824f51b4ad5957de9fe8590853c620587
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2018-12-05 10:40:31 +01:00
committed by sys_ocldev
parent 6a1a28c687
commit bb7f8d9b88
2 changed files with 10 additions and 11 deletions

View File

@@ -143,9 +143,6 @@ Buffer *Buffer::create(Context *context,
if (allocationType == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) {
zeroCopyAllowed = false;
allocateMemory = true;
if (properties.flags & CL_MEM_USE_HOST_PTR) {
copyMemoryFromHostPtr = true;
}
}
if (allocationType == GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY) {
@@ -322,9 +319,11 @@ void Buffer::checkMemory(cl_mem_flags flags,
GraphicsAllocation::AllocationType Buffer::getGraphicsAllocationType(cl_mem_flags flags, bool sharedContext, bool renderCompressedBuffers) {
GraphicsAllocation::AllocationType type = GraphicsAllocation::AllocationType::BUFFER;
if (renderCompressedBuffers) {
if (flags & CL_MEM_USE_HOST_PTR) {
type = GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY;
} else if (renderCompressedBuffers) {
type = GraphicsAllocation::AllocationType::BUFFER_COMPRESSED;
} else if ((flags & CL_MEM_USE_HOST_PTR) || (flags & CL_MEM_ALLOC_HOST_PTR)) {
} else if (flags & CL_MEM_ALLOC_HOST_PTR) {
type = GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY;
}