diff options
author | Blaž Tomažič <[email protected]> | 2012-08-23 12:15:15 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2012-08-24 17:10:14 +0200 |
commit | 87280d56a375fcfc9231e72963439f9a370c408a (patch) | |
tree | 3fa1c8fbc401000ac8cfa5b3511bebfdb9a622f5 /src/gallium/state_trackers | |
parent | 167ecf5ba358f750aecb07439ef5110e72895f25 (diff) |
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č <[email protected]>
[ Francisco Jerez: Drop incorrect change in clCreateSubBuffer. ]
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/clover/api/memory.cpp | 8 |
1 files 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); |