radeonsi: check ctx->sdma_cs before using it
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 7 Jan 2020 14:57:10 +0000 (15:57 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 8 Jan 2020 08:31:35 +0000 (09:31 +0100)
commit5f8daae4d829c9f734d2f41058990809d2dba349
tree3118c93ae3a9cbd815aabb675c992a0b972f2fe8
parente565fd4255f0ddef73fa88c413b670159c7e5416
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")
src/gallium/drivers/radeonsi/si_buffer.c