On Tue, Sep 1, 2015 at 9:02 PM, Dave Airlie <airl...@gmail.com> wrote: > From: Dave Airlie <airl...@redhat.com> > > This test fails on r600 with sb enabled, it does something > similiar to what a lot of the CTS test cases do. > > Signed-off-by: Dave Airlie <airl...@redhat.com> > --- > .../fs-while-loop-rotate-value.shader_test | 32 > ++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > create mode 100644 > tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test > > diff --git > a/tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test > b/tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test > new file mode 100644 > index 0000000..cb08b0f > --- /dev/null > +++ b/tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test > @@ -0,0 +1,32 @@ > +# test to check a bug in r600 sb backend > +# it miscompiles this due to the 1.0 > +# at the end wierdly. > +[require] > +GLSL >= 1.10
Is this allowed in GLSL 1.10? (Having a non-compile-time-resolvable loop) > + > +[vertex shader] [vertex shader passthrough] > +void main() > +{ > + gl_Position = gl_Vertex; > +} > + > +[fragment shader] > +uniform int count; > +uniform vec4 init_val; > + > +void main() > +{ > + vec4 out_val = init_val; > + int i = 0; > + while (i++ < count) { > + out_val = out_val.yzwx; > + } > + gl_FragColor = vec4(out_val.xyz, 1.0); > +} > + > +[test] > +uniform int count 3 > +uniform vec4 init_val 0.25 0.5 0.75 1.0 > + > +draw rect -1 -1 2 2 > +probe all rgba 1.0 0.25 0.5 1.0 Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu> BTW, there's also a tests/shaders/ssa if you prefer to place it in there... IIRC it has a similar test, but I guess this one's different enough. > -- > 2.4.3 > > _______________________________________________ > Piglit mailing list > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit