[Mesa-dev] multisample clears

Marek Olšák maraeo at gmail.com
Mon Mar 4 05:47:10 PST 2013

On Mon, Mar 4, 2013 at 4:54 AM, Dave Airlie <airlied at gmail.com> wrote:
> I've been playing with softpipe msaa on and off, but I hit a problem
> with the clears and am just wondering if the state tracker should be
> doing something like this.
> Or maybe only if any bound buffer has nr_samples > 1, or fallback to
> the non-quad draw method.
> I can't see how else the driver could distinguish a multisample clear.
> The other problem I have and not figuring out is if rendering to a
> buffer with multisample off, then turning it on is meant to be
> meaningful, if you have to clear
> the buffer in between, then with this fixed it should be cool.
> Dave.
> From e1ee59d87ba42d8a58be640ee1fd2b952414f45e Mon Sep 17 00:00:00 2001
> From: Dave Airlie <airlied at redhat.com>
> Date: Mon, 4 Mar 2013 13:39:17 +1000
> Subject: [PATCH] st/mesa: enable multisample in clear quad code
> Not sure if this is correct at all

For clears, blits, and the like, multisampling doesn't have to be
enabled, which means pixel values are stored in all samples regardless
of sample positions.

Multisampling can be problematic if the rendered quad doesn't cover
whole pixels (floating-point precision may play a role, not sure), so
it's better not to enable it.


More information about the mesa-dev mailing list