[Piglit] [PATCH 6/8] shader_runner: Add support for adjusting the probe tolerance.
Kenneth Graunke
kenneth at whitecape.org
Wed Apr 4 01:51:27 PDT 2012
Sometimes you just can't rely on the GPU to give the default level of
precision. It's useful to be able to adjust this.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
tests/shaders/shader_runner.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index d5cc220..2d5c52d 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -42,6 +42,8 @@
int piglit_width = 250, piglit_height = 250;
int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE;
+extern float piglit_tolerance[4];
+
static float gl_version = 0.0;
static float glsl_version = 0.0;
static int gl_max_fragment_uniform_components;
@@ -1254,6 +1256,8 @@ piglit_display(void)
pass = pass &&
piglit_probe_rect_rgb(0, 0, piglit_width,
piglit_height, c);
+ } else if (string_match("tolerance", line)) {
+ get_floats(line + strlen("tolerance"), piglit_tolerance, 4);
} else if (string_match("shade model smooth", line)) {
glShadeModel(GL_SMOOTH);
} else if (string_match("shade model flat", line)) {
--
1.7.7.6
More information about the Piglit
mailing list