diff options
author | Marek Olšák <[email protected]> | 2014-05-05 22:16:45 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-05-10 13:58:46 +0200 |
commit | 86035cd88dc66db06f0a120654e4d8d7ad25c139 (patch) | |
tree | 9434a427f07a8e0d81983e25f477633781a68d87 /src/gallium | |
parent | 023d367ae69c239cc96bb17103da7286a81a2250 (diff) |
radeonsi: only count CS space for state atoms if we're going to draw
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index d2a1dbe4217..e4ce3af3bae 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -35,13 +35,13 @@ void si_need_cs_space(struct si_context *ctx, unsigned num_dw, /* The number of dwords we already used in the CS so far. */ num_dw += ctx->b.rings.gfx.cs->cdw; - for (i = 0; i < SI_NUM_ATOMS(ctx); i++) { - if (ctx->atoms.array[i]->dirty) { - num_dw += ctx->atoms.array[i]->num_dw; + if (count_draw_in) { + for (i = 0; i < SI_NUM_ATOMS(ctx); i++) { + if (ctx->atoms.array[i]->dirty) { + num_dw += ctx->atoms.array[i]->num_dw; + } } - } - if (count_draw_in) { /* The number of dwords all the dirty states would take. */ num_dw += ctx->pm4_dirty_cdwords; |