From ff17766fbb4ac1a42416e70bc1af3ac393469b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Thu, 10 Aug 2023 08:07:29 +0300 Subject: [PATCH] mesa: remove GL_UNSIGNED_BYTE as supported for snorm reads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UNSIGNED_BYTE should not be allowed for reading snorm color buffers. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9718 Signed-off-by: Tapani Pälli Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/readpix.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 99788846058..d60159c266c 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -968,15 +968,6 @@ read_pixels_es3_error_check(struct gl_context *ctx, GLenum format, GLenum type, return GL_NO_ERROR; } } - if (type == GL_UNSIGNED_BYTE) { - switch (internalFormat) { - case GL_R8_SNORM: - case GL_RG8_SNORM: - case GL_RGBA8_SNORM: - if (_mesa_has_EXT_render_snorm(ctx)) - return GL_NO_ERROR; - } - } break; case GL_BGRA: /* GL_EXT_read_format_bgra */