[Piglit] [PATCH 2/3] etc1: Fix glTexSubImage2D call in basic API test
Chad Versace
chad.versace at linux.intel.com
Tue Jan 29 17:18:49 PST 2013
On mesa-1559994 with Intel Sandybridge, this test failed due to an
unexpected GL error.
The test wanted
glTexSubImage2D(width=8, height=8, size=4096)
to emit GL_INVALID_OPERATION. However, Mesa emitted GL_INVALID_VALUE
because the size was incorrect. From page 79 of the OpenGL ES 1.1 spec:
If the imageSize parameter is not consistent with the format,
dimensions, and contents of the compressed image, an INVALID VALUE error
results.
This patch fixes the size.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55147
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
.../oes_compressed_etc1_rgb8_texture-basic.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c b/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c
index aa0b137..dd215d0 100644
--- a/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c
+++ b/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c
@@ -42,7 +42,12 @@ piglit_display(void)
{
const GLenum format = GL_ETC1_RGB8_OES;
const GLsizei width = 8, height = 8;
- const GLubyte fake_tex_data[4096];
+
+ /* Each ETC1 block encodes 4x4 pixels and is 8 bytes. Therefore this
+ * image size is 32 bytes.
+ */
+ const GLubyte fake_tex_data[32];
+
GLuint t;
int pass = GL_TRUE;
--
1.8.1.1
More information about the Piglit
mailing list