[Piglit] [PATCH] arb_gpu_shader_fp64: uniform initializer tests for double
Chris Forbes
chrisf at ijw.co.nz
Tue Sep 2 17:40:22 PDT 2014
Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
You might also want some for 420pack-style initializers, since we
support that everywhere we'll support doubles.
On Tue, Sep 2, 2014 at 11:57 PM, Tapani Pälli <tapani.palli at intel.com> wrote:
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> .../glsl-uniform-initializer-1.shader_test | 23 +++++++++++++++++
> .../glsl-uniform-initializer-2.shader_test | 25 +++++++++++++++++++
> .../glsl-uniform-initializer-3.shader_test | 29 ++++++++++++++++++++++
> .../glsl-uniform-initializer-4.shader_test | 25 +++++++++++++++++++
> 4 files changed, 102 insertions(+)
> create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-1.shader_test
> create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-2.shader_test
> create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-3.shader_test
> create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-4.shader_test
>
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-1.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-1.shader_test
> new file mode 100644
> index 0000000..e685d1e
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-1.shader_test
> @@ -0,0 +1,23 @@
> +[require]
> +GLSL >= 1.50
> +GL_ARB_gpu_shader_fp64
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64 : require
> +
> +uniform dvec4 color = dvec4(0.0lf, 1.0lf, 0.0lf, 0.0lf);
> +void main()
> +{
> + gl_FragColor = vec4(color);
> +}
> +
> +[test]
> +draw rect -1 -1 1 2
> +uniform dvec4 color 0.0 0.0 1.0 0.0
> +draw rect 0 -1 1 2
> +uniform dvec4 color 0.0 1.0 0.0 0.0
> +relative probe rgb (0.25, 0.5) (0.0, 1.0, 0.0)
> +relative probe rgb (0.75, 0.5) (0.0, 0.0, 1.0)
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-2.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-2.shader_test
> new file mode 100644
> index 0000000..f4396bb
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-2.shader_test
> @@ -0,0 +1,25 @@
> +[require]
> +GLSL >= 1.50
> +GL_ARB_gpu_shader_fp64
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64 : require
> +
> +uniform dvec2[2] color = dvec2[2](dvec2(0.0lf, 1.0lf), dvec2(0.0lf, 0.0lf));
> +void main()
> +{
> + gl_FragColor = vec4(color[0], color[1]);
> +}
> +
> +[test]
> +draw rect -1 -1 1 2
> +uniform dvec2 color[0] 0.0 0.0
> +uniform dvec2 color[1] 1.0 0.0
> +draw rect 0 -1 1 2
> +uniform dvec2 color[0] 0.0 1.0
> +uniform dvec2 color[1] 0.0 0.0
> +relative probe rgb (0.25, 0.5) (0.0, 1.0, 0.0)
> +relative probe rgb (0.75, 0.5) (0.0, 0.0, 1.0)
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-3.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-3.shader_test
> new file mode 100644
> index 0000000..706534f
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-3.shader_test
> @@ -0,0 +1,29 @@
> +[require]
> +GLSL >= 1.50
> +GL_ARB_gpu_shader_fp64
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64 : require
> +struct S {
> + double d;
> + dvec4 v;
> +};
> +
> +uniform S color = S(2.0lf, dvec4(0.0lf, 0.5lf, 0.0lf, 0.0lf));
> +void main()
> +{
> + gl_FragColor = vec4(color.d * color.v);
> +}
> +
> +[test]
> +draw rect -1 -1 1 2
> +uniform double color.d 3.0
> +uniform dvec4 color.v 0.0 0.0 0.34 0.0
> +draw rect 0 -1 1 2
> +uniform double color.d 2.0
> +uniform dvec4 color.v 0.0 0.5 0.0
> +relative probe rgb (0.25, 0.5) (0.0, 1.0, 0.0)
> +relative probe rgb (0.75, 0.5) (0.0, 0.0, 1.0)
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-4.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-4.shader_test
> new file mode 100644
> index 0000000..83c3be1
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-4.shader_test
> @@ -0,0 +1,25 @@
> +[require]
> +GLSL >= 1.50
> +GL_ARB_gpu_shader_fp64
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64 : require
> +
> +uniform dmat4x3 m = dmat4x3(0.0lf, 1.0lf, 0.0lf,
> + 1.0lf, 0.0lf, 0.0lf,
> + 0.0lf, 0.0lf, 1.0lf,
> + 0.0lf, 0.0lf, 0.0lf);
> +uniform dvec4 color;
> +
> +void main()
> +{
> + gl_FragColor = vec4(m * color, 0.0);
> +}
> +
> +[test]
> +uniform dvec4 color 1.0 0.0 0.5
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.5 0.0
> --
> 1.9.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list