On 12/08/2015 11:49 AM, Ilia Mirkin wrote:
On Tue, Dec 8, 2015 at 1:28 PM, Brian Paul <[email protected]> wrote:
On 12/08/2015 10:57 AM, Ilia Mirkin wrote:

Signed-off-by: Ilia Mirkin <[email protected]>
---
   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/ ?

Sure, happy to move it. I had a similar feeling, but wasn't sure where
to stick this... it's not testing functionality of any particular
version of anything.

I suggested tests/spec/glsl-1.20/execution/ since the shader file says GLSL >= 1.20

-Brian



   -ilia


-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



_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to