diff options
author | Dave Airlie <airlied@redhat.com> | 2017-11-17 11:45:12 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-11-21 09:25:19 +1000 |
commit | 9c9ce45a6a2b9e5ea5d365dc51c3f286139ad622 (patch) | |
tree | 5a03db4380b82f2c71921639bb0a3275ad49b993 | |
parent | 75b46d17cc0dde2d377c284c8e77e92fdf26cf53 (diff) |
ssbo/max-ssbo-size: handle lack of vertex shader ssbo.
evergreen has no vertex shader ssbo, just skip on it.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r-- | tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c b/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c index 4af70aaef..4c0d03924 100644 --- a/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c +++ b/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c @@ -117,6 +117,7 @@ piglit_display(void) size_t size; bool pass = true; bool link_should_fail; + GLint num_vertex_ssbo; const float green[4] = { 0, 1, 0, 0 }; int test_index; @@ -127,17 +128,23 @@ piglit_display(void) printf("Max shader storage block size: %d\n", max_size); vec4s = max_size / 4 / 4; + glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &num_vertex_ssbo); + switch (mode) { case VS: target = GL_VERTEX_SHADER; link_should_fail = false; test_index = vec4s - 1; + if (num_vertex_ssbo == 0) + piglit_report_result(PIGLIT_SKIP); break; case VS_EXCEED: target = GL_VERTEX_SHADER; link_should_fail = true; vec4s++; test_index = vec4s - 2; + if (num_vertex_ssbo == 0) + piglit_report_result(PIGLIT_SKIP); break; case FS: target = GL_FRAGMENT_SHADER; |