[Piglit] [PATCH 2/2] multisample-accuracy: Relax the accuracy threshold
Neil Roberts
neil at linux.intel.com
Fri Oct 23 07:34:10 PDT 2015
With 16x MSAA on the i965 driver the accuracy test was failing. It is
possible to fix it by shifting the position of the supersampling grid
in the reference image down and left by 1/16th of a pixel so that the
multisample positions used in the hardware coincide with those of the
supersampling grid. However that causes the test to start failing on
nvidia, which presumably is using multisample positions with different
offsets. Considering that the offset of the supersampling grid within
the pixel is fairly arbitrary, this seems like a good indication that
the accuracy requirements are just too strict. This patch therefore
relaxes them a bit so that the tests will pass on i965. The threshold
values are now:
Samples RMS on i965 Old threshold New threshold
1 0.260342 0.333 0.333
2 0.167928 0.1998 0.20646
4 0.096357 0.11988 0.1280052
8 0.060891 0.071928 0.079363224
16 0.046271 0.0431568 0.0492051989
This maintains the property for i965 that if it accidentally uses a
sample count that is less than requested then the threshold will still
be low enough that the RMS for the previous sample count will cause a
test failure.
---
tests/spec/ext_framebuffer_multisample/common.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/spec/ext_framebuffer_multisample/common.cpp b/tests/spec/ext_framebuffer_multisample/common.cpp
index fb42cc5..735bcc5 100644
--- a/tests/spec/ext_framebuffer_multisample/common.cpp
+++ b/tests/spec/ext_framebuffer_multisample/common.cpp
@@ -542,12 +542,12 @@ Test::measure_accuracy()
* about 0.25, and each additional factor of 2
* overampling reduces the error by a factor of about
* 0.6. Leaving some room for variation, we'll set
- * the error threshold to 0.333 * 0.6 ^
+ * the error threshold to 0.333 * 0.62 ^
* log2(num_samples).
*/
int effective_num_samples = num_samples == 0 ? 1 : num_samples;
error_threshold = 0.333 *
- pow(0.6, log((double)effective_num_samples) / log(2.0));
+ pow(0.62, ffs(effective_num_samples) - 1);
}
/* The unlit and totally_lit stats are supposed to count the
--
1.9.3
More information about the Piglit
mailing list