[Mesa-dev] [PATCH 2/6] mesa/es3.1: Correct error code for illegal internal formats
Marta Lofstedt
marta.lofstedt at linux.intel.com
Tue Jun 23 05:23:12 PDT 2015
From: Marta Lofstedt <marta.lofstedt at intel.com>
According to GLES 3.1 CTS test:
ES31-CTS.texture_storage_multisample.
APIGLTexStorage2DMultisample.
multisample_texture_tex_storage_2d_non_color_depth_or_stencil_
internal_formats_receted.
An illegal internal format should generate a
GL_INVALID_ENUM error.
Signed-off-by: Marta Lofstedt <marta.lofstedt at linux.intel.com>
---
src/mesa/main/teximage.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index c76ad54..14af9cd 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -5617,6 +5617,14 @@ _mesa_texture_image_multisample(struct gl_context *ctx, GLuint dims,
}
if (!is_renderable_texture_format(ctx, internalformat)) {
+ /* Accroding to OpenGL ES CTS, internal format error,
+ * should generate GL_INVALID_ENUM.
+ */
+ if(_mesa_is_gles31(ctx))
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "%s(internalformat=%s)",
+ func, _mesa_lookup_enum_by_nr(internalformat));
+ else
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(internalformat=%s)",
func, _mesa_lookup_enum_by_nr(internalformat));
--
1.9.1
More information about the mesa-dev
mailing list