mesa/main: tighten rg/half-float interaction

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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
This commit is contained in:
Erik Faye-Lund 2024-06-03 10:29:11 +02:00 committed by Marge Bot
parent 75645387b6
commit 53fb085ebd

View file

@ -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: