summaryrefslogtreecommitdiff
path: root/tests/shaders
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-03-11 19:33:00 -0500
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-04-14 16:41:31 -0500
commit94566e79529d6a0d58e75d6e3c940964ca225a93 (patch)
tree18b6bdbc1c78144bc2cc32dcb782b16cdb3eabc6 /tests/shaders
parent8501c22f70ef0624230a10058131dd72b9c77dd0 (diff)
shader_runner: support integer textures
Diffstat (limited to 'tests/shaders')
-rw-r--r--tests/shaders/shader_runner.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index c41f9d2be..028e6915e 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -3101,6 +3101,23 @@ piglit_display(void)
GL_UNSIGNED_NORMALIZED);
if (!piglit_is_core_profile)
glEnable(GL_TEXTURE_2D);
+ } else if (sscanf(line, "texture integer %d ( %d", &tex, &w) == 2) {
+ GLenum int_fmt;
+ int b, a;
+ int num_scanned =
+ sscanf(line,
+ "texture integer %d ( %d , %d ) ( %d, %d ) %31s",
+ &tex, &w, &h, &b, &a, s);
+ if (num_scanned < 6) {
+ fprintf(stderr,
+ "invalid texture integer command!\n");
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
+ int_fmt = piglit_get_gl_enum_from_name(s);
+
+ glActiveTexture(GL_TEXTURE0 + tex);
+ piglit_integer_texture(int_fmt, w, h, b, a);
} else if (sscanf(line, "texture miptree %d", &tex) == 1) {
glActiveTexture(GL_TEXTURE0 + tex);
piglit_miptree_texture();