teximage: allow glCopyTex{Sub}Image[123]D into R/RG textures with OpenGL ES 2.0

This is explicitly allowed in the GL_EXT_texture_rg extension.

Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28313>
This commit is contained in:
Matthew Waters
2024-03-21 17:53:49 +11:00
committed by Marge Bot
parent 63366781aa
commit cf8f894921

View File

@@ -2476,6 +2476,15 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
case GL_RGB10_A2:
break;
case GL_RED:
case GL_RG:
/* GL_EXT_texture_rg adds support for GL_RED and GL_RG as an internal
* format
*/
if (_mesa_has_EXT_texture_rg(ctx))
break;
FALLTHROUGH;
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"glCopyTexImage%dD(internalFormat=%s)", dimensions,