mesa/st: do not expose ARB_shader_image_load_store if not fully implemented
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Tue, 21 Dec 2021 16:02:12 +0000 (17:02 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 13 Jan 2022 09:12:35 +0000 (09:12 +0000)
commit3b81d2d30dab7eeac74236e9b04a014d0d9481d2
tree2e2151950f6b0ecaf2ca68ccc84aa7f5c0578265
parentd9bc018854a7219dce842d724b1169f84139e18d
mesa/st: do not expose ARB_shader_image_load_store if not fully implemented

So far we were checking ARB_shader_image_load_store is supported as
requirement to expose GLES 3.1.

But when this extension functionality was added in GLES 3.1 spec, it
was relaxed, and one of its requirements, the support for formatless
writing, was not included.

So this means that a driver that support all the extension
functionality except formatless writing, could expose GLES 3.1, but it
couldn't expose the extension itself (nor GL 4.2, which requires fully
implementation of the extension).

v2:
 - Add the same exposure treatment to ARB_shader_image_size (Ilia).

v3:
 - Remove dependency for OES_texture_buffer (Ilia).
 - Check image resources for GLES 3.1 (Ilia).

v4:
 - Check for MaxImageUniforms in compute shader (Ilia).
 - Check for max combined image uniforms/ssbo (Ilia).

v5:
 - Remove ARB_shader_image_load_store from check (Ilia).
 - ARB_shader_image_store and ARB_shader_image required for
   ARB_ES3_1_compatibility (Ilia).

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
src/compiler/glsl/linker.cpp
src/mesa/main/shaderimage.c
src/mesa/main/texparam.c
src/mesa/state_tracker/st_extensions.c