Reviewed-by: Lionel Landwerlin <[email protected]>

On 05/01/17 12:33, Timothy Arceri wrote:
This simple test exposes a bug in the GLSL IR optimisation pass in
Mesa master.
---
  .../glsl-1.10/execution/fs-max-max-max.shader_test | 32 ++++++++++++++++++++++
  1 file changed, 32 insertions(+)
  create mode 100644 tests/spec/glsl-1.10/execution/fs-max-max-max.shader_test

diff --git a/tests/spec/glsl-1.10/execution/fs-max-max-max.shader_test 
b/tests/spec/glsl-1.10/execution/fs-max-max-max.shader_test
new file mode 100644
index 0000000..47e0500
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/fs-max-max-max.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader passthrough]
+
+[fragment shader]
+
+uniform float u;
+uniform float u2;
+
+void main()
+{
+  float a = u;
+  float b = u2;
+
+  a = max(a, 0.35);
+  b = max(b, 0.35);
+
+  float c = max(a, b);
+
+  gl_FragColor = vec4(0.0, c, 0.0, 1.0);
+}
+
+[test]
+clear color 0.2 0.2 0.2 0.2
+clear
+
+uniform float u 0.1
+uniform float u2 0.1
+
+draw rect -1 -1 2 2
+probe all rgba 0.0 0.35 0.0 1.0


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

Reply via email to