]> git.sesse.net Git - narabu/commitdiff
Add a cargo-culting barrier that seems to help the tally shader.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Oct 2017 21:12:02 +0000 (23:12 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Oct 2017 21:12:02 +0000 (23:12 +0200)
coded.dat
tally.shader

index bfe60fb37829987db21a3e54e59eb651c1a2fa9e..ecb5782bd912ce2e0280e00a917f04bc16bad643 100644 (file)
Binary files a/coded.dat and b/coded.dat differ
index fba526b96b6c29be33db626098a63a50b9ddab22..53f73aff52af4ac75712cf3ab9c6b21459a58431 100644 (file)
@@ -147,6 +147,10 @@ void main()
 
        new_val = new_dist[i];
 
+       // TODO: Why do we need this next barrier? It makes no sense.
+       memoryBarrierShared();
+       barrier();
+
        for (uint layer = 2; layer <= 256; layer *= 2) {
                if ((i & (layer - 1)) == layer - 1) {
                        new_dist[i] += new_dist[i - (layer / 2)];