[Piglit] [PATCH] gles-es-1.00: add linker test to check default precision qualifier redeclaration

Tapani Pälli tapani.palli at intel.com
Thu Oct 20 13:19:40 UTC 2016


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 10/20/2016 01:37 PM, Samuel Iglesias Gonsálvez wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97804
> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> ---
>   ...t-precision-qualifier-redeclaration.shader_test | 34 ++++++++++++++++++++++
>   1 file changed, 34 insertions(+)
>   create mode 100644 tests/spec/glsl-es-1.00/linker/glsl-default-precision-qualifier-redeclaration.shader_test
>
> diff --git a/tests/spec/glsl-es-1.00/linker/glsl-default-precision-qualifier-redeclaration.shader_test b/tests/spec/glsl-es-1.00/linker/glsl-default-precision-qualifier-redeclaration.shader_test
> new file mode 100644
> index 0000000..510ba20
> --- /dev/null
> +++ b/tests/spec/glsl-es-1.00/linker/glsl-default-precision-qualifier-redeclaration.shader_test
> @@ -0,0 +1,34 @@
> +#
> +# Test that vertex shader defaults to highp (only fragment shader
> +# needs to specify float precision) and that later fragment shader
> +# highp precision declaration overrides earlier mediump declaration.
> +#
> +[require]
> +GL ES >= 2.0
> +GLSL ES >= 1.00
> +
> +[vertex shader]
> +
> +uniform float a;
> +
> +void main(void)
> +{
> +        gl_Position = vec4(a);
> +}
> +
> +[fragment shader]
> +#ifdef GL_ES
> +precision mediump float;
> +#endif
> +#ifdef GL_ES
> +precision highp float;
> +#endif
> +
> +uniform float a;
> +
> +void main(void)
> +{
> +    gl_FragColor = vec4(a);
> +}
> +[test]
> +link success




More information about the Piglit mailing list