[Piglit] [PATCH] texwrap: skip if integers or offset used with non-2D

Dave Airlie airlied at gmail.com
Wed Jul 8 16:22:32 PDT 2015


From: Dave Airlie <airlied at redhat.com>

The test doesn't support these cases yet, since the shaders
are hardcoded to use 2D samplers.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 tests/texturing/texwrap.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c
index 76b6382..3736231 100644
--- a/tests/texturing/texwrap.c
+++ b/tests/texturing/texwrap.c
@@ -1839,6 +1839,10 @@ outer_continue:;
 	glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE);
 
 	if (texture_offset) {
+		if (texture_target != GL_TEXTURE_2D) {
+			printf("Offset tests only work with 2D textures.\n");
+			piglit_report_result(PIGLIT_SKIP);
+		}
 		piglit_require_GLSL_version(130);
 		fp = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fp_offset);
 		assert(fp);
@@ -1851,6 +1855,11 @@ outer_continue:;
 	switch (test->format[0].type) {
 	case INT_TYPE:
 	case UINT_TYPE:
+
+		if (texture_target != GL_TEXTURE_2D) {
+			printf("Integer tests only work with 2D textures.\n");
+			piglit_report_result(PIGLIT_SKIP);
+		}
 		piglit_require_GLSL_version(130);
 		fp = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fp_int);
 		assert(fp);
-- 
2.4.3



More information about the Piglit mailing list