diff --git a/shader/pathtag_scan.wgsl b/shader/pathtag_scan.wgsl index 009e3b4..0d8e9e5 100644 --- a/shader/pathtag_scan.wgsl +++ b/shader/pathtag_scan.wgsl @@ -60,6 +60,7 @@ fn main( workgroupBarrier(); sh_monoid[local_id.x] = agg_part; } + workgroupBarrier(); // prefix up to this workgroup #ifdef small var tm = sh_parent[0]; diff --git a/shader/pathtag_scan1.wgsl b/shader/pathtag_scan1.wgsl index 1d36ab5..13c31c5 100644 --- a/shader/pathtag_scan1.wgsl +++ b/shader/pathtag_scan1.wgsl @@ -55,6 +55,7 @@ fn main( workgroupBarrier(); sh_monoid[local_id.x] = agg; } + workgroupBarrier(); // prefix up to this workgroup var tm = sh_parent[0]; if local_id.x > 0u {