mesa: fix MAX_GEOMETRY_IMAGE_UNIFORMS check support

MAX_GEOMETRY_IMAGE_UNIFORMS are supported if geometry shaders and either
ARB_shader_image_load_store or GLES 3.1 are supported.

v2:
 - MAX_GEOMETRY_IMAGE_UNIFORMS shouldn't be supported for GL 3.2 if
   ARB_shader_image_load_store is not supported (Ilia).
 - MAX_TESS_{CONTROL,EVALUATION}_IMAGE_UNIFORMS requires tessellation
   shader support (Anholt).

v3:
 - Use _mesa_is_gles31() function (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>
This commit is contained in:
Juan A. Suarez Romero 2022-01-06 13:35:27 +01:00 committed by Marge Bot
parent 3b81d2d30d
commit bd70b4f27f

View File

@ -1487,8 +1487,9 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
break;
case EXTRA_EXT_SHADER_IMAGE_GS:
api_check = GL_TRUE;
if (ctx->Extensions.ARB_shader_image_load_store &&
_mesa_has_geometry_shaders(ctx))
if ((ctx->Extensions.ARB_shader_image_load_store ||
_mesa_is_gles31(ctx)) &&
_mesa_has_geometry_shaders(ctx))
api_found = GL_TRUE;
break;
case EXTRA_EXT_ATOMICS_TESS: