[Mesa-dev] [PATCH 04/10] i965/msaa: Work around problems with null render targets on Gen6.

Chad Versace chad.versace at linux.intel.com
Tue Jul 24 11:24:53 PDT 2012


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.

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.


More information about the mesa-dev mailing list