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

Submitted by Brian Paul on July 31, 2014, 11 p.m.

Details

Message ID 1406847621-11305-2-git-send-email-brianp@vmware.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Brian Paul July 31, 2014, 11 p.m.
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(-)

Patch hide | download patch | download mbox

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) {