From: Marek Olšák Date: Fri, 23 Aug 2019 23:17:05 +0000 (-0400) Subject: radeonsi/gfx10: don't call gfx10_destroy_query with compute-only contexts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28adf0d00c6b5506ed2206b950336bdc568d2247;p=mesa.git radeonsi/gfx10: don't call gfx10_destroy_query with compute-only contexts This fixes a crash. Cc: 19.2 Reviewed-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 4edd3e4a4eb..0515ed067ff 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -176,7 +176,7 @@ static void si_destroy_context(struct pipe_context *context) si_release_all_descriptors(sctx); - if (sctx->chip_class >= GFX10) + if (sctx->chip_class >= GFX10 && sctx->has_graphics) gfx10_destroy_query(sctx); pipe_resource_reference(&sctx->esgs_ring, NULL);