summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-05-06 17:02:30 -0500
committerNicolai Hähnle <[email protected]>2016-05-17 15:28:39 -0500
commit0558564200466878f1a86e7a192d085b551079c4 (patch)
treea76323fc1a7d1b1a7494ecc63a2cbd5745dff0c7 /src/gallium/drivers/radeonsi
parent5e89b027b9ca761488b97fd41e1a3e7ec6137dff (diff)
gallium/radeon: add radeon_emitted to check for non-trivial IBs
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_hw_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
index 7fc58a60453..dcf206df216 100644
--- a/src/gallium/drivers/radeonsi/si_hw_context.c
+++ b/src/gallium/drivers/radeonsi/si_hw_context.c
@@ -64,7 +64,7 @@ void si_need_cs_space(struct si_context *ctx)
struct radeon_winsys_cs *dma = ctx->b.dma.cs;
/* Flush the DMA IB if it's not empty. */
- if (dma && dma->cdw)
+ if (radeon_emitted(dma, 0))
ctx->b.dma.flush(ctx, RADEON_FLUSH_ASYNC, NULL);
/* There are two memory usage counters in the winsys for all buffers
@@ -102,7 +102,7 @@ void si_context_gfx_flush(void *context, unsigned flags,
ctx->gfx_flush_in_progress = true;
- if (cs->cdw == ctx->b.initial_gfx_cs_size &&
+ if (!radeon_emitted(cs, ctx->b.initial_gfx_cs_size) &&
(!fence || ctx->last_gfx_fence)) {
if (fence)
ws->fence_reference(fence, ctx->last_gfx_fence);