[Piglit] [PATCH] Add test to switch on/off MSAA in FBO

Paul Berry stereotype441 at gmail.com
Mon Apr 16 14:25:38 PDT 2012


On 16 April 2012 09:59, Anuj Phogat <anuj.phogat at gmail.com> wrote:

> This is the draft version of test case.
>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
> I  was developing this test to verify MSAA with FBO. Test output with MSAA
> is expected to differ along polygon edges when compared to rendering
> without
> MSAA. But it seems like no MSAA is happening. Did I miss something while
> setting up multisample fbo?
>
> GPU Info:
> OpenGL vendor string: Advanced Micro Devices, Inc.
> OpenGL renderer string: AMD Radeon(TM) HD 6480G
> OpenGL version string: 4.2.11554 Compatibility Profile Context
> OpenGL shading language version string: 4.20
>
> Software:
> Catalyst Version: 12.2
>
> Test output:
> ./bin/ext_framebuffer_multisample-turn-on-off -auto
> GL_SAMPLES = 0, GL_SAMPLE_BUFFERS = 0, MSAA = 0
> GL_SAMPLES = 8, GL_SAMPLE_BUFFERS = 1, MSAA = 1
> PIGLIT: {'result': 'pass' }
>

I think you're setting up the framebuffer correctly.  The reason the pixels
are the same is because all of the shapes you are drawing are rectangles
that are aligned to pixel boundaries.  To see the effect of MSAA, you
either need to draw some rectangles that aren't aligned to pixel
boundaries, or you need to draw an image that has diagonal lines in it.

By the way, I've had to write a test of my own to help me in prototyping
Sandy Bridge MSAA support.  We should coordinate to make sure we're not
duplicating effort.  Briefly, my test is draws a scene twice, once using
the GL implementation's MSAA feature, and once without MSAA but at very
high (16x) resolution.  Then it compares the two images.  Each pixel in the
MSAA image corresponds to a 16x16 block in the high resolution image.  By
counting how many pixels are lit in the 16x16 block, the test can figure
out how bright the corresponding MSAA pixel would be if the antialiasing
were perfect.  Then it computes an RMS error between the actual MSAA output
and the "perfectly antialiased" reference image.

I'll try to get my test posted to the Piglit list today or tomorrow.  In
the meantime, to give you a better idea of what I'm doing, I'll attach
screenshots.  In the attached png images, the image on the left is rendered
with MSAA, and the image on the right is the "perfectly antialiased"
reference image.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120416/03ec3745/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangles.png
Type: image/png
Size: 31700 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120416/03ec3745/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sunburst.png
Type: image/png
Size: 21774 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120416/03ec3745/attachment-0003.png>


More information about the Piglit mailing list