From d5916cb3ca7af90f81639d91922efecf9e713fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 4 Sep 2024 09:26:00 +0300 Subject: [PATCH] mesa: check for ARB_ES3_compatibility in format checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes regressions seen with following tests: dEQP-GL45-ES3.functional.negative_api.buffer.read_pixels dEQP-GL45-ES3.functional.negative_api.buffer.read_pixels_format_mismatch dEQP-GL45-ES31.functional.debug.negative_coverage.get_error.buffer.read_pixels dEQP-GL45-ES31.functional.debug.negative_coverage.get_error.buffer.readn_pixels dEQP-GL45-ES31.functional.debug.negative_coverage.get_error.buffer.read_pixels_format_mismatch Fixes: e8226bda60d ("mesa/main: validate desktop gl format/types") Signed-off-by: Tapani Pälli Reviewed-by: Erik Faye-Lund Part-of: --- src/mesa/main/glformats.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 40c35c61f4a..3248506386a 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1788,7 +1788,9 @@ valid_texture_format_enum(const struct gl_context *ctx, GLenum format) case GL_LUMINANCE_ALPHA: case GL_LUMINANCE: case GL_ALPHA: - return _mesa_is_desktop_gl_compat(ctx) || _mesa_is_gles(ctx); + return _mesa_is_desktop_gl_compat(ctx) || + _mesa_has_ARB_ES3_compatibility(ctx) || + _mesa_is_gles(ctx); case GL_ABGR_EXT: return _mesa_has_EXT_abgr(ctx);