From 53fb085ebd673c4644f452aeddd2427d529dea28 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 3 Jun 2024 10:29:11 +0200 Subject: [PATCH] mesa/main: tighten rg/half-float interaction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GL_HALF_FLOAT_OES-enum is about OES_texture_float, not e.g ARB_texture_float. EXT_texture_rg does have an interaction that allows this, but the other specs doesn't. So let's tighten this. In reality, this shouldn't change any real behavior, because we only support OES_texture_float in GLES contexts, and in those we'd support EXT_texture_rg if we support RG textures in the first place. But it makes the logic a bit clearer. And just to be clear, the non-GLES version of the half-float enum does not need the same check, because desktop GL supports all converions here, and GLES 3 and later also requires RG-texture support in the first place. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/glformats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index bf627406f8c..5386854803b 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1882,7 +1882,7 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, return GL_NO_ERROR; case GL_RG: case GL_RED: - if (_mesa_has_rg_textures(ctx)) + if (_mesa_has_EXT_texture_rg(ctx)) return GL_NO_ERROR; FALLTHROUGH; default: