[Piglit] [PATCH] arb_gpu_shader_fp64: add simple explicit location execution test
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Tue May 24 08:49:40 UTC 2016
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
On 23/05/16 06:11, Timothy Arceri wrote:
> This currently fail on the i965 Mesa driver and likely on the gallium
> drivers too.
> ---
> .../execution/vs-fs-explicit-locations.shader_test | 51 ++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
> create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test
>
> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test
> new file mode 100644
> index 0000000..d951552
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test
> @@ -0,0 +1,51 @@
> +# basic test passing varyings with explicit locations through vs->fs.
> +
> +[require]
> +GLSL >= 1.50
> +GL_ARB_gpu_shader_fp64
> +GL_ARB_separate_shader_objects
> +
> +[vertex shader]
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64 : require
> +#extension GL_ARB_separate_shader_objects : require
> +
> +layout(location = 0) flat out dvec4 d1;
> +layout(location = 2) flat out dvec4 d2;
> +
> +in vec4 piglit_vertex;
> +
> +void main()
> +{
> + gl_Position = piglit_vertex;
> +
> + d1 = dvec4(1.0, 0.0, 1.0, 1.0);
> + d2 = dvec4(0.0, 1.0, 0.0, 1.0);
> +}
> +
> +[fragment shader]
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64 : require
> +#extension GL_ARB_separate_shader_objects : require
> +
> +layout(location = 0) flat in dvec4 d1;
> +layout(location = 2) flat in dvec4 d2;
> +
> +out vec4 color;
> +
> +void main()
> +{
> + if ((dvec4(1.0, 0.0, 1.0, 1.0) == d1) &&
> + (dvec4(0.0, 1.0, 0.0, 1.0) == d2)) {
> + color = vec4(1.0, 0.0, 1.0, 1.0);
> + return;
> + }
> +
> + color = vec4(0.0, 0.0, 1.0, 1.0);
> +}
> +
> +[test]
> +clear color 0.1 0.1 0.1 0.1
> +clear
> +draw rect -1 -1 2 2
> +probe all rgba 1.0 0.0 1.0 1.0
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160524/d79b9f4d/attachment.sig>
More information about the Piglit
mailing list