]> git.sesse.net Git - narabu/commitdiff
Flip the encoding order so that it is correct.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Oct 2017 22:01:07 +0000 (00:01 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Oct 2017 22:01:07 +0000 (00:01 +0200)
rans.shader

index 8e9c4226a80a0b8595f4072490f93c072cac710d..05ac1206d1961ac3732882fa152935f4bc884fde 100644 (file)
@@ -125,7 +125,7 @@ void encode_9_7(uint streamgroup_num, uint coeff_row, layout(r16ui) restrict rea
        uint sign_bias1 = ransdist[enc1.lut_base + 255].x + ransdist[enc1.lut_base + 255].y;
        uint sign_bias2 = ransdist[enc2.lut_base + 255].x + ransdist[enc2.lut_base + 255].y;
 
-       for (uint subblock_idx = BLOCKS_PER_STREAM; subblock_idx --> 0; ) {
+       for (uint subblock_idx = 0; subblock_idx < BLOCKS_PER_STREAM; ++subblock_idx) {
                // TODO: Use SSBOs instead of a texture?
                uint x = (streamgroup_num * BLOCKS_PER_STREAM + subblock_idx) % 160;
                uint y = (streamgroup_num * BLOCKS_PER_STREAM + subblock_idx) / 160;