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/si_dma.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/si_dma.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c index 03321f583a5..25fb4b76812 100644 --- a/src/gallium/drivers/radeonsi/si_dma.c +++ b/src/gallium/drivers/radeonsi/si_dma.c @@ -64,7 +64,7 @@ static void si_dma_copy_buffer(struct si_context *ctx, } ncopy = (size / max_csize) + !!(size % max_csize); - r600_need_dma_space(&ctx->b, ncopy * 5); + r600_need_dma_space(&ctx->b, ncopy * 5, rdst, rsrc); radeon_add_to_buffer_list(&ctx->b, &ctx->b.dma, rsrc, RADEON_USAGE_READ, RADEON_PRIO_SDMA_BUFFER); @@ -161,7 +161,7 @@ static void si_dma_copy_tile(struct si_context *ctx, mt = G_009910_MICRO_TILE_MODE(tile_mode); size = (copy_height * pitch) / 4; ncopy = (size / SI_DMA_COPY_MAX_SIZE_DW) + !!(size % SI_DMA_COPY_MAX_SIZE_DW); - r600_need_dma_space(&ctx->b, ncopy * 9); + r600_need_dma_space(&ctx->b, ncopy * 9, &rdst->resource, &rsrc->resource); radeon_add_to_buffer_list(&ctx->b, &ctx->b.dma, &rsrc->resource, RADEON_USAGE_READ, RADEON_PRIO_SDMA_TEXTURE); |