radeonsi: make si_fence_server_signal flush pipe without work
authorPeng Huang <shawn.p.huang@gmail.com>
Sun, 2 Feb 2020 03:31:00 +0000 (22:31 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 12 Feb 2020 23:51:50 +0000 (23:51 +0000)
glSignalSemaphoreEXT sometime doesn't signal the semaphore, it is
because radeonsi doesn't flush if gl context doesn't have pending
work. Fix the porblem by always submit ib.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: 19.3 20.0 <mesa-stable@lists.freedesktop.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3779>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3779>

src/gallium/drivers/radeonsi/si_fence.c

index e9dd3e937f25954500182843172c9992bcbcf3f0..26b5fc4bdba80654b4d5e2bd8c8f39ab6a881b7d 100644 (file)
@@ -606,7 +606,11 @@ static void si_fence_server_signal(struct pipe_context *ctx,
         * Therefore, we must make sure that we flush the pipe to avoid
         * new work being emitted and getting executed before the signal
         * operation.
+        * 
+        * Set sctx->initial_gfx_cs_size to force IB submission even if
+        * it is empty.
         */
+       sctx->initial_gfx_cs_size = 0;
        si_flush_from_st(ctx, NULL, PIPE_FLUSH_ASYNC);
 }