[Piglit] [PATCH] glsl-fs-lots-of-tex: use a value that is more likely to become 3

Ilia Mirkin imirkin at alum.mit.edu
Fri Jan 10 13:09:09 PST 2014


The test relies on 0.01 being rounded to 3 in the uniform int texture.
However on NVIDIA hardware when using a 2D blit, 2.55 becomes 2, and so
the test fails. I don't see anything in the OpenGL spec that guarantees
any specific rounding logic (e.g. OpenGL 4.4 section 2.3.4.2) when
converting, so this adjusts the value to 0.011 which does get rounded to
3 on both nv50 and nvc0.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 tests/shaders/glsl-fs-lots-of-tex.shader_test | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shaders/glsl-fs-lots-of-tex.shader_test b/tests/shaders/glsl-fs-lots-of-tex.shader_test
index a31778f..a05d475 100644
--- a/tests/shaders/glsl-fs-lots-of-tex.shader_test
+++ b/tests/shaders/glsl-fs-lots-of-tex.shader_test
@@ -40,6 +40,6 @@ void main()
 [test]
 uniform int tex 0
 uniform vec4 cst 0.0 0.0 0.0 0.0
-texture checkerboard 0 0 (8, 8) (0.01, 0.0, 0.0, 0.0) (0.01, 0.0, 0.0, 0.0)
+texture checkerboard 0 0 (8, 8) (0.011, 0.0, 0.0, 0.0) (0.011, 0.0, 0.0, 0.0)
 draw rect -1 -1 2 2
 relative probe rgb (0.75, 0.75) (0.4, 0.0, 0.0)
-- 
1.8.3.2



More information about the Piglit mailing list