diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-11-22 15:42:46 +0100 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-12-10 09:25:28 +0100 |
commit | f5c1cb23835d79faafc1819069c28b82cfcb5fc2 (patch) | |
tree | 5370e5cbadf53c7cb174b17e4778914587571cf3 /src/gallium/drivers/radeonsi/si_state_draw.c | |
parent | e3e91cebcd9307654eb3535e2f6521103ec8b997 (diff) |
radeonsi: dcc dirty flag
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_draw.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 74610d600cf..9aacc9e176d 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -2142,6 +2142,20 @@ static void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *i cik_emit_prefetch_L2(sctx, false); } + /* Mark the displayable dcc buffer as dirty in order to update + * it on the next call to si_flush_resource. */ + if (sctx->screen->info.use_display_dcc_with_retile_blit) { + /* Don't use si_update_fb_dirtiness_after_rendering because it'll + * cause unnecessary texture decompressions on each draw. */ + unsigned displayable_dcc_cb_mask = sctx->framebuffer.displayable_dcc_cb_mask; + while (displayable_dcc_cb_mask) { + unsigned i = u_bit_scan(&displayable_dcc_cb_mask); + struct pipe_surface *surf = sctx->framebuffer.state.cbufs[i]; + struct si_texture *tex = (struct si_texture*) surf->texture; + tex->displayable_dcc_dirty = true; + } + } + /* Clear the context roll flag after the draw call. */ sctx->context_roll = false; |