mesa/src
Ahmed Hesham e77c984cef
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
rusticl: fix flag validation when creating an image
From the OpenCL specification:
    `CL_MEM_KERNEL_READ_AND_WRITE`: This flag is only used by
    clGetSupportedImageFormats to query image formats that may be both
    read from and written to by the same kernel instance. To create a
    memory object that may be read from and written to use
    CL_MEM_READ_WRITE.

If an application follows the instructions above, i.e. query a list of
supported image formats, using `CL_MEM_KERNEL_READ_AND_WRITE` as
input, and then attempts to create an image using one of the supported
image formats, by calling `clCreateImage` and passing
`CL_MEM_READ_WRITE`, the call to the image creation entry point should
succeed. This instead fails on Mali devices with the error
`CL_IMAGE_FORMAT_NOT_SUPPORTED`.

Rusticl fails when validating the image format against its supported
flags. Formats that support `PIPE_BIND_SHADER_IMAGE` have their
supported flags set as `CL_MEM_WRITE_ONLY` and
`CL_MEM_KERNEL_READ_AND_WRITE`.

This changes the supported CL flags to be `CL_MEM_WRITE_ONLY` for
`PIPE_BIND_SHADER_IMAGE` and `CL_MEM_READ_WRTE |
CL_MEM_KERNEL_READ_AND_WRITE` for `PIPE_BIND_SAMPLER_VIEW |
PIPE_BIND_SHADER_IMAGE`.

Fixes: 3386e142 (rusticl: support read_write images)

Fixes OpenCL-CTS test: `test_image_streams` on Mali. Invocation:
```
test_image_streams write 1D CL_RGB CL_SIGNED_INT8
```

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39692>
2026-04-01 20:15:06 +00:00
..
amd ac/vcn_dec: add addr_mode for VCN 5.0.1 2026-04-01 10:32:20 -04:00
android_stub android_stub: fix missing prototypes issues 2025-12-02 20:03:02 +00:00
asahi nir,treewide: add nir_image_intrinsic_type 2026-03-31 09:10:27 +00:00
broadcom v3dv/ci: add link to failing CTS test 2026-04-01 09:27:22 +00:00
c11
compiler nir/lower_io: add index support for load_param_intel 2026-04-01 12:56:43 +00:00
drm-shim drm-shim: handle DRM_CAP_ADDFB2_MODIFIERS 2025-11-24 12:34:08 +00:00
egl meson: Add support for buidling zink + Turnip/KGSL 2026-03-31 15:00:29 +00:00
etnaviv etnaviv/ml: Skip all synthetic tests as we now have several real models 2026-03-23 12:57:09 +00:00
freedreno ci: add api@clgetmemobjectinfo to fails 2026-03-31 17:39:47 +00:00
gallium rusticl: fix flag validation when creating an image 2026-04-01 20:15:06 +00:00
gbm gbm: Make documentation for gbm_bo_map more explicit 2025-12-29 10:05:38 +00:00
getopt
gfxstream gfxstream: Fix vkSetDebugUtilsObjectNameEXT crash for unwrapped objects 2026-03-30 17:47:45 +00:00
glx meson: Add support for buidling zink + Turnip/KGSL 2026-03-31 15:00:29 +00:00
gtest
imagination pvr: fix dirty tracking for stencil ops 2026-03-28 19:39:01 +08:00
imgui
intel ci: add api@clgetmemobjectinfo to fails 2026-03-31 17:39:47 +00:00
kosmickrisp kk: Implement VK_KHR_draw_indirect_count as HK does 2026-03-31 11:42:22 +00:00
loader kmsro: wire Zink up as a fallback 2026-03-13 18:54:26 +00:00
mesa treewide: Enable lowering of primitive ID in a bunch of Vulkan drivers 2026-03-25 03:11:56 +00:00
microsoft nir,treewide: add nir_image_intrinsic_type 2026-03-31 09:10:27 +00:00
nouveau nir,treewide: add nir_image_intrinsic_type 2026-03-31 09:10:27 +00:00
panfrost pan/compiler: Split bifrost_nir.c from bifrost_compile.c 2026-04-01 18:14:32 +00:00
poly panvk/csf: implement VK_EXT_primitives_generated_query primitive restart 2026-01-21 09:03:34 +00:00
tool intel: Include available counter descriptions in the perfetto counter spec 2026-03-06 08:47:16 +00:00
util util: Add more libdrm stubs 2026-03-31 15:00:29 +00:00
virtio ci/venus: Skip crashing Android CTS test on ANV 2026-03-25 07:51:08 +00:00
vulkan vulkan: fix determining the heap ptr 2026-04-01 12:56:43 +00:00
x11 meson: Add support for buidling zink + Turnip/KGSL 2026-03-31 15:00:29 +00:00
.clang-format
meson.build gallium/dril: Don't use gbm if there is no gbm configured 2026-02-17 08:24:02 +00:00