From: Steinar H. Gunderson Date: Mon, 16 Oct 2017 22:01:07 +0000 (+0200) Subject: Flip the encoding order so that it is correct. X-Git-Url: https://git.sesse.net/?p=narabu;a=commitdiff_plain;h=b8401c220bbb581e2c1334eba12f58b25eb9103b Flip the encoding order so that it is correct. --- diff --git a/rans.shader b/rans.shader index 8e9c422..05ac120 100644 --- a/rans.shader +++ b/rans.shader @@ -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;