From 83b82104a679480a9ffac54b71446641a801174d Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 29 Sep 2015 20:10:35 +0300 Subject: arb_shader_atomic_counters/max-counters: Run the combined atomic buffer test in more cases. The subtest with at most the maximum number of atomic counter buffers can be run whenever the combined limit is at least one more than the limit for the FS stage. The subtest exceeding the maximum number of combined atomic counter buffers can be run whenever the sum of the limits for the VS and FS stages is greater than the combined limit. Reviewed-by: Timothy Arceri --- .../spec/arb_shader_atomic_counters/max-counters.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/spec/arb_shader_atomic_counters/max-counters.c b/tests/spec/arb_shader_atomic_counters/max-counters.c index 7014c7b0b..8209f0d64 100644 --- a/tests/spec/arb_shader_atomic_counters/max-counters.c +++ b/tests/spec/arb_shader_atomic_counters/max-counters.c @@ -441,28 +441,30 @@ piglit_init(int argc, char **argv) !run_test_vertex_max_buffers, ls.vertex_buffers + 1); - if (ls.vertex_buffers + ls.fragment_buffers > ls.combined_buffers) { - int max_safe_vs = MIN2(ls.vertex_buffers, - ls.combined_buffers - - ls.fragment_buffers); + const int combined_test_max_vs_bufs = + MIN2(ls.vertex_buffers, ls.combined_buffers - ls.fragment_buffers); + + if (combined_test_max_vs_bufs > 0) { atomic_counters_subtest(&status, GL_NONE, "Combined test under maximum " "number of atomic counter buffers", run_test_combined_max_buffers, ls.fragment_buffers, - max_safe_vs); + combined_test_max_vs_bufs); + } else { + piglit_report_subtest_result( + PIGLIT_SKIP, "Combined test under maximum " + "number of atomic counter buffers"); + } + if (combined_test_max_vs_bufs < ls.vertex_buffers) { atomic_counters_subtest(&status, GL_NONE, "Combined test above maximum " "number of atomic counter buffers", !run_test_combined_max_buffers, ls.fragment_buffers, - max_safe_vs + 1); - + combined_test_max_vs_bufs + 1); } else { - piglit_report_subtest_result( - PIGLIT_SKIP, "Combined test under maximum " - "number of atomic counter buffers"); piglit_report_subtest_result( PIGLIT_SKIP, "Combined test above maximum " "number of atomic counter buffers"); -- cgit v1.2.3