Nouveau does not merge the multiple requests together into one, which
leads to an interesting pattern on nv50 (since dst reg == src reg) where
we accidentally overwrite things we aren't supposed to.

Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>
---

v1 -> v2:
  - use passthrough vs
  - switch up the condition slightly to make it more likely to test for
    just the condition it's checking for and not some rcp imprecision.

 .../execution/fs-textureSize-components.shader_test    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 
tests/spec/glsl-1.30/execution/fs-textureSize-components.shader_test

diff --git 
a/tests/spec/glsl-1.30/execution/fs-textureSize-components.shader_test 
b/tests/spec/glsl-1.30/execution/fs-textureSize-components.shader_test
new file mode 100644
index 000000000..679cd60e4
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/fs-textureSize-components.shader_test
@@ -0,0 +1,18 @@
+[require]
+GLSL >= 1.30
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 130
+uniform sampler2D tex;
+void main()
+{
+    gl_FragColor = vec4(0,abs(1.0 - float(textureSize(tex, 0).x) / 
float(textureSize(tex, 0).y)) < 0.01,0,1);
+}
+
+[test]
+texture checkerboard 0 0 (1024, 1024) (0.0, 0.0, 0.0, 0.0) (0.0, 0.0, 0.0, 0.0)
+uniform int tex 0
+draw rect -1 -1 2 2
+probe all rgba 0 1 0 1
-- 
2.16.1

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to