radeonsi/gfx10: don't call gfx10_destroy_query with compute-only contexts
authorMarek Olšák <marek.olsak@amd.com>
Fri, 23 Aug 2019 23:17:05 +0000 (19:17 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 10 Sep 2019 03:43:03 +0000 (23:43 -0400)
This fixes a crash.

Cc: 19.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/drivers/radeonsi/si_pipe.c

index 4edd3e4a4eb207e6a14c6bacaefbe8d4db93d99c..0515ed067ffbadb816cbce3b9176cac1d41cd1b0 100644 (file)
@@ -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);