Mesa (master): mesa: allow GL_UNSIGNED_BYTE type for SNORM reads
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 29 06:28:47 UTC 2018
Module: Mesa
Branch: master
Commit: a72dbc461bdb7714656e62cd8f4b00a404c2e6e0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a72dbc461bdb7714656e62cd8f4b00a404c2e6e0
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Mon Aug 27 14:40:41 2018 +0300
mesa: allow GL_UNSIGNED_BYTE type for SNORM reads
OpenGL ES spec states:
"For normalized fixed-point rendering surfaces, the combination format
RGBA and type UNSIGNED_BYTE is accepted."
This fixes following failing VK-GL-CTS tests:
KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
https://bugs.freedesktop.org/show_bug.cgi?id=107658
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Tested-by: Andres Gomez <agomez at igalia.com>
---
src/mesa/main/readpix.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 2cbb578a37..556c860d39 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -958,6 +958,15 @@ 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 */
More information about the mesa-commit
mailing list