summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-24 00:41:47 +0100
committerMarek Olšák <[email protected]>2017-11-29 18:21:30 +0100
commit3c4d871ca2bad6df71b00efc698359bd01e8a8de (patch)
tree1de693a272e6bf0242ac05c9d494637e96618a09 /src/gallium/drivers/radeonsi
parent373f4a48ae3739a7749ad9823c164fb3aa47cee6 (diff)
radeonsi: enable DCC with MSAA for VI
Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c5
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index b3d8ae508bd..6e433a31708 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -1127,6 +1127,11 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
sscreen->b.family == CHIP_RAVEN);
}
+ sscreen->b.dcc_msaa_allowed =
+ !(sscreen->b.debug_flags & DBG(NO_DCC_MSAA)) &&
+ (sscreen->b.debug_flags & DBG(DCC_MSAA) ||
+ sscreen->b.chip_class == VI);
+
(void) mtx_init(&sscreen->shader_parts_mutex, mtx_plain);
sscreen->use_monolithic_shaders =
(sscreen->b.debug_flags & DBG(MONOLITHIC_SHADERS)) != 0;
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 4eee7787c6f..d59b363f308 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -676,7 +676,8 @@ static void si_bind_blend_state(struct pipe_context *ctx, void *state)
old_blend->cb_target_mask != blend->cb_target_mask ||
old_blend->dual_src_blend != blend->dual_src_blend ||
(old_blend->blend_enable_4bit != blend->blend_enable_4bit &&
- sctx->framebuffer.nr_samples >= 2))
+ sctx->framebuffer.nr_samples >= 2 &&
+ sctx->screen->b.dcc_msaa_allowed))
si_mark_atom_dirty(sctx, &sctx->cb_render_state);
if (!old_blend ||