diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-05-06 12:42:05 -0500 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-06-01 22:52:18 +0200 |
commit | d6211a61b0c8cd81509cbbf0e75766eb4be30bed (patch) | |
tree | c8996d1c519e5fc6bf978e60a504c202956e3149 /src/gallium/drivers/radeonsi/si_hw_context.c | |
parent | 46ad3561be0b820333a515941bfb220591402573 (diff) | |
download | external_mesa3d-d6211a61b0c8cd81509cbbf0e75766eb4be30bed.zip external_mesa3d-d6211a61b0c8cd81509cbbf0e75766eb4be30bed.tar.gz external_mesa3d-d6211a61b0c8cd81509cbbf0e75766eb4be30bed.tar.bz2 |
gallium/radeon: use cs_check_space throughout
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_hw_context.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 6221f1c..c25b264 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -84,9 +84,8 @@ void si_need_cs_space(struct si_context *ctx) /* If the CS is sufficiently large, don't count the space needed * and just flush if there is not enough space left. */ - if (unlikely(cs->cdw > cs->max_dw - 2048 || - (ce_ib && ce_ib->max_dw - ce_ib->cdw < - si_ce_needed_cs_space()))) + if (!ctx->b.ws->cs_check_space(cs, 2048) || + (ce_ib && !ctx->b.ws->cs_check_space(ce_ib, si_ce_needed_cs_space()))) ctx->b.gfx.flush(ctx, RADEON_FLUSH_ASYNC, NULL); } |