For the series: Reviewed-by: Marek Olšák <marek.ol...@amd.com>
Marek On Mon, Oct 17, 2016 at 7:21 PM, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > From: Nicolai Hähnle <nicolai.haeh...@amd.com> > > This exposes a bug in st_glsl_to_tgsi. > --- > .../execution/fs-function-inout-array.shader_test | 43 > ++++++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 > tests/spec/arb_gpu_shader_fp64/execution/fs-function-inout-array.shader_test > > diff --git > a/tests/spec/arb_gpu_shader_fp64/execution/fs-function-inout-array.shader_test > > b/tests/spec/arb_gpu_shader_fp64/execution/fs-function-inout-array.shader_test > new file mode 100644 > index 0000000..5ba2004 > --- /dev/null > +++ > b/tests/spec/arb_gpu_shader_fp64/execution/fs-function-inout-array.shader_test > @@ -0,0 +1,43 @@ > +# Test inout double arrays passed to functions. > + > +[require] > +GLSL >= 1.50 > +GL_ARB_gpu_shader_fp64 > + > +[vertex shader passthrough] > + > +[fragment shader] > +#version 150 > +#extension GL_ARB_gpu_shader_fp64 : require > + > +out vec4 ocolor; > + > +void multiply(inout double array[4]) > +{ > + for (int i = 0; i < 4; ++i) { > + array[i] *= i; > + } > +} > + > +void main() > +{ > + double array[4]; > + > + for (int i = 0; i < 4; ++i) > + array[i] = 1.0; > + > + multiply(array); > + > + for (int i = 0; i < 4; ++i) { > + if (array[i] != double(i)) { > + ocolor = vec4(1.0, float(i) / 255.0, array[i] / > 255.0, 1.0); > + return; > + } > + } > + > + ocolor = vec4(0.0, 1.0, 0.0, 1.0); > +} > + > +[test] > +draw rect -1 -1 2 2 > +probe all rgba 0.0 1.0 0.0 1.0 > -- > 2.7.4 > > _______________________________________________ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit