diff options
author | Nicolai Hähnle <[email protected]> | 2016-05-06 17:02:30 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-05-17 15:28:39 -0500 |
commit | 0558564200466878f1a86e7a192d085b551079c4 (patch) | |
tree | a76323fc1a7d1b1a7494ecc63a2cbd5745dff0c7 /src/gallium/drivers/r600/r600_hw_context.c | |
parent | 5e89b027b9ca761488b97fd41e1a3e7ec6137dff (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/r600/r600_hw_context.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index 6534d8bc4ab..1f7bed824b0 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -33,10 +33,8 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, boolean count_draw_in) { - 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(ctx->b.dma.cs, 0)) ctx->b.dma.flush(ctx, RADEON_FLUSH_ASYNC, NULL); if (!ctx->b.ws->cs_memory_below_limit(ctx->b.gfx.cs, ctx->b.vram, ctx->b.gtt)) { @@ -250,7 +248,7 @@ void r600_context_gfx_flush(void *context, unsigned flags, struct r600_context *ctx = context; struct radeon_winsys_cs *cs = ctx->b.gfx.cs; - if (cs->cdw == ctx->b.initial_gfx_cs_size && !fence) + if (!radeon_emitted(cs, ctx->b.initial_gfx_cs_size) && !fence) return; r600_preflush_suspend_features(&ctx->b); |