[Mesa-dev] [PATCH 1/5] clover/memory: Copy data when creating buffers with CL_MEM_USE_HOST_PTR

Aaron Watry awatry at gmail.com
Sat Jul 22 04:19:47 UTC 2017


Fixes: OpenCL CTS test/conformance/buffers/buffer_copy

Signed-off-by: Aaron Watry <awatry at gmail.com>
CC: Francisco Jerez <currojerez at riseup.net>
---
 src/gallium/state_trackers/clover/core/memory.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/clover/core/memory.cpp b/src/gallium/state_trackers/clover/core/memory.cpp
index b852e6896f..912d74830a 100644
--- a/src/gallium/state_trackers/clover/core/memory.cpp
+++ b/src/gallium/state_trackers/clover/core/memory.cpp
@@ -30,7 +30,7 @@ memory_obj::memory_obj(clover::context &ctx, cl_mem_flags flags,
                        size_t size, void *host_ptr) :
    context(ctx), _flags(flags),
    _size(size), _host_ptr(host_ptr) {
-   if (flags & CL_MEM_COPY_HOST_PTR)
+   if (flags & (CL_MEM_COPY_HOST_PTR | CL_MEM_USE_HOST_PTR))
       data.append((char *)host_ptr, size);
 }
 
-- 
2.11.0



More information about the mesa-dev mailing list