mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-09 15:15:38 +00:00
Fix the interleaving by doing it when we're actually reading in the blocks
This commit is contained in:
parent
db914018f1
commit
2263080faa
|
@ -105,7 +105,12 @@ namespace PVRTCC {
|
|||
|
||||
for(uint32 j = 0; j < blocksH; j++) {
|
||||
for(uint32 i = 0; i < blocksW; i++) {
|
||||
uint32 offset = (j * blocksW + i) * blockSz;
|
||||
|
||||
// The blocks are initially arranged in morton order. Let's
|
||||
// linearize them...
|
||||
uint32 idx = Interleave(j, i);
|
||||
|
||||
uint32 offset = idx * blockSz;
|
||||
blocks.push_back( Block(dcj.inBuf + offset) );
|
||||
}
|
||||
}
|
||||
|
@ -119,11 +124,7 @@ namespace PVRTCC {
|
|||
for(uint32 j = 0; j < blocksH; j++) {
|
||||
for(uint32 i = 0; i < blocksW; i++) {
|
||||
|
||||
// The blocks are initially arranged in morton order. Let's
|
||||
// linearize them... (yes I know there are faster algorithms
|
||||
// to do this out there)
|
||||
uint32 idx = Interleave(i, j);
|
||||
// uint32 idx = j * blocksW + i;
|
||||
uint32 idx = j * blocksW + i;
|
||||
assert(idx < static_cast<uint32>(blocks.size()));
|
||||
|
||||
Block &b = blocks[idx];
|
||||
|
|
Loading…
Reference in a new issue