[Piglit] [PATCH] ssbo: fix rendering test to check for vertex ssbo support.

Dave Airlie airlied at gmail.com
Mon Feb 15 04:28:00 UTC 2016


From: Dave Airlie <airlied at redhat.com>

This tests uses vertex ssbo's which fglrx on evergreen doesn't do,
so refuse to run in this case.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 tests/spec/arb_shader_storage_buffer_object/rendering.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/spec/arb_shader_storage_buffer_object/rendering.c b/tests/spec/arb_shader_storage_buffer_object/rendering.c
index 52d5882..cfb7fb7 100644
--- a/tests/spec/arb_shader_storage_buffer_object/rendering.c
+++ b/tests/spec/arb_shader_storage_buffer_object/rendering.c
@@ -161,6 +161,7 @@ setup_ubos(void)
 void
 piglit_init(int argc, char **argv)
 {
+	GLint num_vs_blocks;
 	piglit_require_extension("GL_ARB_shader_storage_buffer_object");
 	piglit_require_extension("GL_ARB_program_interface_query");
 
@@ -168,6 +169,11 @@ piglit_init(int argc, char **argv)
 		test_buffer_offset = true;
 	}
 
+	glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vs_blocks);
+	if (num_vs_blocks == 0) {
+		printf("Test requires SSBO vertex shader support.\n");
+		piglit_report_result(PIGLIT_SKIP);
+	}
 	prog = piglit_build_simple_program(vert_shader_text, frag_shader_text);
 	assert(prog);
 	glUseProgram(prog);
-- 
2.1.0



More information about the Piglit mailing list