[Piglit] [PATCH] arb_texture_view: fix array size

Brian Paul brianp at vmware.com
Wed Aug 14 08:28:31 PDT 2013


Change size from 3 to 5 since that's how many textures we gen/use.

v2: also use ARRAY_SIZE() in glGenTextures() call.
---
 tests/spec/arb_texture_view/texture-immutable-levels.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/spec/arb_texture_view/texture-immutable-levels.c b/tests/spec/arb_texture_view/texture-immutable-levels.c
index d825562..946ff20 100644
--- a/tests/spec/arb_texture_view/texture-immutable-levels.c
+++ b/tests/spec/arb_texture_view/texture-immutable-levels.c
@@ -47,7 +47,7 @@ PIGLIT_GL_TEST_CONFIG_END
 enum piglit_result
 piglit_display(void)
 {
-	GLuint tex[3];
+	GLuint tex[5];
 	GLint level;
 	GLint num_level;
 
@@ -65,7 +65,7 @@ piglit_display(void)
 		piglit_report_result(PIGLIT_FAIL);
 	}
 
-	glGenTextures(5, tex);
+	glGenTextures(ARRAY_SIZE(tex), tex);
 
 	glBindTexture(GL_TEXTURE_1D, tex[0]);
 	glTexStorage1D(GL_TEXTURE_1D, 3, GL_RGBA8, 32);
-- 
1.7.10.4



More information about the Piglit mailing list