Commit 11c11597 authored by Pierre-Eric Pelloux-Prayer's avatar Pierre-Eric Pelloux-Prayer Committed by Dylan Baker
Browse files

radeonsi: check ctx->sdma_cs before using it

e5167a92

 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's avatarMichel Dänzer <michel@daenzer.net>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Fixes: e5167a92 ("radeonsi: disable SDMA on gfx8 to fix corruption on RX 580")
(cherry picked from commit 5f8daae4)
Conflicts resolved by Dylan Baker

Conflicts:
	src/gallium/drivers/radeonsi/si_buffer.c
parent d4a1f1da
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment