radeonsi/gfx9: wait for main part compilation of 1st shaders of merged shaders
authorMarek Olšák <marek.olsak@amd.com>
Thu, 1 Jun 2017 16:57:37 +0000 (18:57 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 7 Jun 2017 16:43:42 +0000 (18:43 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index 631272e..727bf4b 100644 (file)
@@ -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