On Thu, Feb 25, 2016 at 7:44 PM, Jordan Justen <[email protected]> wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93840 > Signed-off-by: Jordan Justen <[email protected]> > --- > .../linker/bug-93840.shader_test | 40 > ++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > create mode 100644 tests/spec/arb_compute_shader/linker/bug-93840.shader_test > > diff --git a/tests/spec/arb_compute_shader/linker/bug-93840.shader_test > b/tests/spec/arb_compute_shader/linker/bug-93840.shader_test > new file mode 100644 > index 0000000..06dc899 > --- /dev/null > +++ b/tests/spec/arb_compute_shader/linker/bug-93840.shader_test > @@ -0,0 +1,40 @@ > +# Tests linking a shader with a large workgroup and local data set. > +# > +# This is related to: > +# Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93840 > +# > +# There are two important elements to this test: > +# > +# 1. local workgroup size of 1024 based on the spec requirements. > +# > +# 2. Use a 'large' size of live local data. In the test this is > +# controlled with the SIZE macro. This is hardware specific, and > +# the value of 64 was chosen because it was observed to fail on the > +# Mesa i965 driver. > + > +[require] > +GL >= 3.3 > +GLSL >= 3.30 > +GL_ARB_compute_shader > +GL_ARB_shader_atomic_counters
Actually you don't need counters. Anyways, this is Reviewed-by: Ilia Mirkin <[email protected]> I was going to submit such a test myself (i.e. something that forced spilling)... glad you got around to it already. > + > +[compute shader] > +#version 330 > +#extension GL_ARB_compute_shader: enable > + > +layout(local_size_x = 1024) in; > + > +#define SIZE 64 > + > +shared int sa[SIZE]; I'm fairly sure that shared has nothing to do with it... but I guess it prevents potential optimizations from being clever. So this is fine... > + > +void main() > +{ > + int a[SIZE] = sa; > + a[int(gl_LocalInvocationIndex) % SIZE] += 1; > + if (a[int(gl_LocalInvocationIndex) % SIZE] == 0) > + sa[0] = 1; > +} > + > +[test] > +link success > -- > 2.7.0 > > _______________________________________________ > Piglit mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/piglit _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
