On 20 June 2012 18:52, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>This test varifies that the coverage value set by glSampleCoverage() decides<br>
the number of samples in multisample buffer covered by an incoming fragment,<br>
which will receive the fragment data.<br>
<br>
</div><div>V2: Add the testing for glSampleCoverage() with coverage mask invert enabled<br>
    / disabled. Resolve the multisample FBO to a single sample FBO in place<br>
    of doing it on window system framebuffer. This fixes the color buffer<br>
    failures on NVIDIA due to sRGB.<br>
<br>
</div>V3: Add testing for coverage values which may result in dithering for all<br>
    sample counts. Dropping the testing for multisample depth buffer.<br>
<div><br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>><br>
---<br>
 tests/all.tests                                    |    6 +<br>
 .../ext_framebuffer_multisample/CMakeLists.gl.txt  |    1 +<br>
</div> .../sample-coverage.cpp                            |  420 ++++++++++++++++++++<br>
 3 files changed, 427 insertions(+), 0 deletions(-)<br>
<div> create mode 100644 tests/spec/ext_framebuffer_multisample/sample-coverage.cpp<br>
<br>
diff --git a/tests/all.tests b/tests/all.tests<br>
</div>index 754a7e5..5fdc9e7 100644<br>
--- a/tests/all.tests<br>
+++ b/tests/all.tests<br>
@@ -1385,6 +1385,12 @@ for num_samples in (2, 4, 8, 16, 32):<br>
<div>                 test_name)<br>
         ext_framebuffer_multisample[test_name] = PlainExecTest(executable)<br>
<br>
+for num_samples in (2, 4, 8, 16, 32):<br>
</div>+        test_name = ' '.join(['sample-coverage', str(num_samples)])<br>
<div>+        executable = 'ext_framebuffer_multisample-{0} -auto'.format(<br>
+                test_name)<br>
+        ext_framebuffer_multisample[test_name] = PlainExecTest(executable)<br>
+<br>
 ext_framebuffer_object = Group()<br>
 spec['EXT_framebuffer_object'] = ext_framebuffer_object<br>
 add_fbo_stencil_tests(ext_framebuffer_object, 'GL_STENCIL_INDEX1')<br>
