diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2015-09-21 15:56:46 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2015-09-29 14:33:56 -0700 |
commit | 2d5448ac274ef42f7f1c52e968c14dfd759f2b76 (patch) | |
tree | 5296c7ebd3b7c93c92a2e373f6251b210ff69203 /tests | |
parent | a1640911a67ea95b9f41b83b88837f4e355b172b (diff) |
polygon-offset: Small bit of output refactoring
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Thanked-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/spec/gl-1.4/polygon-offset.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/spec/gl-1.4/polygon-offset.c b/tests/spec/gl-1.4/polygon-offset.c index 7fa801c98..9d639f7cc 100644 --- a/tests/spec/gl-1.4/polygon-offset.c +++ b/tests/spec/gl-1.4/polygon-offset.c @@ -518,11 +518,11 @@ check_slope_offsets(GLdouble* ideal_mrd_near) } /* check_slope_offsets */ static void -log_mrd(double mrd, GLint dbits) +log_mrd(const char *pre, double mrd, GLint dbits) { int bits; bits = (int)(0.5 + (pow(2.0, dbits) - 1.0) * mrd); - printf("%e (nominally %i %s)\n", mrd, bits, + printf("%s %e (nominally %i %s)\n", pre, mrd, bits, (bits == 1) ? "bit": "bits"); } /* log_mrd */ @@ -589,15 +589,10 @@ piglit_display(void) } glGetIntegerv(GL_DEPTH_BITS, &dbits); - printf("Ideal MRD at near plane is "); - log_mrd(ideal_mrd_near, dbits); - printf("Actual MRD at near plane is "); - log_mrd(actual_mrd_near, dbits); - printf("Ideal MRD at infinity is "); - log_mrd(ideal_mrd_far, dbits); - printf("Actual MRD at infinity is "); - log_mrd(actual_mrd_far, dbits); - printf("\n"); + log_mrd("Ideal MRD at near plane is", ideal_mrd_near, dbits); + log_mrd("Actual MRD at near plane is", actual_mrd_near, dbits); + log_mrd("Ideal MRD at infinity is", ideal_mrd_far, dbits); + log_mrd("Actual MRD at infinity is", actual_mrd_far, dbits); return pass ? PIGLIT_PASS : PIGLIT_FAIL; } |