diff options
author | Marek Olšák <[email protected]> | 2017-07-29 17:39:06 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-04 02:10:04 +0200 |
commit | ae5d86e94d04fc01008d69ed8f4346b1c4215b87 (patch) | |
tree | 90a13f656dd61f7c4ff28ff9a4f4666b02f6757c /src/gallium/drivers/radeonsi/si_state.c | |
parent | 77260927951883e086ddec178a102c176a042505 (diff) |
radeonsi: if FMASK is disabled, set CB_COLORi_FMASK = CB_COLORi_BASE properly
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index c151a980e01..6e678242a2c 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2762,7 +2762,7 @@ static void si_emit_framebuffer_state(struct si_context *sctx, struct r600_atom /* Compute mutable surface parameters. */ cb_color_base = tex->resource.gpu_address >> 8; - cb_color_fmask = cb_color_base; + cb_color_fmask = 0; cb_dcc_base = 0; cb_color_info = cb->cb_color_info | tex->cb_color_info; cb_color_attrib = cb->cb_color_attrib; @@ -2794,6 +2794,8 @@ static void si_emit_framebuffer_state(struct si_context *sctx, struct r600_atom /* Set mutable surface parameters. */ cb_color_base += tex->surface.u.gfx9.surf_offset >> 8; + if (!tex->fmask.size) + cb_color_fmask = cb_color_base; cb_color_attrib |= S_028C74_COLOR_SW_MODE(tex->surface.u.gfx9.surf.swizzle_mode) | S_028C74_FMASK_SW_MODE(tex->surface.u.gfx9.fmask.swizzle_mode) | S_028C74_RB_ALIGNED(meta.rb_aligned) | @@ -2826,6 +2828,8 @@ static void si_emit_framebuffer_state(struct si_context *sctx, struct r600_atom unsigned cb_color_pitch, cb_color_slice, cb_color_fmask_slice; cb_color_base += level_info->offset >> 8; + if (!tex->fmask.size) + cb_color_fmask = cb_color_base; if (cb_dcc_base) cb_dcc_base += level_info->dcc_offset >> 8; |