swr: move msaa resolve to generalized StoreTile
authorBruce Cherniak <bruce.cherniak@intel.com>
Fri, 5 May 2017 00:33:36 +0000 (19:33 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Mon, 8 May 2017 19:45:40 +0000 (14:45 -0500)
commitf52e63069a3fad23e03d42306a42bd20f0159da3
tree112e7466daf24eee6b98641785aa52802ef1f868
parent0ffa06a19badf2df0f02e02477a7d2904a53a6a8
swr: move msaa resolve to generalized StoreTile

v3: list piglit tests fixed by this patch. Fixed typo Tim pointed out.
v2: Reword commit message to more closely adhere to community
guidelines.

This patch moves msaa resolve down into core/StoreTiles where the
surface format conversion routines are available.  The previous
"experimental" resolve was limited to 8-bit unsigned render targets.

This fixes a number of piglit msaa tests by adding resolve support for
all the render target formats we support.

Specifically:
layered-rendering/gl-layer-render: fail->pass
layered-rendering/gl-layer-render-storage: fail->pass
multisample-formats *[2,4,8,16] gl_arb_texture_rg: crash->pass
multisample-formats *[2,4,8,16] gl_ext_texture_snorm: crash->pass
multisample-formats *[2,4,8,16] gl_arb_texture_float: fail->pass
multisample-formats *[2,4,8,16] gl_arb_texture_rg-float: fail->pass

MSAA is still disabled by default, but can be enabled with
"export SWR_MSAA_MAX_COUNT=4" (1,2,4,8,16 are options)
The default is 0, which is disabled.

This patch improves the number of multisample-formats supported by swr,
and fixes several crashes currently in the 17.1 branch.  Therefore, it
should be considered for inclusion in the 17.1 stable release.  Being
disabled by default, it poses no risk to most users of swr.

Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/swr/rasterizer/memory/StoreTile.h
src/gallium/drivers/swr/swr_context.cpp
src/gallium/drivers/swr/swr_screen.cpp