[Piglit] [PATCH 1/2] ssbo: block more tests on lack of vertex ssbo
Vinson Lee
vlee at freedesktop.org
Wed Nov 29 23:53:07 UTC 2017
On Thu, Nov 16, 2017 at 6:02 PM, Dave Airlie <airlied at gmail.com> wrote:
> 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
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
Hi.
This patch introduced these compiler warnings.
layout-std140-write-shader.c: In function ‘piglit_init’:
layout-std140-write-shader.c:127:53: warning: pointer targets in
passing argument 2 of ‘piglit_dispatch_glGetIntegerv’ differ in
signedness [-Wpointer-sign]
glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo);
^
layout-std140-write-shader.c:127:53: note: expected ‘GLint * {aka int
*}’ but argument is of type ‘GLuint * {aka unsigned int *}’
layout-std430-write-shader.c: In function ‘piglit_init’:
layout-std430-write-shader.c:167:53: warning: pointer targets in
passing argument 2 of ‘piglit_dispatch_glGetIntegerv’ differ in
signedness [-Wpointer-sign]
glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo);
^
arb_shader_storage_buffer_object/layout-std430-write-shader.c:167:53:
note: expected ‘GLint * {aka int *}’ but argument is of type ‘GLuint *
{aka unsigned int *}’
Vinson
More information about the Piglit
mailing list