diff options
author | Marek Olšák <[email protected]> | 2017-01-24 23:37:56 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-01-30 17:45:29 +0100 |
commit | f8bc628b2ceb13c8d1ddfa28b81dbef4159928b6 (patch) | |
tree | a23068949cce37fcd4add2409bc149596253aea0 /src/gallium/drivers/radeonsi | |
parent | 75c425e511104136e564efbae5afc41c05ac5d57 (diff) |
gallium/radeon: merge dirty_fb_counter and dirty_tex_descriptor_counter
to simplify things in draw_vbo a little
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 16d905772a6..b6bd3f186ad 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -957,7 +957,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) struct si_context *sctx = (struct si_context *)ctx; struct si_state_rasterizer *rs = sctx->queued.named.rasterizer; struct pipe_index_buffer ib = {}; - unsigned mask, dirty_fb_counter, dirty_tex_counter, rast_prim; + unsigned mask, dirty_tex_counter, rast_prim; if (likely(!info->indirect)) { /* SI-CI treat instance_count==0 as instance_count==1. There is @@ -986,21 +986,15 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) return; } - /* Re-emit the framebuffer state if needed. */ - dirty_fb_counter = p_atomic_read(&sctx->b.screen->dirty_fb_counter); - if (unlikely(dirty_fb_counter != sctx->b.last_dirty_fb_counter)) { - sctx->b.last_dirty_fb_counter = dirty_fb_counter; + /* Recompute and re-emit the texture resource states if needed. */ + dirty_tex_counter = p_atomic_read(&sctx->b.screen->dirty_tex_counter); + if (unlikely(dirty_tex_counter != sctx->b.last_dirty_tex_counter)) { + sctx->b.last_dirty_tex_counter = dirty_tex_counter; sctx->framebuffer.dirty_cbufs |= ((1 << sctx->framebuffer.state.nr_cbufs) - 1); sctx->framebuffer.dirty_zsbuf = true; sctx->framebuffer.do_update_surf_dirtiness = true; si_mark_atom_dirty(sctx, &sctx->framebuffer.atom); - } - - /* Invalidate & recompute texture descriptors if needed. */ - dirty_tex_counter = p_atomic_read(&sctx->b.screen->dirty_tex_descriptor_counter); - if (unlikely(dirty_tex_counter != sctx->b.last_dirty_tex_descriptor_counter)) { - sctx->b.last_dirty_tex_descriptor_counter = dirty_tex_counter; si_update_all_texture_descriptors(sctx); } |