[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
Sat Oct 3 05:05:33 PDT 2015


On Thu, 2015-10-01 at 14:16 +0300, Francisco Jerez wrote:
> Timothy Arceri <t_arceri at yahoo.com.au> writes:
> 
> > 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:
> > 
> 
> Not quite, that's the subtest for the combined limit of atomic
> counters
> rather than atomic counter buffers. ;)

Oh, right I should learn how to read one of these days. All patches are
r-b in that case.

> 
> > Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>
> > 
> Thanks!
> 
> > 
> > 
> > > ---
> > >  .../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