[Piglit] [PATCH 1/3] arb_compute_shader: Add compiler tests for CS memory barrier functions

Jordan Justen jordan.l.justen at intel.com
Thu Nov 5 12:22:10 PST 2015


On 2015-11-05 10:57:12, Ilia Mirkin wrote:
> On Thu, Nov 5, 2015 at 1:50 PM, Jordan Justen <jordan.l.justen at intel.com> wrote:
> > Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> > ---
> >  .../arb_compute_shader/compiler/groupMemoryBarrier.comp   | 15 +++++++++++++++
> >  .../compiler/memoryBarrierAtomicCounter.comp              | 15 +++++++++++++++
> >  .../arb_compute_shader/compiler/memoryBarrierBuffer.comp  | 15 +++++++++++++++
> >  .../arb_compute_shader/compiler/memoryBarrierImage.comp   | 15 +++++++++++++++
> >  .../arb_compute_shader/compiler/memoryBarrierShared.comp  | 15 +++++++++++++++
> >  5 files changed, 75 insertions(+)
> >  create mode 100644 tests/spec/arb_compute_shader/compiler/groupMemoryBarrier.comp
> >  create mode 100644 tests/spec/arb_compute_shader/compiler/memoryBarrierAtomicCounter.comp
> >  create mode 100644 tests/spec/arb_compute_shader/compiler/memoryBarrierBuffer.comp
> >  create mode 100644 tests/spec/arb_compute_shader/compiler/memoryBarrierImage.comp
> >  create mode 100644 tests/spec/arb_compute_shader/compiler/memoryBarrierShared.comp
> >
> > diff --git a/tests/spec/arb_compute_shader/compiler/groupMemoryBarrier.comp b/tests/spec/arb_compute_shader/compiler/groupMemoryBarrier.comp
> > new file mode 100644
> > index 0000000..b482790
> > --- /dev/null
> > +++ b/tests/spec/arb_compute_shader/compiler/groupMemoryBarrier.comp
> > @@ -0,0 +1,15 @@
> > +// [config]
> > +// expect_result: pass
> > +// glsl_version: 3.30
> > +// require_extensions: GL_ARB_compute_shader
> > +// [end config]
> > +
> > +#version 330
> 
> May I ask why you're using version 330 for all these? The spec calls
> for GL 4.2, although I think the only dependency is glMemoryBarrier
> introduced by images.

I just copied the previous compiler tests, which had 330. I guess the
ext spec does say that 4.2 is required.

r-b with that changed?

-Jordan

> 
>   -ilia
> 
> > +#extension GL_ARB_compute_shader: enable
> > +
> > +layout(local_size_x = 1) in;
> > +
> > +void main()
> > +{
> > +    groupMemoryBarrier();
> > +}
> > diff --git a/tests/spec/arb_compute_shader/compiler/memoryBarrierAtomicCounter.comp b/tests/spec/arb_compute_shader/compiler/memoryBarrierAtomicCounter.comp
> > new file mode 100644
> > index 0000000..2ef7b89
> > --- /dev/null
> > +++ b/tests/spec/arb_compute_shader/compiler/memoryBarrierAtomicCounter.comp
> > @@ -0,0 +1,15 @@
> > +// [config]
> > +// expect_result: pass
> > +// glsl_version: 3.30
> > +// require_extensions: GL_ARB_compute_shader
> > +// [end config]
> > +
> > +#version 330
> > +#extension GL_ARB_compute_shader: enable
> > +
> > +layout(local_size_x = 1) in;
> > +
> > +void main()
> > +{
> > +    memoryBarrierAtomicCounter();
> > +}
> > diff --git a/tests/spec/arb_compute_shader/compiler/memoryBarrierBuffer.comp b/tests/spec/arb_compute_shader/compiler/memoryBarrierBuffer.comp
> > new file mode 100644
> > index 0000000..b1fe8c4
> > --- /dev/null
> > +++ b/tests/spec/arb_compute_shader/compiler/memoryBarrierBuffer.comp
> > @@ -0,0 +1,15 @@
> > +// [config]
> > +// expect_result: pass
> > +// glsl_version: 3.30
> > +// require_extensions: GL_ARB_compute_shader
> > +// [end config]
> > +
> > +#version 330
> > +#extension GL_ARB_compute_shader: enable
> > +
> > +layout(local_size_x = 1) in;
> > +
> > +void main()
> > +{
> > +    memoryBarrierBuffer();
> > +}
> > diff --git a/tests/spec/arb_compute_shader/compiler/memoryBarrierImage.comp b/tests/spec/arb_compute_shader/compiler/memoryBarrierImage.comp
> > new file mode 100644
> > index 0000000..7fb0b6e
> > --- /dev/null
> > +++ b/tests/spec/arb_compute_shader/compiler/memoryBarrierImage.comp
> > @@ -0,0 +1,15 @@
> > +// [config]
> > +// expect_result: pass
> > +// glsl_version: 3.30
> > +// require_extensions: GL_ARB_compute_shader
> > +// [end config]
> > +
> > +#version 330
> > +#extension GL_ARB_compute_shader: enable
> > +
> > +layout(local_size_x = 1) in;
> > +
> > +void main()
> > +{
> > +    memoryBarrierImage();
> > +}
> > diff --git a/tests/spec/arb_compute_shader/compiler/memoryBarrierShared.comp b/tests/spec/arb_compute_shader/compiler/memoryBarrierShared.comp
> > new file mode 100644
> > index 0000000..3809c69
> > --- /dev/null
> > +++ b/tests/spec/arb_compute_shader/compiler/memoryBarrierShared.comp
> > @@ -0,0 +1,15 @@
> > +// [config]
> > +// expect_result: pass
> > +// glsl_version: 3.30
> > +// require_extensions: GL_ARB_compute_shader
> > +// [end config]
> > +
> > +#version 330
> > +#extension GL_ARB_compute_shader: enable
> > +
> > +layout(local_size_x = 1) in;
> > +
> > +void main()
> > +{
> > +    memoryBarrierShared();
> > +}
> > --
> > 2.6.2
> >
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list