i965/msaa: Expand odd-sized MSAA surfaces to account for interleaving pattern.
authorPaul Berry <stereotype441@gmail.com>
Fri, 11 May 2012 00:52:09 +0000 (17:52 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 25 May 2012 15:45:10 +0000 (08:45 -0700)
commit52fcc36f11b12236eb4f960b65b17b047cf32efa
treec477c1f0586447877cc34d0a7e2361cb9112ae67
parent93594f38be75227879b835a2037b7466adbd70ef
i965/msaa: Expand odd-sized MSAA surfaces to account for interleaving pattern.

Gen6 MSAA buffers (and Gen7 MSAA depth/stencil buffers) interleave
MSAA samples in a complex pattern that repeats every 2x2 pixel block.
Therefore, when allocating an MSAA buffer, we need to make sure to
allocate an integer number of 2x2 blocks; if we don't, then some of
the samples in the last row and column will be cut off.

Fixes piglit tests "EXT_framebuffer_multisample/unaligned-blit {2,4}
color msaa" on i965/Gen6.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c