From 25830434c2eab4a8a3999da741971395df89c315 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 11 Dec 2023 17:12:57 +0100 Subject: [PATCH] mesa/main: do not allow non-gles1 enums in gles1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These enums are not allowed in GLES1, but would be incorrectly accepted if running on hardware capable of the functionality even in GLES1. So let's use the helper that also considers the API, which should fix the problem. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/texparam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 790b02beb78..651f56d8f91 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -613,7 +613,7 @@ set_tex_parameteri(struct gl_context *ctx, goto invalid_pname; case GL_TEXTURE_SRGB_DECODE_EXT: - if (ctx->Extensions.EXT_texture_sRGB_decode) { + if (_mesa_has_EXT_texture_sRGB_decode(ctx)) { GLenum decode = params[0]; if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) @@ -630,7 +630,7 @@ set_tex_parameteri(struct gl_context *ctx, goto invalid_pname; case GL_TEXTURE_REDUCTION_MODE_EXT: - if (ctx->Extensions.EXT_texture_filter_minmax || + if (_mesa_has_EXT_texture_filter_minmax(ctx) || _mesa_has_ARB_texture_filter_minmax(ctx)) { GLenum mode = params[0];