diff options
author | Nicolai Hähnle <[email protected]> | 2016-05-06 12:42:05 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-06-01 22:52:18 +0200 |
commit | d6211a61b0c8cd81509cbbf0e75766eb4be30bed (patch) | |
tree | c8996d1c519e5fc6bf978e60a504c202956e3149 /src/gallium/drivers/r600 | |
parent | 46ad3561be0b820333a515941bfb220591402573 (diff) |
gallium/radeon: use cs_check_space throughout
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-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 1f7bed824b0..ccfa8f5c306 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -47,9 +47,7 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, ctx->b.gtt = 0; ctx->b.vram = 0; - /* The number of dwords we already used in the CS so far. */ - num_dw += ctx->b.gfx.cs->cdw; - + /* Check available space in CS. */ if (count_draw_in) { uint64_t mask; @@ -82,7 +80,7 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, num_dw += 10; /* Flush if there's not enough space. */ - if (num_dw > ctx->b.gfx.cs->max_dw) { + if (!ctx->b.ws->cs_check_space(ctx->b.gfx.cs, num_dw)) { ctx->b.gfx.flush(ctx, RADEON_FLUSH_ASYNC, NULL); } } |