[Piglit] [PATCH 4/4] arb_shader_atomic_counters/max-counters: Run the combined atomic buffer test in more cases.

Timothy Arceri t_arceri at yahoo.com.au
Wed Sep 30 14:18:46 PDT 2015


On Tue, 2015-09-29 at 20:53 +0300, Francisco Jerez wrote:
> 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.

This patch looks correct however above this code there is what looks
like a duplicate test:

        if (ls.vertex_counters + ls.fragment_counters >
ls.combined_counters) {
                atomic_counters_subtest(&status, GL_NONE,
                                        "Combined test above maximum
number "
                                        "of atomic counters",
                                       
 !run_test_combined_max_counters,
                                        ls.fragment_counters,
                                        ls.combined_counters
                                        - ls.fragment_counters + 1);
        } else {
                piglit_report_subtest_result(
                        PIGLIT_SKIP, "Combined test above maximum
number "
                        "of atomic counters");
        }

If you agree this is a duplicate and remove it to then:

Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>



> ---
>  .../spec/arb_shader_atomic_counters/max-counters.c | 22 ++++++++++++
> ----------
>  1 file 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 7014c7b..8209f0d 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");
>          }


More information about the Piglit mailing list