[Piglit] [PATCH] arb_gpu_shader_fp64/ssbo: fix tests to skip is no vertex ssbo available.
Dave Airlie
airlied at gmail.com
Wed Mar 7 00:54:34 UTC 2018
From: Dave Airlie <airlied at redhat.com>
These tests all require varying numbers of ssbos.
---
.../shader_storage/layout-std140-fp64-mixed-shader.c | 5 +++++
.../arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-shader.c | 5 +++++
.../shader_storage/layout-std430-fp64-mixed-shader.c | 5 +++++
.../arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-shader.c | 5 +++++
4 files changed, 20 insertions(+)
diff --git a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-mixed-shader.c b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-mixed-shader.c
index 96add58..e649fea 100644
--- a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-mixed-shader.c
+++ b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-mixed-shader.c
@@ -213,11 +213,16 @@ piglit_init(int argc, char **argv)
double *map_d;
void *data;
void *data_base;
+ GLint num_vertex_ssbo;
piglit_require_extension("GL_ARB_shader_storage_buffer_object");
piglit_require_extension("GL_ARB_gpu_shader_fp64");
piglit_require_GLSL_version(150);
+ glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo);
+ if (num_vertex_ssbo < 4)
+ piglit_report_result(PIGLIT_SKIP);
+
prog = piglit_build_simple_program_multiple_shaders(
GL_VERTEX_SHADER, vs_code,
GL_GEOMETRY_SHADER, gs_source,
diff --git a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-shader.c b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-shader.c
index e7e2343..0d1754d 100644
--- a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-shader.c
+++ b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std140-fp64-shader.c
@@ -189,11 +189,16 @@ piglit_init(int argc, char **argv)
GLuint buffer;
unsigned int i;
double *map;
+ GLint num_vertex_ssbo;
piglit_require_extension("GL_ARB_shader_storage_buffer_object");
piglit_require_extension("GL_ARB_gpu_shader_fp64");
piglit_require_GLSL_version(150);
+ 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_multiple_shaders(
GL_VERTEX_SHADER, vs_code,
GL_GEOMETRY_SHADER, gs_source,
diff --git a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-mixed-shader.c b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-mixed-shader.c
index 26a8e49..d6bdc13 100644
--- a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-mixed-shader.c
+++ b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-mixed-shader.c
@@ -245,11 +245,16 @@ piglit_init(int argc, char **argv)
double *map_d;
void *data;
void *data_base;
+ GLint num_vertex_ssbo;
piglit_require_extension("GL_ARB_shader_storage_buffer_object");
piglit_require_extension("GL_ARB_gpu_shader_fp64");
piglit_require_GLSL_version(150);
+ glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo);
+ if (num_vertex_ssbo < 4)
+ piglit_report_result(PIGLIT_SKIP);
+
prog = piglit_build_simple_program_multiple_shaders(
GL_VERTEX_SHADER, vs_code,
GL_GEOMETRY_SHADER, gs_source,
diff --git a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-shader.c b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-shader.c
index 00adfc8..9d92567 100644
--- a/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-shader.c
+++ b/tests/spec/arb_gpu_shader_fp64/shader_storage/layout-std430-fp64-shader.c
@@ -223,11 +223,16 @@ piglit_init(int argc, char **argv)
GLuint buffer;
unsigned int i;
double *map;
+ GLint num_vertex_ssbo;
piglit_require_extension("GL_ARB_shader_storage_buffer_object");
piglit_require_extension("GL_ARB_gpu_shader_fp64");
piglit_require_GLSL_version(150);
+ 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_multiple_shaders(
GL_VERTEX_SHADER, vs_code,
GL_GEOMETRY_SHADER, gs_source,
--
2.9.5
More information about the Piglit
mailing list