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

Nicolai Hähnle nhaehnle at gmail.com
Mon Nov 6 10:23:57 UTC 2017


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

Reviewed-by: Marek Olšák <marek.olsak 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 10225353907..b193a0b4f21 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;
 
 	/* Use asynchronous flushes only on amdgpu, since the radeon
 	 * implementation for fence_server_sync is incomplete. */
 	return threaded_context_create(ctx, &sscreen->b.pool_transfers,
-- 
2.11.0



More information about the mesa-dev mailing list