[Piglit] [PATCH 06/16] msaa/formats: Compare integer formats properly.
Paul Berry
stereotype441 at gmail.com
Fri Jun 15 08:32:26 PDT 2012
This patch adapts the MSAA "formats" test to use
piglit_compare_images_color() to check pass/fail instead of
piglit_probe_image_color(). This will allow integer formats to be
tested.
---
tests/spec/ext_framebuffer_multisample/formats.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/spec/ext_framebuffer_multisample/formats.cpp b/tests/spec/ext_framebuffer_multisample/formats.cpp
index fc8d2a5..b54cda7 100644
--- a/tests/spec/ext_framebuffer_multisample/formats.cpp
+++ b/tests/spec/ext_framebuffer_multisample/formats.cpp
@@ -457,11 +457,14 @@ test_format(const struct format_desc *format)
format->base_internal_format);
/* Check that the test image was correct */
- glBindFramebuffer(GL_READ_FRAMEBUFFER,
- test_renderer.fbo_downsampled.handle);
- pass = piglit_probe_image_color(0, 0, pattern_width, pattern_height,
- format->base_internal_format,
- expected_image) && pass;
+ unsigned num_components =
+ piglit_num_components(format->base_internal_format);
+ float tolerance[4];
+ piglit_compute_probe_tolerance(format->base_internal_format,
+ tolerance);
+ pass = piglit_compare_images_color(0, 0, pattern_width, pattern_height,
+ num_components, tolerance,
+ expected_image, test_image);
/* Show both the test and expected images on screen so that
* the user can diagnose problems.
--
1.7.7.6
More information about the Piglit
mailing list