summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-22 17:38:50 +0200
committerNicolai Hähnle <[email protected]>2017-11-09 14:00:42 +0100
commit609a230375cae7710b2a9f40a42341b4cd853a3e (patch)
tree1b404da87aa1ac457c8d8320b7e62081becc52c0 /src/gallium/drivers/radeonsi/si_pipe.c
parent11b380ed0c61344b461ad2d1b66bf81e2c46b84b (diff)
gallium/u_threaded: implement asynchronous flushes
This requires out-of-band creation of fences, and will be signaled to the pipe_context::flush implementation by a special TC_FLUSH_ASYNC flag. v2: - remove an incorrect assertion - handle fence_server_sync for unsubmitted fences by relying on the improved cs_add_fence_dependency - only implement asynchronous flushes on amdgpu Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index a299ab7aff7..ef5cddda0eb 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -397,8 +397,11 @@ static struct pipe_context *si_pipe_create_context(struct pipe_screen *screen,
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,
si_replace_buffer_storage,
+ sscreen->b.info.drm_major >= 3 ? si_create_fence : NULL,
&((struct si_context*)ctx)->b.tc);
}