[Mesa-dev] [PATCH 04/10] i965/msaa: Work around problems with null render targets on Gen6.
Paul Berry
stereotype441 at gmail.com
Tue Jul 24 11:36:15 PDT 2012
On 24 July 2012 11:24, Chad Versace <chad.versace at linux.intel.com> wrote:
> On 07/18/2012 08:15 AM, Paul Berry wrote:
> > On Gen6, multisampled null render targets don't seem to work
> > properly--they cause the GPU to hang. So, as a workaround, we render
> > into a dummy color buffer.
> >
> > Fortunately this situation (multisampled rendering without a color
> > buffer) is rare, and we don't have to waste too much memory, because
> > we can give the workaround buffer a very small pitch.
> >
> > Fixes piglit test "EXT_framebuffer_multisample/no-color {2,4}
> > depth-computed *" on Gen6.
>
>
> > - surf[0] = (BRW_SURFACE_NULL << BRW_SURFACE_TYPE_SHIFT |
> > + if (fb->Visual.samples > 0) {
> > + /* On Gen6, null render targets seem to cause GPU hangs when
> > + * multisampling. So work around this problem by rendering into
> dummy
> > + * color buffer.
> > + *
> > + * To decrease the amount of memory needed by the workaround
> buffer, we
> > + * set its pitch to 128 bytes (the width of a Y tile). This
> means that
> > + * the amount of memory needed for the workaround buffer is
> > + * (width_in_tiles + height_in_tiles - 1) tiles.
>
> It took me several minutes to see why this was the lower bound of needed
> memory.
>
Yeah, it's kind of tricky reasoning. Let me know if you can think of a
comment that would have made it easier to follow.
>
> Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
>
> I'm off to the dentist now, so I might not be able today to respond to your
> comments on my msaa patch series.
>
No problem. Good luck, and thanks again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120724/104e5685/attachment.html>
More information about the mesa-dev
mailing list