Mesa (master): radeonsi/gfx9: wait for main part compilation of 1st shaders of merged shaders

Marek Olšák mareko at kemper.freedesktop.org
Wed Jun 7 16:43:55 UTC 2017


Module: Mesa
Branch: master
Commit: b5bc826ead940211982e38c1130055d17b6cd28d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5bc826ead940211982e38c1130055d17b6cd28d

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Jun  1 18:57:37 2017 +0200

radeonsi/gfx9: wait for main part compilation of 1st shaders of merged shaders

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/gallium/drivers/radeonsi/si_state_shaders.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 631272efcd..727bf4bee9 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1602,6 +1602,10 @@ again:
 			previous_stage_sel = key->part.tcs.ls;
 		else if (sel->type == PIPE_SHADER_GEOMETRY)
 			previous_stage_sel = key->part.gs.es;
+
+		/* We need to wait for the previous shader. */
+		if (previous_stage_sel && thread_index < 0)
+			util_queue_fence_wait(&previous_stage_sel->ready);
 	}
 
 	/* Compile the main shader part if it doesn't exist. This can happen




More information about the mesa-commit mailing list