X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=rans.shader;fp=rans.shader;h=5b13d7ea75e25c2d63f486fb59a8c5bc54019d00;hb=f11496643290d0f3413ec603c5d9ef0e3416f7ec;hp=925543ef7dfa284d0fddbce411a61444438dbc9f;hpb=69a9452808b96321fd04c891d0a13ba7076f1c69;p=narabu diff --git a/rans.shader b/rans.shader index 925543e..5b13d7e 100644 --- a/rans.shader +++ b/rans.shader @@ -148,7 +148,7 @@ void encode_8(uint streamgroup_num, uint coeff_row, layout(r8i) restrict readonl uint sign_bias = ransdist[enc.lut_base + 255].x + ransdist[enc.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;