[Piglit] [PATCH 09/10] arb_enhanced_layouts: add another xfb_stride overflow test
Andres Gomez
agomez at igalia.com
Sat Feb 2 20:30:08 UTC 2019
On Sat, 2019-02-02 at 10:15 +1100, Timothy Arceri wrote:
> On 2/2/19 4:55 am, Andres Gomez wrote:
> > Additional check to address a bug in mesa in which a stride which
> > is a divisor of the declared offset for an overflowing varying
> > won't fail.
> >
> > From the GL_ARB_enhanced_layouts spec:
> >
> > " It is a compile-time or link-time error to have any *xfb_offset*
> > that overflows *xfb_stride*, whether stated on declarations before
> > or after the *xfb_stride*, or in different compilation units."
> >
> > Cc: Timothy Arceri <tarceri at itsqueeze.com>
> > Signed-off-by: Andres Gomez <agomez at igalia.com>
> > ---
> > .../xfb_stride/variable-stride-overflow2.vert | 28 +++++++++++++++++++
> > 1 file changed, 28 insertions(+)
> > create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert
> >
> > diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert
> > new file mode 100644
> > index 000000000..469c5e430
> > --- /dev/null
> > +++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert
> > @@ -0,0 +1,28 @@
> > +// [config]
> > +// expect_result: fail
> > +// glsl_version: 1.40
> > +// check_link: true
> > +// require_extensions: GL_ARB_enhanced_layouts
> > +// [end config]
> > +//
> > +// Additional check to address a bug in mesa in which a stride which
> > +// is a divisor of the declared offset for an overflowing varying
> > +// won't fail.
> > +//
> > +// From the GL_ARB_enhanced_layouts spec:
> > +//
> > +// "It is a compile-time or link-time error to have any *xfb_offset*
> > +// that overflows *xfb_stride*, whether stated on declarations before or
> > +// after the *xfb_stride*, or in different compilation units."
> > +
> > +#version 140
> > +#extension GL_ARB_enhanced_layouts: require
> > +
> > +layout(xfb_stride = 16) out vec4 var;
> > +layout(xfb_offset = 16) out vec4 var2;
>
> This test looks wrong to me. This looks like it *should* compile.
>
> vec4 var uses bytes 0-15. So there is no issue with vec4 vec2 having an
> offset of 16. Its been a long time since I worked on this but I think
> this change is wrong. I see no reason this should fail compilation.
I believe I've answered now this in:
https://lists.freedesktop.org/archives/mesa-dev/2019-February/214457.html
>
> > +
> > +void main()
> > +{
> > + var = vec4(1.0);
> > + var2 = vec4(0.0);
> > +}
> >
--
Br,
Andres
More information about the Piglit
mailing list