diff options
author | Dave Airlie <airlied@redhat.com> | 2020-10-07 14:15:43 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-11-17 05:15:09 +1000 |
commit | 2dd3fde56d45836766d17fed6e95102ba48a4314 (patch) | |
tree | 5ab61a56ef75b85cec8addbef2ac7cbfe8bcd622 | |
parent | c5a33ed8c20724cd1be0451d4f3fd9f6da047b03 (diff) |
clover/image: handle MEM_KERNEL_READ_AND_WRITE flag.
fixes CTS 3.0 test_computeinfo
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7642>
-rw-r--r-- | src/gallium/frontends/clover/api/memory.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/frontends/clover/api/memory.cpp b/src/gallium/frontends/clover/api/memory.cpp index cfd0aa26d7f..89762d1b262 100644 --- a/src/gallium/frontends/clover/api/memory.cpp +++ b/src/gallium/frontends/clover/api/memory.cpp @@ -306,6 +306,19 @@ clGetSupportedImageFormats(cl_context d_ctx, cl_mem_flags flags, auto &ctx = obj(d_ctx); auto formats = supported_formats(ctx, type); + if (flags & CL_MEM_KERNEL_READ_AND_WRITE) { + if (r_count) + *r_count = 0; + return CL_SUCCESS; + } + + if (flags & (CL_MEM_WRITE_ONLY | CL_MEM_READ_WRITE) && + type == CL_MEM_OBJECT_IMAGE3D) { + if (r_count) + *r_count = 0; + return CL_SUCCESS; + } + validate_flags(NULL, flags, false); if (r_buf && !count) |