summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2015-09-29 20:10:35 +0300
committerFrancisco Jerez <currojerez@riseup.net>2015-10-03 18:16:17 +0300
commit83b82104a679480a9ffac54b71446641a801174d (patch)
treee298388eafabae01c126f658de68b57437985544 /tests
parent00944ced43fb5b570c25970cca8bf63354f96182 (diff)
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 <t_arceri@yahoo.com.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/arb_shader_atomic_counters/max-counters.c22
1 files changed, 12 insertions, 10 deletions
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,29 +441,31 @@ 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");
}