Fix write-after-read hazard
diff --git a/tests/shader/intersection_leaf.comp b/tests/shader/intersection_leaf.comp
index c00bd32..c3e594b 100644
--- a/tests/shader/intersection_leaf.comp
+++ b/tests/shader/intersection_leaf.comp
@@ -123,6 +123,7 @@
         }
         sh_stack[th] = bbox;
     }
+    barrier();
 
     // Do tree reduction of bicyclic semigroups
     Node inp = inbuf[gl_GlobalInvocationID.x];
diff --git a/tests/shader/union_leaf.comp b/tests/shader/union_leaf.comp
index d72acf7..e40bc6d 100644
--- a/tests/shader/union_leaf.comp
+++ b/tests/shader/union_leaf.comp
@@ -111,6 +111,7 @@
         }
         sh_stack[th] = bbox;
     }
+    barrier();
 
     // Do tree reduction of bicyclic semigroups and bounding boxes
     Node inp = inbuf[gl_GlobalInvocationID.x];