diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2020-01-07 15:57:10 +0100 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-01-08 11:32:35 -0800 |
commit | 11c11597064f483d730f04b917220c9b235506b1 (patch) | |
tree | ce1d9f98a40b3577aecba0401fe21e18452799a0 | |
parent | d4a1f1daaf36fb5b70b18c858d2a2c1716e4b550 (diff) |
radeonsi: check ctx->sdma_cs before using it
e5167a9276de1f383888714b41d3a9be2b9c1da9 disabled SDMA for gfx8.
This caused 3 piglit arb_sparse_buffer tests (basic, buffer-data
and commit) to crash on GFX8.
Reported-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: e5167a9276d ("radeonsi: disable SDMA on gfx8 to fix corruption on RX 580")
(cherry picked from commit 5f8daae4d829c9f734d2f41058990809d2dba349)
Conflicts resolved by Dylan Baker
Conflicts:
src/gallium/drivers/radeonsi/si_buffer.c
-rw-r--r-- | src/gallium/drivers/radeonsi/si_buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c index 4fda5cb15a5..8f7e417928a 100644 --- a/src/gallium/drivers/radeonsi/si_buffer.c +++ b/src/gallium/drivers/radeonsi/si_buffer.c @@ -797,7 +797,8 @@ static bool si_resource_commit(struct pipe_context *pctx, si_flush_dma_cs(ctx, PIPE_FLUSH_ASYNC, NULL); } - ctx->ws->cs_sync_flush(ctx->dma_cs); + if (ctx->dma_cs) + ctx->ws->cs_sync_flush(ctx->dma_cs); ctx->ws->cs_sync_flush(ctx->gfx_cs); assert(resource->target == PIPE_BUFFER); |