From fcf26c951bf5aa97e876b885be70196e2d415bdd Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 11 Dec 2023 17:29:26 +0100 Subject: [PATCH] mesa/main: clean up invalid pname-check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The logic is a bit easier to follow if we list the cases where this is supported, rather than the cases where it isn't. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/texparam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index d827f7e2957..8ba2c564be3 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -880,7 +880,8 @@ set_tex_parameterf(struct gl_context *ctx, * OpenGL ES 2.0+, it only exists in when GL_OES_texture_border_clamp is * enabled. It is never available in OpenGL ES 1.x. */ - if (_mesa_is_gles1(ctx)) + if (!_mesa_is_desktop_gl(ctx) && + !_mesa_has_OES_texture_border_clamp(ctx)) goto invalid_pname; if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))