[Mesa-dev] [PATCH 25/25] radeonsi: use a threaded context even for debug contexts

Nicolai Hähnle nhaehnle at gmail.com
Sun Oct 22 19:08:08 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/drivers/radeonsi/si_pipe.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 19428d8b4e7..c5742cf9883 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -382,29 +382,22 @@ static struct pipe_context *si_pipe_create_context(struct pipe_screen *screen,
 	struct pipe_context *ctx;
 
 	if (sscreen->b.debug_flags & DBG(CHECK_VM))
 		flags |= PIPE_CONTEXT_DEBUG;
 
 	ctx = si_create_context(screen, flags);
 
 	if (!(flags & PIPE_CONTEXT_PREFER_THREADED))
 		return ctx;
 
-	/* Clover (compute-only) is unsupported.
-	 *
-	 * Since the threaded context creates shader states from the non-driver
-	 * thread, asynchronous compilation is required for create_{shader}_-
-	 * state not to use pipe_context. Debug contexts (ddebug) disable
-	 * asynchronous compilation, so don't use the threaded context with
-	 * those.
-	 */
-	if (flags & (PIPE_CONTEXT_COMPUTE_ONLY | PIPE_CONTEXT_DEBUG))
+	/* Clover (compute-only) is unsupported. */
+	if (flags & PIPE_CONTEXT_COMPUTE_ONLY)
 		return ctx;
 
 	/* When shaders are logged to stderr, asynchronous compilation is
 	 * disabled too. */
 	if (sscreen->b.debug_flags & DBG_ALL_SHADERS)
 		return ctx;
 
 	return threaded_context_create(ctx, &sscreen->b.pool_transfers,
 				       si_replace_buffer_storage,
 				       si_create_fence,
-- 
2.11.0



More information about the mesa-dev mailing list