[Piglit] [PATCH] tess: avoid reading past the end of the gl_in array

Ilia Mirkin imirkin at alum.mit.edu
Fri Aug 7 07:31:04 PDT 2015


Yeah, you mentioned that on IRC... I agree, just haven't gotten around to
updating this patch. Probably won't for a week or so.

On Fri, Aug 7, 2015 at 7:22 AM, Marek Olšák <maraeo at gmail.com> wrote:

> It would be nice to keep these tests under names that say they test
> out-of-bounds accesses.
>
> Marek
>
> On Wed, Jul 29, 2015 at 5:45 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> > Reading off the end causes out-of-bounds errors on nouveau, and one
> > might think that it's somehow barrier-related given the name of these
> > tests. If this is a valuable thing to test, there can be a separate test
> > for that.
> >
> > Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> > ---
> >  .../spec/arb_tessellation_shader/execution/barrier-patch.shader_test |
> 5 ++++-
> >  tests/spec/arb_tessellation_shader/execution/barrier.shader_test     |
> 5 ++++-
> >  2 files changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git
> a/tests/spec/arb_tessellation_shader/execution/barrier-patch.shader_test
> b/tests/spec/arb_tessellation_shader/execution/barrier-patch.shader_test
> > index d34fdc5..313e9d0 100644
> > ---
> a/tests/spec/arb_tessellation_shader/execution/barrier-patch.shader_test
> > +++
> b/tests/spec/arb_tessellation_shader/execution/barrier-patch.shader_test
> > @@ -12,7 +12,10 @@ patch out int val[6];
> >  patch out vec4 pcolor;
> >
> >  void main() {
> > -       gl_out[gl_InvocationID].gl_Position =
> gl_in[gl_InvocationID].gl_Position;
> > +       if (gl_InvocationID < gl_PatchVerticesIn)
> > +               gl_out[gl_InvocationID].gl_Position =
> > +                       gl_in[gl_InvocationID].gl_Position;
> > +
> >          if (gl_InvocationID < val.length())
> >                  val[gl_InvocationID] = gl_InvocationID;
> >
> > diff --git
> a/tests/spec/arb_tessellation_shader/execution/barrier.shader_test
> b/tests/spec/arb_tessellation_shader/execution/barrier.shader_test
> > index 8ac74f0..a505e79 100644
> > --- a/tests/spec/arb_tessellation_shader/execution/barrier.shader_test
> > +++ b/tests/spec/arb_tessellation_shader/execution/barrier.shader_test
> > @@ -12,7 +12,10 @@ out int val[];
> >  patch out vec4 pcolor;
> >
> >  void main() {
> > -       gl_out[gl_InvocationID].gl_Position =
> gl_in[gl_InvocationID].gl_Position;
> > +       if (gl_InvocationID < gl_PatchVerticesIn)
> > +               gl_out[gl_InvocationID].gl_Position =
> > +                       gl_in[gl_InvocationID].gl_Position;
> > +
> >          if (gl_InvocationID < val.length())
> >                  val[gl_InvocationID] = gl_InvocationID;
> >
> > --
> > 2.3.6
> >
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150807/cb4257a9/attachment-0001.html>


More information about the Piglit mailing list