[Piglit] [PATCH] textureSize: try retrieving multiple components to tickle a driver bug

Ilia Mirkin imirkin at alum.mit.edu
Sat Apr 21 22:34:50 UTC 2018


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 <imirkin at alum.mit.edu>
---
 .../execution/fs-textureSize-components.shader_test  | 20 ++++++++++++++++++++
 1 file changed, 20 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..d4671a7f3
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/fs-textureSize-components.shader_test
@@ -0,0 +1,20 @@
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main() { gl_Position = gl_Vertex; }
+
+[fragment shader]
+#version 130
+uniform sampler2D tex;
+void main()
+{
+    gl_FragColor = vec4(0,float(textureSize(tex, 0).x) / float(textureSize(tex, 0).y),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
+relative probe rgb (0.75, 0.75) (0.0, 1.0, 0.0)
-- 
2.16.1



More information about the Piglit mailing list