On 6 June 2012 19:30, Paul Berry <span dir="ltr"><<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@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 class="gmail_quote"><div class="im">On 6 June 2012 17:52, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Tue, Jun 5, 2012 at 5:03 PM, Paul Berry <<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>> wrote:<br>
> This test builds on the existing FBO and MSAA testing infrastructure<br>
> to verify proper functioning of MSAA for various formats.<br>
><br>
> All core formats which are framebufferbuffer complete are tested. All<br>
> formats which are not framebuffer complete are skipped.<br>
><br>
> Tests for non-core and depth/stencil formats will be added in later<br>
> patches.<br>
><br>
> Verified using the proprietary nVidia driver for Linux--all formats<br>
> pass except the LUMINANCE_ALPHA formats, which fail due to a driver<br>
> bug (when rendering to these formats, the nVidia driver maps the red<br>
> channel to both luminance and alpha, instead of mapping red to<br>
> luminance and alpha to alpha).<br>
<br>
</div>Paul, On AMD's catalyst driver test fails for formats other than<br>
LUMINANCE_ALPHA.<br>
Here is the test out put: <a href="http://pastebin.com/YxJGBKGh" target="_blank">http://pastebin.com/YxJGBKGh</a><br>
<br>
Most of these failures are due to mismatch in luminance and intensity<br>
values. I'm not sure what's the cause.<br></blockquote><div><br></div></div><div>Will you have your Catalyst system at work tomorrow? I'd like to investigate.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Just loosen up the tolerance to fix failures in GL_RGBA2 and GL_RGBA4.<br></blockquote><div><br></div></div><div>That's especially surprising, since the test already attempts to set the correct tolerance based on the bit depth reported by GL_FRAMEBUFFER_ATTACHMENT_{RED|GREEN|BLUE|ALPHA}_SIZE. Let's have a look at this tomorrow too.</div>
<div><div class="h5">
<div> </div></div></div></div></blockquote><div><br>Just to keep the list updated, Anuj and I investigated this morning, and both of these issues appear to be bugs in the Catalyst driver. For luminance, luminance/alpha and intensity formats, the driver is producing images that are far brighter than it should. For the RGBA2 and RGBA4 formats, the driver is reporting 0 bits of alpha when in fact there are probably 4, causing the piglit test to set an incorrect tolerance.<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 class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
> ---<br>
> tests/all.tests | 6 +<br>
> .../ext_framebuffer_multisample/CMakeLists.gl.txt | 1 +<br>
> tests/spec/ext_framebuffer_multisample/formats.cpp | 441 ++++++++++++++++++++<br>
> 3 files changed, 448 insertions(+), 0 deletions(-)<br>
><br>
> diff --git a/tests/all.tests b/tests/all.tests<br>
> index 93716a8..129a923 100644<br>
> --- a/tests/all.tests<br>
> +++ b/tests/all.tests<br>
> @@ -1373,6 +1373,12 @@ for num_samples in (2, 4, 8, 16, 32):<br>
> test_name)<br>
> ext_framebuffer_multisample[test_name] = PlainExecTest(executable)<br>
><br>
> +for num_samples in (2, 4, 8, 16, 32):<br>
> + test_name = ' '.join(['formats', str(num_samples)])<br>
> + 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>
> index 155190f..1660067 100644<br>
> --- a/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt<br>
> +++ b/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt<br>
> @@ -11,6 +11,7 @@ link_libraries (<br>
><br>
> piglit_add_executable (ext_framebuffer_multisample-accuracy common.cpp accuracy.cpp)<br>
> piglit_add_executable (ext_framebuffer_multisample-dlist dlist.c)<br>
> +piglit_add_executable (ext_framebuffer_multisample-formats common.cpp formats.cpp)<br>
> piglit_add_executable (ext_framebuffer_multisample-line-smooth common.cpp line-smooth.cpp)<br>
> piglit_add_executable (ext_framebuffer_multisample-minmax minmax.c)<br>
> piglit_add_executable (ext_framebuffer_multisample-multisample-blit common.cpp multisample-blit.cpp)<br>
> diff --git a/tests/spec/ext_framebuffer_multisample/formats.cpp b/tests/spec/ext_framebuffer_multisample/formats.cpp<br>
> new file mode 100644<br>
> index 0000000..18f1e21<br>
> --- /dev/null<br>
> +++ b/tests/spec/ext_framebuffer_multisample/formats.cpp<br>
> @@ -0,0 +1,441 @@<br>
> +/*<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>
> +/**<br>
> + * \file formats.cpp<br>
> + *<br>
> + * Verify the proper functioning of multisample antialiasing for all<br>
> + * possible buffer formats.<br>
> + *<br>
> + * This test operates by rendering an MSAA image twice: once in a<br>
> + * standard RGBA buffer (the behaviour of which is well tested by the<br>
> + * other MSAA tests), and once in a buffer with some other format.<br>
> + * Then it blits both images to corresponding single-sample buffers<br>
> + * and uses glReadPixels to make sure the same image was drawn in both<br>
> + * cases (to within the expected tolerance considering the bit depth<br>
> + * of the two images).<br>
> + *<br>
> + * Finally, the images that were compared are drawn on screen to make<br>
> + * it easier to diagnose failures.<br>
> + */<br>
> +<br>
> +#include "common.h"<br>
> +#include "../../fbo/fbo-formats.h"<br>
> +<br>
> +int piglit_width = 512, piglit_height = 256;<br>
> +int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA;<br>
> +<br>
> +namespace {<br>
> +<br>
> +const int pattern_width = 256; const int pattern_height = 256;<br>
> +<br>
> +int num_samples;<br>
> +<br>
> +TestPattern *test_pattern;<br>
> +<br>
> +<br>
> +/**<br>
> + * This class encapsulates the code necessary to draw the test pattern<br>
> + * in either the reference GL_RGBA format or the format under test,<br>
> + * downsample it, read the rendered pixels into memory, and draw a<br>
> + * visualization of the result.<br>
> + */<br>
> +class PatternRenderer<br>
> +{<br>
> +public:<br>
> + bool try_setup(GLenum internalformat);<br>
> + void set_piglit_tolerance();<br>
> + void draw();<br>
> + float *read_image(GLenum base_format);<br>
> +<br>
> + /**<br>
> + * Number of bits in each color channel. E.g. color_bits[2]<br>
> + * == number of bits in blue color channel.<br>
> + */<br>
> + GLint color_bits[4];<br>
> +<br>
> + Fbo fbo_msaa;<br>
> + Fbo fbo_downsampled;<br>
> +};<br>
> +<br>
> +<br>
> +/**<br>
> + * Try to set up the necessary framebuffers to render to the given<br>
> + * MSAA format. Return false if one or more of the framebuffers is<br>
> + * incomplete.<br>
> + */<br>
> +bool<br>
> +PatternRenderer::try_setup(GLenum internalformat)<br>
> +{<br>
> + FboConfig config_downsampled(0, pattern_width, pattern_height);<br>
> + config_downsampled.color_internalformat = internalformat;<br>
> +<br>
> + FboConfig config_msaa = config_downsampled;<br>
> + config_msaa.num_samples = num_samples;<br>
> +<br>
> + if (!(fbo_downsampled.try_setup(config_downsampled) &&<br>
> + fbo_msaa.try_setup(config_msaa)))<br>
> + return false;<br>
> +<br>
> + glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo_downsampled.handle);<br>
> + glGetFramebufferAttachmentParameteriv(<br>
> + GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,<br>
> + GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &color_bits[0]);<br>
> + glGetFramebufferAttachmentParameteriv(<br>
> + GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,<br>
> + GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, &color_bits[1]);<br>
> + glGetFramebufferAttachmentParameteriv(<br>
> + GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,<br>
> + GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, &color_bits[2]);<br>
> + glGetFramebufferAttachmentParameteriv(<br>
> + GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,<br>
> + GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE, &color_bits[3]);<br>
> +<br>
> + return true;<br>
> +}<br>
> +<br>
> +<br>
> +/**<br>
> + * Set the piglit tolerance appropriately based on the number of bits<br>
> + * in each channel.<br>
> + */<br>
> +void PatternRenderer::set_piglit_tolerance()<br>
> +{<br>
> + int tolerance_bits[4];<br>
> +<br>
> + for (int i = 0; i < 4; ++i) {<br>
> + if (color_bits[i] == 0) {<br>
> + /* For channels that have 0 bits, test to 8<br>
> + * bits precision so we can verify that the<br>
> + * blit puts in the appropriate value.<br>
> + */<br>
> + tolerance_bits[i] = 8;<br>
> + } else if (color_bits[i] > 8) {<br>
> + /* For channels that have >8 bits, test to 8<br>
> + * bits precision because we only use an 8-bit<br>
> + * reference image.<br>
> + */<br>
> + tolerance_bits[i] = 8;<br>
> + } else {<br>
> + tolerance_bits[i] = color_bits[i];<br>
> + }<br>
> + }<br>
> +<br>
> + piglit_set_tolerance_for_bits(tolerance_bits[0], tolerance_bits[1],<br>
> + tolerance_bits[2], tolerance_bits[3]);<br>
> +}<br>
> +<br>
> +<br>
> +/**<br>
> + * Draw the test pattern into the MSAA framebuffer, and then blit it<br>
> + * to the downsampled FBO to force an MSAA resolve.<br>
> + */<br>
> +void<br>
> +PatternRenderer::draw()<br>
> +{<br>
> + /* Draw into the MSAA fbo */<br>
> + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo_msaa.handle);<br>
> + fbo_msaa.set_viewport();<br>
> + test_pattern->draw(TestPattern::no_projection);<br>
> +<br>
> + /* Blit to the downsampled fbo, forcing the image to be downsampled */<br>
> + glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo_msaa.handle);<br>
> + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo_downsampled.handle);<br>
> + glBlitFramebuffer(0, 0, pattern_width, pattern_height,<br>
> + 0, 0, pattern_width, pattern_height,<br>
> + GL_COLOR_BUFFER_BIT, GL_NEAREST);<br>
> +}<br>
> +<br>
> +<br>
> +/**<br>
> + * Read the image from the downsampled FBO into a newly allocated<br>
> + * array of floats and return it.<br>
> + */<br>
> +float *<br>
> +PatternRenderer::read_image(GLenum base_format)<br>
> +{<br>
> + unsigned components = piglit_num_components(base_format);<br>
> + unsigned size = sizeof(float)*components*pattern_width*pattern_height;<br>
> + float *image = (float *) malloc(size);<br>
> + glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo_downsampled.handle);<br>
> + if (base_format == GL_INTENSITY) {<br>
> + /* GL_INTENSITY is not allowed for ReadPixels so<br>
> + * substitute GL_LUMINANCE.<br>
> + */<br>
> + base_format = GL_LUMINANCE;<br>
> + }<br>
> + glReadPixels(0, 0, pattern_width, pattern_height, base_format, GL_FLOAT,<br>
> + image);<br>
> + return image;<br>
> +}<br>
> +<br>
> +<br>
> +/**<br>
> + * PatternRenderer used to render the image under test.<br>
> + */<br>
> +PatternRenderer test_renderer;<br>
> +<br>
> +<br>
> +/**<br>
> + * PatternRenderer used to render the reference image (in GL_RGBA<br>
> + * format).<br>
> + */<br>
> +PatternRenderer ref_renderer;<br>
> +<br>
> +<br>
> +/**<br>
> + * Convert the image into a format that can be easily understood by<br>
> + * visual inspection, and display it on the screen.<br>
> + *<br>
> + * Luminance and intensity values are converted to a grayscale value.<br>
> + * Alpha values are visualized by blending the image with a grayscale<br>
> + * checkerboard.<br>
> + */<br>
> +void<br>
> +visualize_image(float *img, GLenum base_internal_format, bool rhs)<br>
> +{<br>
> + unsigned components = piglit_num_components(base_internal_format);<br>
> + float *visualization =<br>
> + (float *) malloc(sizeof(float)*3*pattern_width*pattern_height);<br>
> + for (int y = 0; y < pattern_height; ++y) {<br>
> + for (int x = 0; x < pattern_width; ++x) {<br>
> + float r = 0, g = 0, b = 0, a = 1;<br>
> + float *pixel =<br>
> + &img[(y * pattern_width + x) * components];<br>
> + switch (base_internal_format) {<br>
> + case GL_ALPHA:<br>
> + a = pixel[0];<br>
> + break;<br>
> + case GL_RGBA:<br>
> + a = pixel[3];<br>
> + /* Fall through */<br>
> + case GL_RGB:<br>
> + r = pixel[0];<br>
> + g = pixel[1];<br>
> + b = pixel[2];<br>
> + break;<br>
> + case GL_LUMINANCE_ALPHA:<br>
> + a = pixel[1];<br>
> + /* Fall through */<br>
> + case GL_INTENSITY:<br>
> + case GL_LUMINANCE:<br>
> + r = pixel[0];<br>
> + g = pixel[0];<br>
> + b = pixel[0];<br>
> + break;<br>
> + }<br>
> + float checker = ((x ^ y) & 0x10) ? 0.75 : 0.25;<br>
> + r = r * a + checker * (1 - a);<br>
> + g = g * a + checker * (1 - a);<br>
> + b = b * a + checker * (1 - a);<br>
> + visualization[(y * pattern_width + x) * 3] = r;<br>
> + visualization[(y * pattern_width + x) * 3 + 1] = g;<br>
> + visualization[(y * pattern_width + x) * 3 + 2] = b;<br>
> + }<br>
> + }<br>
> + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);<br>
> + glViewport(0, 0, piglit_width, piglit_height);<br>
> + glUseProgram(0);<br>
> + glRasterPos2f(rhs ? 0 : -1, -1);<br>
> + glDrawPixels(pattern_width, pattern_height, GL_RGB, GL_FLOAT,<br>
> + visualization);<br>
> + free(visualization);<br>
> +}<br>
> +<br>
> +<br>
> +/**<br>
> + * Transform the reference image (which is in GL_RGBA format) to an<br>
> + * expected image for a given base internal format, using the the<br>
> + * transformation described in the GL 3.0 spec, table 3.15 (Conversion<br>
> + * from RGBA, depth, and stencil pixel components to internal texture,<br>
> + * table, or filter components). In short, the mapping is as follows:<br>
> + *<br>
> + * base_internal_format mapping<br>
> + * GL_ALPHA A -> A<br>
> + * GL_LUMINANCE R -> L<br>
> + * GL_LUMINANCE_ALPHA R,A -> L,A<br>
> + * GL_INTENSITY R -> I<br>
> + * GL_RED R -> R<br>
> + * GL_RG R,G -> R,G<br>
> + * GL_RGB R,G,B -> R,G,B<br>
> + * GL_RGBA R,G,B,A -> R,G,B,A<br>
> + */<br>
> +float *<br>
> +compute_expected_image(const float *ref_image, GLenum base_internal_format)<br>
> +{<br>
> + unsigned components = piglit_num_components(base_internal_format);<br>
> + unsigned num_pixels = pattern_width*pattern_height;<br>
> + unsigned size = sizeof(float)*components*num_pixels;<br>
> + float *expected_image = (float *) malloc(size);<br>
> + for (unsigned i = 0; i < num_pixels; ++i) {<br>
> + float *expected = &expected_image[components*i];<br>
> + const float *ref = &ref_image[4*i];<br>
> + for (unsigned j = 0; j < components; ++j) {<br>
> + switch (base_internal_format) {<br>
> + case GL_ALPHA:<br>
> + expected[j] = ref[3];<br>
> + break;<br>
> + case GL_LUMINANCE_ALPHA:<br>
> + expected[j] = ref[j ? 3 : 0];<br>
> + break;<br>
> + default:<br>
> + expected[j] = ref[j];<br>
> + break;<br>
> + }<br>
> + }<br>
> + }<br>
> + return expected_image;<br>
> +}<br>
> +<br>
> +<br>
> +/**<br>
> + * Test a given internal format.<br>
> + */<br>
> +enum piglit_result<br>
> +test_format(const struct format_desc *format)<br>
> +{<br>
> + bool pass = true;<br>
> +<br>
> + /* Caller messes with the clear color. Reset it to the<br>
> + * default.<br>
> + */<br>
> + glClearColor(0, 0, 0, 0);<br>
> +<br>
> + printf("Testing %s\n", format->name);<br>
> +<br>
> + /* Set up the framebuffers for rendering the reference image.<br>
> + * This shouldn't fail.<br>
> + */<br>
> + bool setup_success = ref_renderer.try_setup(GL_RGBA);<br>
> + if (!piglit_check_gl_error(GL_NO_ERROR)) {<br>
> + printf("Error setting up reference renderbuffers\n");<br>
> + return PIGLIT_FAIL;<br>
> + }<br>
> + if (!setup_success) {<br>
> + printf("Reference framebuffer combination is unsupported\n");<br>
> + return PIGLIT_FAIL;<br>
> + }<br>
> +<br>
> + /* Set up the framebuffers for rendering the test image. This<br>
> + * might fail if the format we're testing isn't supported as a<br>
> + * render target, and that's ok.<br>
> + *<br>
> + * Note: in order to be sure we test all formats which the<br>
> + * implementations supports as render targets, we try all of<br>
> + * them, even formats that the spec doesn't define as<br>
> + * color-renderable (e.g. GL_LUMINANCE8, which is supported as<br>
> + * a render target format by some drivers even though it's not<br>
> + * officially color-renderable). If we tried to request a<br>
> + * color-renderable format and it wasn't supported, we would<br>
> + * expect the framebuffer to be incomplete. If we tried to<br>
> + * request a non-color-renderable format and it wasn't<br>
> + * supported, we might have received a GL error. In either<br>
> + * case just skip to the next format.<br>
> + */<br>
> + setup_success = test_renderer.try_setup(format->internalformat);<br>
> + if (glGetError() != GL_NO_ERROR) {<br>
> + printf("Error setting up test renderbuffers\n");<br>
> + return PIGLIT_SKIP;<br>
> + }<br>
> + if (!setup_success) {<br>
> + printf("Unsupported framebuffer combination\n");<br>
> + return PIGLIT_SKIP;<br>
> + }<br>
> +<br>
> + /* Draw test and reference images, and read them into memory */<br>
> + test_renderer.set_piglit_tolerance();<br>
> + test_renderer.draw();<br>
> + float *test_image =<br>
> + test_renderer.read_image(format->base_internal_format);<br>
> + ref_renderer.draw();<br>
> + float *ref_image = ref_renderer.read_image(GL_RGBA);<br>
> +<br>
> + /* Compute the expected image from the reference image */<br>
> + float *expected_image =<br>
> + compute_expected_image(ref_image,<br>
> + format->base_internal_format);<br>
> +<br>
> + /* Check that the test image was correct */<br>
> + glBindFramebuffer(GL_READ_FRAMEBUFFER,<br>
> + test_renderer.fbo_downsampled.handle);<br>
> + pass = piglit_probe_image_color(0, 0, pattern_width, pattern_height,<br>
> + format->base_internal_format,<br>
> + expected_image) && pass;<br>
> +<br>
> + /* Show both the test and expected images on screen so that<br>
> + * the user can diagnose problems.<br>
> + */<br>
> + visualize_image(test_image, format->base_internal_format, false);<br>
> + visualize_image(expected_image, format->base_internal_format, true);<br>
> +<br>
> + /* Finally, if any error occurred, count that as a failure. */<br>
> + pass = piglit_check_gl_error(GL_NO_ERROR) && pass;<br>
> +<br>
> + free(test_image);<br>
> + free(ref_image);<br>
> + free(expected_image);<br>
> +<br>
> + return pass ? PIGLIT_PASS : PIGLIT_FAIL;<br>
> +}<br>
> +<br>
> +<br>
> +void<br>
> +print_usage_and_exit(char *prog_name)<br>
> +{<br>
> + printf("Usage: %s <num_samples>\n", prog_name);<br>
> + piglit_report_result(PIGLIT_FAIL);<br>
> +}<br>
> +<br>
> +<br>
> +extern "C" void<br>
> +piglit_init(int argc, char **argv)<br>
> +{<br>
> + if (argc < 2)<br>
> + print_usage_and_exit(argv[0]);<br>
> + char *endptr = NULL;<br>
> + num_samples = strtol(argv[1], &endptr, 0);<br>
> + if (endptr != argv[1] + strlen(argv[1]))<br>
> + print_usage_and_exit(argv[0]);<br>
> +<br>
> + piglit_require_gl_version(30);<br>
> + piglit_require_GLSL_version(130);<br>
</div></div>I think this check is redundant. GLSL version is implied by OpenGL 3.0<br></blockquote><div><br></div></div></div><div>You're right. I'll remove the redundant check.</div><div class="im"><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
> +<br>
> + /* Skip the test if num_samples > GL_MAX_SAMPLES */<br>
> + GLint max_samples;<br>
> + glGetIntegerv(GL_MAX_SAMPLES, &max_samples);<br>
> + if (num_samples > max_samples)<br>
> + piglit_report_result(PIGLIT_SKIP);<br>
> +<br>
> + fbo_formats_init_test_set(0 /* core formats */,<br>
> + GL_TRUE /* print_options */);<br>
> + test_pattern = new ColorGradientSunburst();<br>
> + test_pattern->compile();<br>
> +}<br>
> +<br>
> +extern "C" enum piglit_result<br>
> +piglit_display()<br>
> +{<br>
> + return fbo_formats_display(test_format);<br>
> +}<br>
> +<br>
> +};<br>
> --<br>
> 1.7.7.6<br>
><br>
</div></div></blockquote></div></div><br>
</blockquote></div><br>