[Piglit] [PATCH 3/7] ARB_color_buffer_float/mixed-mrt: Skip if <2 draw buffers available.
Eric Anholt
eric at anholt.net
Mon Jul 11 17:43:09 PDT 2011
---
tests/spec/arb_color_buffer_float/mrt.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tests/spec/arb_color_buffer_float/mrt.c b/tests/spec/arb_color_buffer_float/mrt.c
index f2e12fd..73166f7 100644
--- a/tests/spec/arb_color_buffer_float/mrt.c
+++ b/tests/spec/arb_color_buffer_float/mrt.c
@@ -132,10 +132,18 @@ test()
unsigned
init()
{
+ GLint num;
+
piglit_require_extension("GL_ARB_vertex_program");
piglit_require_extension("GL_ARB_fragment_program");
piglit_require_extension("GL_ARB_draw_buffers");
+ glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &num);
+ if (num < 2) {
+ printf("Test requires 2 draw buffers, found %d\n", num);
+ piglit_report_result(PIGLIT_SKIP);
+ }
+
mrt_vp = piglit_compile_program(GL_VERTEX_PROGRAM_ARB, mrt_vp_string);
mrt_fp = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB, mrt_fp_string);
--
1.7.5.4
More information about the Piglit
mailing list