From 87280d56a375fcfc9231e72963439f9a370c408a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bla=C5=BE=20Toma=C5=BEi=C4=8D?= Date: Thu, 23 Aug 2012 12:15:15 +0200 Subject: [PATCH] clover: Accept CL_MEM_READ_WRITE flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix API functions for memory objects to accept CL_MEM_READ_WRITE flag. Signed-off-by: Blaž Tomažič [ Francisco Jerez: Drop incorrect change in clCreateSubBuffer. ] --- src/gallium/state_trackers/clover/api/memory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/memory.cpp b/src/gallium/state_trackers/clover/api/memory.cpp index 1b1ae73796f..b57ce1d388c 100644 --- a/src/gallium/state_trackers/clover/api/memory.cpp +++ b/src/gallium/state_trackers/clover/api/memory.cpp @@ -39,7 +39,7 @@ clCreateBuffer(cl_context ctx, cl_mem_flags flags, size_t size, if (!size) throw error(CL_INVALID_BUFFER_SIZE); - if (flags & ~(CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | + if (flags & ~(CL_MEM_READ_WRITE | CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR | CL_MEM_COPY_HOST_PTR)) throw error(CL_INVALID_VALUE); @@ -98,7 +98,7 @@ clCreateImage2D(cl_context ctx, cl_mem_flags flags, if (!ctx) throw error(CL_INVALID_CONTEXT); - if (flags & ~(CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | + if (flags & ~(CL_MEM_READ_WRITE | CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR | CL_MEM_COPY_HOST_PTR)) throw error(CL_INVALID_VALUE); @@ -134,7 +134,7 @@ clCreateImage3D(cl_context ctx, cl_mem_flags flags, if (!ctx) throw error(CL_INVALID_CONTEXT); - if (flags & ~(CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | + if (flags & ~(CL_MEM_READ_WRITE | CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR | CL_MEM_COPY_HOST_PTR)) throw error(CL_INVALID_VALUE); @@ -168,7 +168,7 @@ clGetSupportedImageFormats(cl_context ctx, cl_mem_flags flags, if (!ctx) throw error(CL_INVALID_CONTEXT); - if (flags & ~(CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | + if (flags & ~(CL_MEM_READ_WRITE | CL_MEM_WRITE_ONLY | CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR | CL_MEM_COPY_HOST_PTR)) throw error(CL_INVALID_VALUE); -- 2.30.2