[Piglit] [PATCH] add test for kepler texture waw hazard

Brian Paul brianp at vmware.com
Tue Dec 8 10:28:35 PST 2015


On 12/08/2015 10:57 AM, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>   tests/bugs/texture-waw-hazard.shader_test | 36 +++++++++++++++++++++++++++++++

I thought we were trying to get away from putting things in tests/bugs/.

How about tests/spec/glsl-1.20/execution/ ?

-Brian

>   1 file changed, 36 insertions(+)
>   create mode 100644 tests/bugs/texture-waw-hazard.shader_test
>
> diff --git a/tests/bugs/texture-waw-hazard.shader_test b/tests/bugs/texture-waw-hazard.shader_test
> new file mode 100644
> index 0000000..7af0d87
> --- /dev/null
> +++ b/tests/bugs/texture-waw-hazard.shader_test
> @@ -0,0 +1,36 @@
> +# This test triggers a WaW situation on Kepler+, where the color
> +# output is stored in registers $r0..$r3, and if the texture results
> +# are also stored there, we might forget a barrier before overwriting
> +# those registers with the green color value.
> +[require]
> +GLSL >= 1.20
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 120
> +uniform sampler2D tex;
> +uniform bool false_val = false;
> +
> +void main()
> +{
> +	vec4 tex = texture2D(tex, vec2(0));
> +	if (false_val) {
> +		// Make sure that the texbar ends up in the false
> +		// branch. A plain copy might get optimized into
> +		// something that happens to work out.
> +		gl_FragColor = 0.5 * tex;
> +	} else {
> +		gl_FragColor = vec4(0, 1, 0, 1);
> +	}
> +}
> +
> +[test]
> +texture rgbw 0 ( 8 , 8 )
> +
> +clear color 0.1 0.1 0.1 0.1
> +clear
> +
> +uniform int tex 0
> +draw rect -1 -1 2 2
> +probe all rgba 0 1 0 1
>



More information about the Piglit mailing list