diff options
author | Marek Olšák <[email protected]> | 2016-09-06 00:10:38 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-07 11:13:13 +0200 |
commit | bdf767dac4d6229bc80642bb806cc56f6d440cfc (patch) | |
tree | 71708eb3050d8516afb29735f80f715449a19f6e /src/gallium/drivers/radeonsi | |
parent | a8e7ea6abce1913ac64143f5a83f82c35b2975d6 (diff) |
radeonsi: add more unlikely() uses into si_draw_vbo
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 9469bb4f115..d4447a975fe 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -896,22 +896,22 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) return; } - if (!sctx->vs_shader.cso) { + if (unlikely(!sctx->vs_shader.cso)) { assert(0); return; } - if (!sctx->ps_shader.cso && (!rs || !rs->rasterizer_discard)) { + if (unlikely(!sctx->ps_shader.cso && (!rs || !rs->rasterizer_discard))) { assert(0); return; } - if (!!sctx->tes_shader.cso != (info->mode == PIPE_PRIM_PATCHES)) { + if (unlikely(!!sctx->tes_shader.cso != (info->mode == PIPE_PRIM_PATCHES))) { assert(0); return; } /* Re-emit the framebuffer state if needed. */ dirty_fb_counter = p_atomic_read(&sctx->b.screen->dirty_fb_counter); - if (dirty_fb_counter != sctx->b.last_dirty_fb_counter) { + if (unlikely(dirty_fb_counter != sctx->b.last_dirty_fb_counter)) { sctx->b.last_dirty_fb_counter = dirty_fb_counter; sctx->framebuffer.dirty_cbufs |= ((1 << sctx->framebuffer.state.nr_cbufs) - 1); @@ -921,7 +921,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) /* Invalidate & recompute texture descriptors if needed. */ dirty_tex_counter = p_atomic_read(&sctx->b.screen->dirty_tex_descriptor_counter); - if (dirty_tex_counter != sctx->b.last_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); } |