diff options
Diffstat (limited to 'tests/general/depth-clear-precision-check.c')
-rw-r--r-- | tests/general/depth-clear-precision-check.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/general/depth-clear-precision-check.c b/tests/general/depth-clear-precision-check.c index 318df08d1..c2fc3573c 100644 --- a/tests/general/depth-clear-precision-check.c +++ b/tests/general/depth-clear-precision-check.c @@ -34,6 +34,8 @@ const struct piglit_subtest subtests[]; enum piglit_result test(void *data); static struct piglit_gl_test_config *piglit_config; +#define ftoh(x) (piglit_float_from_half(piglit_half_from_float(x))) + PIGLIT_GL_TEST_CONFIG_BEGIN piglit_config = &config; @@ -217,6 +219,9 @@ test(void *data) assert(maxStoreableValue * fdepth == depth); + if (numOfBits < 32) + fdepth = ftoh(depth / (float)maxStoreableValue); + pass = check_color(fdepth); if (!pass) { |