diff options
author | Marek Olšák <[email protected]> | 2016-04-28 16:32:39 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-05-10 17:20:09 +0200 |
commit | bb74152597de44ee877b8928587b1cece8b49656 (patch) | |
tree | 82b7b46761bcb091cc787843987c295c0af8ec12 /src/gallium/drivers/radeonsi/cik_sdma.c | |
parent | 70934de00eb42ba6fc43d104875962dfb260a1b3 (diff) |
gallium/radeon: flush if DMA IB memory usage is too high
This prevents IB rejections due to insane memory usage from
many concecutive texture uploads.
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/cik_sdma.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/cik_sdma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c index 396cecc4b44..c68b858b14c 100644 --- a/src/gallium/drivers/radeonsi/cik_sdma.c +++ b/src/gallium/drivers/radeonsi/cik_sdma.c @@ -47,7 +47,7 @@ static void cik_sdma_do_copy_buffer(struct si_context *ctx, src_offset += r600_resource(src)->gpu_address; ncopy = DIV_ROUND_UP(size, CIK_SDMA_COPY_MAX_SIZE); - r600_need_dma_space(&ctx->b, ncopy * 7); + r600_need_dma_space(&ctx->b, ncopy * 7, rdst, rsrc); radeon_add_to_buffer_list(&ctx->b, &ctx->b.dma, rsrc, RADEON_USAGE_READ, RADEON_PRIO_SDMA_BUFFER); @@ -212,7 +212,7 @@ static bool cik_sdma_copy_texture(struct si_context *sctx, srcy + copy_height != (1 << 14)))) { struct radeon_winsys_cs *cs = sctx->b.dma.cs; - r600_need_dma_space(&sctx->b, 13); + r600_need_dma_space(&sctx->b, 13, &rdst->resource, &rsrc->resource); radeon_add_to_buffer_list(&sctx->b, &sctx->b.dma, &rsrc->resource, RADEON_USAGE_READ, RADEON_PRIO_SDMA_TEXTURE); @@ -382,7 +382,7 @@ static bool cik_sdma_copy_texture(struct si_context *sctx, copy_depth <= (1 << 11)) { struct radeon_winsys_cs *cs = sctx->b.dma.cs; - r600_need_dma_space(&sctx->b, 14); + r600_need_dma_space(&sctx->b, 14, &rdst->resource, &rsrc->resource); radeon_add_to_buffer_list(&sctx->b, &sctx->b.dma, &rsrc->resource, RADEON_USAGE_READ, RADEON_PRIO_SDMA_TEXTURE); @@ -484,7 +484,7 @@ static bool cik_sdma_copy_texture(struct si_context *sctx, dstx + copy_width != (1 << 14)))) { struct radeon_winsys_cs *cs = sctx->b.dma.cs; - r600_need_dma_space(&sctx->b, 15); + r600_need_dma_space(&sctx->b, 15, &rdst->resource, &rsrc->resource); radeon_add_to_buffer_list(&sctx->b, &sctx->b.dma, &rsrc->resource, RADEON_USAGE_READ, RADEON_PRIO_SDMA_TEXTURE); |