[Piglit] [PATCH] glsl: test for sampling using same unit but different uniform

Chad Versace chad.versace at intel.com
Tue Jan 6 09:57:35 PST 2015


On 10/15/2014 04:36 AM, Tapani Pälli wrote:

Reviewed-by: Chad Versace <chad.versace at intel.com>

> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  ...fs-texture-uniforms-share-same-unit.shader_test | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>  create mode 100644 tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test
> 
> diff --git a/tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test b/tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test
> new file mode 100644
> index 0000000..4808577
> --- /dev/null
> +++ b/tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test
> @@ -0,0 +1,24 @@
> +[require]
> +GLSL >= 1.10
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +
> +uniform sampler2D tex0;
> +uniform sampler2D tex1;
> +
> +void main()
> +{
> +	// 2 samples using same unit but different uniform
> +	vec4 a = texture2D(tex0, vec2(0.0, 0.0));
> +	vec4 b = texture2D(tex1, vec2(0.0, 0.5));
> +	gl_FragColor = mix(a, b, 0.5);
> +}
> +
> +[test]
> +uniform int tex0 0
> +uniform int tex1 0
> +texture rgbw 0 (8, 8)
> +draw rect -1 -1 2 2
> +relative probe rgb (0.25, 0.25) (0.5, 0.0, 0.5)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150106/6b227391/attachment.sig>


More information about the Piglit mailing list