diff options
author | Anuj Phogat <[email protected]> | 2014-08-22 17:12:28 -0700 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2014-09-05 15:40:37 -0700 |
commit | d09167a39ff6ca50cd607547b001d28ee7b63fef (patch) | |
tree | c73732fffe2cdce849a0040fcb3e25071db9a283 /src/mesa/drivers/common/meta.h | |
parent | 0b76c51728cc76543623554b8893ba332cdfe10f (diff) |
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 <[email protected]>
Reviewed-by: Jason Ekstarnd <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.h')
-rw-r--r-- | src/mesa/drivers/common/meta.h | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h index 56ba9bc6598..edc3e8c2090 100644 --- a/src/mesa/drivers/common/meta.h +++ b/src/mesa/drivers/common/meta.h @@ -235,21 +235,45 @@ struct blit_shader_table { /** * Indices in the blit_state->msaa_shaders[] array * - * Note that setup_glsl_msaa_blit_shader() assumes that the _INT enums are one - * more than the non-_INT version and _UINT is one beyond that. + * Note that setup_glsl_msaa_blit_shader() assumes that the _INT enums are five + * more than the corresponding non-_INT versions and _UINT are five beyond that. */ enum blit_msaa_shader { - BLIT_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE, - BLIT_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT, - BLIT_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT, + BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE, + BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE, + BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE, + BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE, + BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE, + BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT, + BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT, + BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT, + BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT, + BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT, + BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT, + BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT, + BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT, + BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT, + BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT, BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY, BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY_INT, BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY_UINT, BLIT_MSAA_SHADER_2D_MULTISAMPLE_DEPTH_RESOLVE, BLIT_MSAA_SHADER_2D_MULTISAMPLE_DEPTH_COPY, - BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE, - BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT, - BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT, + BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE, + BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE, + BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE, + BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE, + BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE, + BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT, + BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT, + BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT, + BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT, + BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT, + BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT, + BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT, + BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT, + BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT, + BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT, BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_COPY, BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_COPY_INT, BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_COPY_UINT, |