Mesa (staging/19.2): radeonsi/gfx10: don't call gfx10_destroy_query with compute-only contexts

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 10 16:54:20 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 732950bf360684602c26a0c6de013c9f7da804b8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=732950bf360684602c26a0c6de013c9f7da804b8

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Aug 23 19:17:05 2019 -0400

radeonsi/gfx10: don't call gfx10_destroy_query with compute-only contexts

This fixes a crash.

Cc: 19.2 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
(cherry picked from commit 28adf0d00c6b5506ed2206b950336bdc568d2247)

---

 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 ae5601a8730..b42b17a274a 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -174,7 +174,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);




More information about the mesa-commit mailing list