[Piglit] [PATCH 1/2] ssbo: block more tests on lack of vertex ssbo

Dave Airlie airlied at gmail.com
Fri Nov 17 02:02:06 UTC 2017


From: Dave Airlie <airlied at redhat.com>

---
 tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c     | 5 +++++
 .../arb_shader_storage_buffer_object/layout-std140-write-shader.c    | 4 ++++
 .../arb_shader_storage_buffer_object/layout-std430-write-shader.c    | 5 +++++
 3 files changed, 14 insertions(+)

diff --git a/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c b/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c
index d98795d..68242c1 100644
--- a/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c
+++ b/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c
@@ -83,10 +83,15 @@ piglit_init(int argc, char **argv)
 	float ssbo_values[SSBO_SIZE] = {0};
 	float *map;
 	int index;
+	GLint num_vertex_ssbo;
 
 	piglit_require_extension("GL_ARB_shader_storage_buffer_object");
 	piglit_require_extension("GL_ARB_program_interface_query");
 
+	glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo);
+	if (num_vertex_ssbo < 1)
+		piglit_report_result(PIGLIT_SKIP);
+
 	prog = piglit_build_simple_program(vs_pass_thru_text, fs_source);
 
 	glUseProgram(prog);
diff --git a/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c b/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c
index 914fc00..5ae4c1c 100644
--- a/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c
+++ b/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c
@@ -119,10 +119,14 @@ piglit_init(int argc, char **argv)
 	unsigned int i;
 	float ssbo_values[SSBO_SIZE] = {0};
 	float *map;
+	GLuint num_vertex_ssbo;
 
 	piglit_require_extension("GL_ARB_shader_storage_buffer_object");
         piglit_require_GLSL_version(130);
 
+	glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo);
+	if (num_vertex_ssbo < 1)
+		piglit_report_result(PIGLIT_SKIP);
 	prog = piglit_build_simple_program(vs_pass_thru_text, fs_source);
 
 	glUseProgram(prog);
diff --git a/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c b/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c
index 3d5dcdc..0aa7fa7 100644
--- a/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c
+++ b/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c
@@ -159,10 +159,15 @@ piglit_init(int argc, char **argv)
 	unsigned int i;
 	float ssbo_values[SSBO_SIZE] = {0};
 	float *map;
+	GLuint num_vertex_ssbo;
 
 	piglit_require_extension("GL_ARB_shader_storage_buffer_object");
         piglit_require_GLSL_version(130);
 
+	glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo);
+	if (num_vertex_ssbo < 1)
+		piglit_report_result(PIGLIT_SKIP);
+
 	prog = piglit_build_simple_program(vs_pass_thru_text, fs_source);
 
 	glUseProgram(prog);
-- 
2.9.5



More information about the Piglit mailing list