From: Blaž Tomažič Date: Thu, 23 Aug 2012 10:15:15 +0000 (+0200) Subject: clover: Accept CL_MEM_READ_WRITE flag X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87280d56a375fcfc9231e72963439f9a370c408a;p=mesa.git clover: Accept CL_MEM_READ_WRITE flag 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. ] --- 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);