diff --git a/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt b/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt<br>
</div>index 7e37787..c746328 100644<br>
--- a/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt<br>
+++ b/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt<br>
@@ -28,6 +28,7 @@ piglit_add_executable (ext_framebuffer_multisample-polygon-smooth common.cpp pol<br>
<div> piglit_add_executable (ext_framebuffer_multisample-renderbuffer-samples renderbuffer-samples.c)<br>
 piglit_add_executable (ext_framebuffer_multisample-renderbufferstorage-samples renderbufferstorage-samples.c)<br>
 piglit_add_executable (ext_framebuffer_multisample-samples samples.c)<br>
+piglit_add_executable (ext_framebuffer_multisample-sample-coverage common.cpp sample-coverage.cpp)<br>
 piglit_add_executable (ext_framebuffer_multisample-turn-on-off common.cpp turn-on-off.cpp)<br>
 piglit_add_executable (ext_framebuffer_multisample-unaligned-blit common.cpp unaligned-blit.cpp)<br>
 piglit_add_executable (ext_framebuffer_multisample-upsample common.cpp upsample.cpp)<br>
diff --git a/tests/spec/ext_framebuffer_multisample/sample-coverage.cpp b/tests/spec/ext_framebuffer_multisample/sample-coverage.cpp<br>
new file mode 100644<br>
</div>index 0000000..2f510c6<br>
--- /dev/null<br>
+++ b/tests/spec/ext_framebuffer_multisample/sample-coverage.cpp<br>
@@ -0,0 +1,420 @@<br>
<div><div>+/*<br>
+ * Copyright © 2012 Intel Corporation<br>
+ *<br>
+ * Permission is hereby granted, free of charge, to any person obtaining a<br>
+ * copy of this software and associated documentation files (the "Software"),<br>
+ * to deal in the Software without restriction, including without limitation<br>
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+ * and/or sell copies of the Software, and to permit persons to whom the<br>
+ * Software is furnished to do so, subject to the following conditions:<br>
+ *<br>
+ * The above copyright notice and this permission notice (including the next<br>
+ * paragraph) shall be included in all copies or substantial portions of the<br>
+ * Software.<br>
+ *<br>
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL<br>
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS<br>
+ * IN THE SOFTWARE.<br>
+ */<br>
+<br>
+#include "common.h"<br>
+<br>
+/**<br>
+ * \file sample-coverage.cpp<br>
+ *<br>
</div></div>+ * Verify glSampleCoverage() with and without coverage mask invert.<br>
+ *<br>
+ * This test operates by drawing a test pattern to multisample_fbo with<br>
<div>+ * GL_SAMPLE_COVERAGE disabled.<br>
+ *<br>
</div>+ * Blit the multisample_fbo to top half of window system framebuffer. This<br>
+ * is used as reference image to visually compare the difference caused by<br>
+ * sample coverage value.<br>
<div>+ *<br>
+ * Compute the expected color values based on the coverage value used to<br>
</div>+ * draw the test pattern and status of coverage mask invert flag.<br>
+ *<br>
+ * Clear the multisample framebuffer to a unique color. Draw the<br>
+ * same test pattern in multisample buffer with GL_SAMPLE_COVERAGE enabled.<br>
+ * Resolve the multisample FBO by  blitting it to a single sample FBO. Blit<br>
+ * the resolve_fbo to bottom half of window system framebuffer. This is our<br>
+ * test image.<br>
+ *<br>
+ * Probe the rectangles in bottom half of window system framebuffer and<br>
+ * compare with expected color values. OpenGL 3.0 specification intends<br>
+ * to allow (but not require) the implementation to produce a dithering<br>
+ * effect when the coverage value is not a strict multiple of 1/num_samples.<br>
+ * We will skip computing expected values and probing for such rectangles.<br>
+ * They are drawn just to look for dithering by human inspection.<br>
+ *<br>
+ * Repeat the above testing with coverage mask invert enabled / disabled.<br>
+ *<br>
+ * Note: glSampleCoverage() takes effect in the graphics pipeline before<br>
+ * the point where the output of the fragment shader is split into the<br>
+ * various buffers. So it's very likely that if glSampleCoverage() works<br>
+ * properly for color buffers, it will work properly for depth and stencil<br>
+ * buffers too.<br>
<div>+ *<br>
+ * Author: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>><br>
+ */<br>
+<br>
+int piglit_width = 512; int piglit_height = 256;<br>
</div>+int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA;<br></blockquote><div><br>FYI, because of commit 29bbf12, this needs to change to<br><br>PIGLIT_GL_TEST_MAIN(<br>    512 /*window_width*/,<br>    256 /*window_height*/,<br>

    GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA)<br><br>See Chad's email "NOTICE: piglit_{width, height, window_mode} are no longer used".<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

+const int pattern_width = 512; const int pattern_height = 128;<br>
<div>+<br>
+static Fbo ms_fbo, resolve_fbo;<br>
</div>+static GLbitfield buffer_to_test;<br>
+<br>
+static float *cov = NULL;<br>
+static float *color = NULL;<br>
+static float *expected = NULL;<br>
+<br>
+static int num_samples;<br>
+static int num_rects;<br>
+static int prog;<br>
+static int color_loc;<br>
+static int depth_loc;<br>
+<br>
+static const float bg_color[4] = { 0.4, 0.6, 0.0, 0.8 };<br>
<div><div>+<br>
+static const char *vert =<br>
+       "#version 130\n"<br>
+       "in vec2 pos;\n"<br>
+       "uniform float depth;\n"<br>
+       "void main()\n"<br>
+       "{\n"<br>
+       "  vec4 eye_pos = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);\n"<br>
+       "  gl_Position = vec4(eye_pos.xy, depth, 1.0);\n"<br>
+       "}\n";<br>
+<br>
+static const char *frag =<br>
+       "#version 130\n"<br>
+       "uniform vec4 color;\n"<br>
+       "void main()\n"<br>
+       "{\n"<br>
+       "  gl_FragColor = color;\n"<br>
+       "}\n";<br>
+<br>
+void<br>
+shader_compile()<br>
+{<br>
+       /* Compile program */<br>
+       GLint vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vert);<br>
+       GLint fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, frag);<br>
+       prog = piglit_link_simple_program(vs, fs);<br>
+<br>
+       if (!piglit_link_check_status(prog)) {<br>
+               piglit_report_result(PIGLIT_FAIL);<br>
+       }<br>
+<br>
+       glBindAttribLocation(prog, 0, "pos");<br>
+       glEnableVertexAttribArray(0);<br>
+<br>
+       /* Set up uniforms */<br>
+       glUseProgram(prog);<br>
+       color_loc = glGetUniformLocation(prog, "color");<br>
+       depth_loc = glGetUniformLocation(prog, "depth");<br>
+}<br>
+<br>
+void<br>
+draw_pattern(bool sample_coverage, bool coverage_invert)<br>
+{<br>
</div></div>+       glUseProgram(prog);<br>
<div>+       glClearColor(bg_color[0], bg_color[1],<br>
+                    bg_color[2], bg_color[3]);<br>
+<br>
+       glClear(buffer_to_test);<br>
+       if (sample_coverage)<br>
+               glEnable (GL_SAMPLE_COVERAGE);<br>
+<br>
</div>+       unsigned int indices[6] = {0, 1, 2, 0, 2, 3};<br>
+<br>
+       for (int i = 0; i < num_rects; ++i) {<br>
+<br>
+               float vertex_data[4][2] = {<br>
+               { 0.0f + i * (pattern_width / num_rects),   0.0f           },<br>
+               { 0.0f + i * (pattern_width / num_rects),   pattern_height },<br>
+               { (i + 1.0f) * (pattern_width / num_rects), pattern_height },<br>
+               { (i + 1.0f) * (pattern_width / num_rects), 0.0f           } };<br>
<div>+<br>
+               glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE,<br>
</div>+                                     sizeof(vertex_data[0]),<br>
<div>+                                     (void *) vertex_data);<br>
+<br>
</div>+               if(sample_coverage) {<br>
<div>+                       if(coverage_invert)<br>
+                               glSampleCoverage (cov[i], GL_TRUE);<br>
+                       else<br>
+                               glSampleCoverage (cov[i], GL_FALSE);<br>
+               }<br>
+<br>
</div>+               glUniform4fv(color_loc, 1, (color + i * 4));<br>
+               glUniform1f(depth_loc, 0.0f);<br>
+               glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT,<br>
+                              (void *) indices);<br>
<div>+       }<br>
+       if(sample_coverage)<br>
+               glDisable (GL_SAMPLE_COVERAGE);<br>
+}<br>
+<br>
+void<br>
+print_usage_and_exit(char *prog_name)<br>
+{<br>
</div>+       printf("Usage: %s <num_samples>\n", prog_name);<br>
<div>+       piglit_report_result(PIGLIT_FAIL);<br>
+}<br>
+<br>
+void<br>
+compute_expected(bool coverage_invert)<br>
+{<br>
+       int i, j;<br>
</div>+       float coverage[num_rects];<br>
+<br>
+       /* Sample coverage doesn't affect single sample FBO */<br>
+       if(num_samples == 0) {<br>
+               for(i = 0; i < 4; i++)<br>
+                       expected[i] = color[i];<br>
+               return;<br>
+       }<br>
+<br>
+       if(coverage_invert) {<br>
+               for (i = 0; i < num_rects; i++)<br>
<div>+                       coverage[i] = 1 - cov[i];<br>
+       }<br>
+       else<br>
</div>+               for (i = 0; i < num_rects; i++)<br>
<div>+                       coverage[i] = cov[i];<br>
+<br>
</div>+       /* Coverage value decides the number of samples in multisample buffer<br>
+        * covered by an incoming fragment, which will then receive the fragment<br>
<div>+        * data. When the multisample buffer is resolved it will be blended<br>
+        * with the background color which will be written to the remaining<br>
+        * samples.<br>
+        * Page 254 (page 270 of the PDF) of the OpenGL 3.0 spec says:<br>
+        * "The method of combination is not specified, though a simple average<br>
+        * computed independently for each color component is recommended."<br>
+        */<br>
+       if(buffer_to_test == GL_COLOR_BUFFER_BIT) {<br>
</div>+               for (i = 0; i < num_rects; i++) {<br>
+<br>
+                       float samples_used = coverage[i] * num_samples;<br>
+                       /* Exepected color values are computed only for integer<br>
+                        * number of samples_used<br>
+                        */<br>
+                       if(samples_used == (int)samples_used) {<br>
+<br>
+                               for(j =0; j < 4; j++)<br>
+                                       expected[i * 4 + j] =<br>
+                                       color[i * 4 + j] * coverage[i] +<br>
<div>+                                       bg_color[j] * (1 - coverage[i]);<br>
+                       }<br>
+               }<br>
+       }<br>
</div>+}<br>
+<br>
+bool<br>
+probe_framebuffer_color(bool coverage_invert)<br>
<div>+{<br>
+       bool result = true;<br>
</div>+       float coverage[num_rects];<br>
+<br>
+       if(coverage_invert) {<br>
+               for (int i = 0; i < num_rects; i++)<br>
<div>+                       coverage[i] = 1 - cov[i];<br>
+       }<br>
+       else<br>
</div>+               for (int i = 0; i < num_rects; i++)<br>
<div>+                       coverage[i] = cov[i];<br>
+<br>
</div>+       glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);<br>
+<br>
+       for (int i = 0; i < num_rects; i++) {<br>
+               float samples_used = coverage[i] * num_samples;<br>
+<br>
+               /* Only probe rectangles with coverage value which is a strict<br>
+                *  multiple of 1 / num_samples.<br>
+                */<br>
+               if(samples_used == (int)samples_used) {<br>
+                       result = piglit_probe_rect_rgba(<br>
+                                i * (pattern_width / num_rects),<br>
+                                0,<br>
+                                pattern_width / num_rects,<br>
+                                pattern_height,<br>
+                                expected + i * 4)<br>
<div>+                                && result;<br>
+               }<br>
+       }<br>
</div><div>+       return result;<br>
+}<br>
+<br>
+bool<br>
+test_sample_coverage(bool coverage_invert)<br>
+{<br>
+       bool result = true;<br>
+       compute_expected(coverage_invert);<br>
+<br>
</div>+       /* Now draw test pattern in multisample ms_fbo with GL_SAMPLE_COVERAGE<br>
+        * enabled<br>
<div>+        */<br>
+       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, ms_fbo.handle);<br>
</div>+       draw_pattern(true /* sample_coverage */ , coverage_invert);<br>
<div>+<br>
+       /* Blit ms_fbo to resolve_fbo to resolve multisample buffer */<br>
+       glBindFramebuffer(GL_READ_FRAMEBUFFER, ms_fbo.handle);<br>
+       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, resolve_fbo.handle);<br>
+       glBlitFramebuffer(0, 0, pattern_width, pattern_height,<br>
+                         0, 0, pattern_width, pattern_height,<br>
+                         buffer_to_test, GL_NEAREST);<br>
+<br>
</div>+       /* Blit resolve_fbo to the bottom half of window system framebuffer.<br>
<div>+        * This is the test image.<br>
+        */<br>
+       glBindFramebuffer(GL_READ_FRAMEBUFFER, resolve_fbo.handle);<br>
+       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);<br>
+       glBlitFramebuffer(0, 0, pattern_width, pattern_height,<br>
+                         0, 0, pattern_width, pattern_height,<br>
+                         buffer_to_test, GL_NEAREST);<br>
+<br>
</div>+       /* Probe the bottom half of default framebuffer and compare to the<br>
<div>+        * expected values */<br>
+       if (buffer_to_test == GL_COLOR_BUFFER_BIT)<br>
</div>+               result = probe_framebuffer_color(coverage_invert) && result;<br>
<div>+<br>
+       result = piglit_check_gl_error(GL_NO_ERROR) && result;<br>
+       return result;<br>
+}<br>
+<br>
+void<br>
</div>+allocate_data_arrays(void)<br>
+{<br>
+       /* Draw 2N + 1 rectangles for N samples, each with a unique color<br>
+        * and coverage value<br>
+        */<br>
+       num_rects = 2 * num_samples + 1;<br>
+<br>
+       /* Allocate data arrays based on number of samples used */<br>
+       color = (float *) malloc(num_rects * 4 * sizeof(float));<br>
+       cov = (float *) malloc(num_rects * sizeof(float));<br>
+       expected = (float *) malloc(num_rects * 4 * sizeof(float));<br>
+<br>
+       for(int i = 0; i < num_rects; i++) {<br>
+               /* Randomly select color for each rectangle */<br>
+               color[i * 4 + 0] = (rand() % 1000) * .001;<br>
+               color[i * 4 + 1] = (rand() % 1000) * .001;<br>
+               color[i * 4 + 2] = (rand() % 1000) * .001;<br>
+               color[i * 4 + 3] = (rand() % 1000) * .001;<br></blockquote><div><br>Generally I try to shy away from piglit tests that call rand(), because they don't always have reproducible results.  I don't think it's going to be a problem for this test, but in the future you might want to consider something deteministic.  For example, you could do something like this:<br>
<br>color[i * 4 + 0] = (sin(i * 4 + 0)+1)/2;<br>color[i * 4 + 1] = (sin(i * 4 + 1)+1)/2;<br>color[i * 4 + 2] = (sin(i * 4 + 2)+1)/2;<br>color[i * 4 + 3] = (sin(i * 4 + 3)+1)/2;<br><br>But I won't make a fuss about it if you want to leave it as is.<br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
+               cov[i] = i * (1.0 / (2 * num_samples));<br>
+       }<br>
+}<br>
+<br>
+void<br>
+free_data_arrays(void)<br>
+{<br>
+       if(color != NULL) {<br>
+               free(color);<br>
+               color = NULL;<br>
+       }<br>
+       if(cov != NULL) {<br>
+               free(cov);<br>
+               cov = NULL;<br>
+       }<br>
+       if(expected != NULL) {<br>
+               free(expected);<br>
+               expected = NULL;<br>
+       }<br>
+}<br>
<div>+<br>
+void<br>
+piglit_init(int argc, char **argv)<br>
+{<br>
</div>+       int samples;<br>
+       if (argc < 2)<br>
<div>+               print_usage_and_exit(argv[0]);<br>
+       {<br>
+               char *endptr = NULL;<br>
</div>+               samples = strtol(argv[1], &endptr, 0);<br>
<div>+               if (endptr != argv[1] + strlen(argv[1]))<br>
+                       print_usage_and_exit(argv[0]);<br>
+       }<br>
+<br>
+       piglit_require_gl_version(30);<br>
</div>+       piglit_ortho_projection(pattern_width, pattern_height, GL_TRUE);<br>
+<br>
+       /* Skip the test if samples > GL_MAX_SAMPLES */<br>
<div>+       GLint max_samples;<br>
+       glGetIntegerv(GL_MAX_SAMPLES, &max_samples);<br>
+<br>
</div>+       if (samples > max_samples)<br>
+               piglit_report_result(PIGLIT_SKIP);<br>
+<br>
+       /* Setup frame buffer objects with required configuration */<br>
+       ms_fbo.setup(FboConfig(samples, pattern_width, pattern_height));<br>
<div>+       resolve_fbo.setup(FboConfig(0, pattern_width, pattern_height));<br>
+<br>
</div>+       if (!piglit_check_gl_error(GL_NO_ERROR)) {<br>
+               printf("Error setting up frame buffer objects\n");<br>
+                       piglit_report_result(PIGLIT_FAIL);<br>
+       }<br>
+<br>
+       /* Query the number of samples used in ms_fbo. OpenGL implementation<br>
+        * may create FBO with more samples per pixel than what is requested.<br>
+        */<br>
+       glBindRenderbuffer(GL_RENDERBUFFER, ms_fbo.color_rb);<br>
+       glGetRenderbufferParameteriv(GL_RENDERBUFFER,<br>
+                                    GL_RENDERBUFFER_SAMPLES,<br>
+                                    &num_samples);<br>
<div>+<br>
+       buffer_to_test = GL_COLOR_BUFFER_BIT;<br>
</div>+       shader_compile();<br>
<div>+}<br>
+<br>
+enum piglit_result<br>
+piglit_display()<br>
+{<br>
+       bool pass = true;<br>
</div>+       allocate_data_arrays();<br>
<div>+<br>
+       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);<br>
+       glClearColor(0.0, 0.0, 0.0, 1.0);<br>
</div>+       glClear(buffer_to_test);<br>
<div>+<br>
+       /* Draw test pattern in  multisample ms_fbo with GL_SAMPLE_COVERAGE<br>
+        * disabled.<br>
+        */<br>
+       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, ms_fbo.handle);<br>
+       ms_fbo.set_viewport();<br>
</div>+       draw_pattern(false /* sample_coverage */,<br>
+                    false /* coverage_invert */ );<br>
+<br>
+       /* Blit ms_fbo to the top half of window system framebuffer. This<br>
+        * is our reference image to visually compare the effect of MSAA with<br>
+        * sample coverage.<br>
<div>+        */<br>
+       glBindFramebuffer(GL_READ_FRAMEBUFFER, ms_fbo.handle);<br>
+       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);<br>
+       glBlitFramebuffer(0, 0,<br>
</div>+                         pattern_width, pattern_height,<br>
+                         0, pattern_height,<br>
+                         pattern_width, 2 * pattern_height,<br>
<div>+                         buffer_to_test, GL_NEAREST);<br>
+<br>
+       /* Test with coverage_invert = false */<br>
+       pass = test_sample_coverage(false) && pass;<br>
+<br>
+       /* Test with coverage_invert = true */<br>
+       pass = test_sample_coverage(true) && pass;<br></div></blockquote><div><br>What's unfortunate about this is that the user only gets to see the results of test_sample_coverage(true).  Could we add a command-line parameter to choose between testing "inverted" and "non-inverted" modes?  Or, alternatively, make the output window taller so that then reference image, the inverted output, and the non-inverted outputs can all be seen at the same time?<br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
+<br>
</div>+       /* Free the memory allocated for data arrays */<br>
+       free_data_arrays();<br>
<div><div>+<br>
+       if (!piglit_automatic &&<br>
+           buffer_to_test != GL_DEPTH_BUFFER_BIT)<br>
+               piglit_present_results();<br>
+<br>
+       return pass ? PIGLIT_PASS : PIGLIT_FAIL;<br>
+}<br>
--<br>
1.7.7.6<br>
<br>
</div></div></blockquote></div><br>My suggestions are pretty nit-picky, so regardless of whether you take my suggestions, you can consider this patch<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>