Mesa (master): mesa: RGB9_E5 invalid for CopyTexSubImage* in GLES
Juan Antonio Suárez Romero
jasuarez at kemper.freedesktop.org
Fri Mar 16 13:00:40 UTC 2018
Module: Mesa
Branch: master
Commit: 705a6446b4301498b83789a19d81aed4e922548b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=705a6446b4301498b83789a19d81aed4e922548b
Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date: Wed Mar 14 17:09:34 2018 +0000
mesa: RGB9_E5 invalid for CopyTexSubImage* in GLES
According to OpenGL ES 3.2, section 8.6, CopyTexSubImage* should return
an INVALID_OPERATION if the internalformat of the texture is RGB9_E5.
This fixes
dEQP-GLES31.functional.debug.negative_coverage.*.copytexsubimage2d_texture_internalformat.
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
---
src/mesa/main/teximage.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 928e50d472..9c13e6d7cf 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2623,6 +2623,20 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
return GL_TRUE;
}
+ /* From OpenGL ES 3.2 spec, section 8.6:
+ *
+ * "An INVALID_OPERATION error is generated by CopyTexSubImage3D,
+ * CopyTexImage2D, or CopyTexSubImage2D if the internalformat of the
+ * texture image being (re)specified is RGB9_E5"
+ */
+ if (texImage->InternalFormat == GL_RGB9_E5 &&
+ !_mesa_is_desktop_gl(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(invalid internal format %s)", caller,
+ _mesa_enum_to_string(texImage->InternalFormat));
+ return GL_TRUE;
+ }
+
if (!_mesa_source_buffer_exists(ctx, texImage->_BaseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(missing readbuffer, format=%s)", caller,
More information about the mesa-commit
mailing list