[Piglit] [PATCH 2/3] shader_runner: add support for rgbw 2DArray texture setup

Brian Paul brianp at vmware.com
Thu Jul 31 16:00:20 PDT 2014


And remove the previous glEnable(GL_TEXTURE_2D_ARRAY) call.  It's
never legal.
---
 tests/shaders/shader_runner.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 2069fdf..e4607ae 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -2368,8 +2368,12 @@ piglit_display(void)
 			glBindTexture(GL_TEXTURE_2D_ARRAY, texobj);
 			glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA,
 				     w, h, l, 0, GL_RGBA, GL_FLOAT, 0);
-			if (!piglit_is_core_profile)
-				glEnable(GL_TEXTURE_2D_ARRAY);
+		} else if (sscanf(line,
+				  "texture rgbw 2DArray %d ( %d , %d , %d )",
+				  &tex, &w, &h, &l) == 4) {
+			glActiveTexture(GL_TEXTURE0 + tex);
+			piglit_2darray_texture(GL_TEXTURE_2D_ARRAY, GL_RGBA,
+					       w, h, l, GL_FALSE);
 		} else if (sscanf(line,
 				  "texture shadow2D %d ( %d , %d )",
 				  &tex, &w, &h) == 3) {
-- 
1.7.10.4



More information about the Piglit mailing list