From 28adf0d00c6b5506ed2206b950336bdc568d2247 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 23 Aug 2019 19:17:05 -0400 Subject: [PATCH] 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 --- src/gallium/drivers/radeonsi/si_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2