[Piglit] [PATCH 1/2] glsl-fs-discard-mrt: Check that we have 2 draw buffers before testing.

Eric Anholt eric at anholt.net
Sat Apr 16 01:40:39 UTC 2016


Fixes later failure on vc4.
---
 tests/shaders/glsl-fs-discard-mrt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/shaders/glsl-fs-discard-mrt.c b/tests/shaders/glsl-fs-discard-mrt.c
index ca4e7d7e8fbc..8447cf270b96 100644
--- a/tests/shaders/glsl-fs-discard-mrt.c
+++ b/tests/shaders/glsl-fs-discard-mrt.c
@@ -192,8 +192,16 @@ piglit_display(void)
 void
 piglit_init(int argc, char **argv)
 {
+	GLint max_buffers;
+
 	piglit_require_GLSL();
 	piglit_require_extension("GL_ARB_explicit_attrib_location");
 	piglit_require_extension("GL_EXT_framebuffer_object");
+
+	glGetIntegerv(GL_MAX_DRAW_BUFFERS, &max_buffers);
+	if (max_buffers == 1) {
+		fprintf(stderr, "Test requires 2 draw buffers\n");
+		piglit_report_result(PIGLIT_SKIP);
+	}
 }
 
-- 
2.8.0.rc3



More information about the Piglit mailing list