meta: Store precompiled msaa shaders for all supported sample counts
authorAnuj Phogat <anuj.phogat@gmail.com>
Sat, 23 Aug 2014 00:12:28 +0000 (17:12 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 5 Sep 2014 22:40:37 +0000 (15:40 -0700)
commitd09167a39ff6ca50cd607547b001d28ee7b63fef
treec73732fffe2cdce849a0040fcb3e25071db9a283
parent0b76c51728cc76543623554b8893ba332cdfe10f
meta: Store precompiled msaa shaders for all supported sample counts

Currently, BLIT_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE* and
BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE* shaders
in setup_glsl_msaa_blit_shader() are not recompiled
when the source buffer sample count changes. For example,
implementation continued using a 4X msaa shader, even if
source buffer changes from 4X msaa to 8x msaa. It causes
incorrect rendering.

This patch adds new enums in blit_msaa_shader, one for
each supported sample count, and uses them to store
msaa shaders.

Fixes following piglit tests on Broadwell:
ext_framebuffer_multisample-accuracy all_samples color
ext_framebuffer_multisample-accuracy all_samples depth_draw
ext_framebuffer_multisample-accuracy all_samples depth_resolve
ext_framebuffer_multisample-accuracy all_samples stencil_draw
ext_framebuffer_multisample-accuracy all_samples stencil_resolve
ext_framebuffer_multisample-formats all_samples

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstarnd <jason@jlekstrand.net>
src/mesa/drivers/common/meta.h
src/mesa/drivers/common/meta_blit.c