mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 12:55:39 +01:00
Fix bug when going from smaller to higher bit depth
This commit is contained in:
parent
ad17404bf7
commit
9a0fbebac3
@ -54,6 +54,7 @@
|
||||
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
|
||||
namespace PVRTCC {
|
||||
|
||||
@ -119,8 +120,8 @@ namespace PVRTCC {
|
||||
uint8 ret = 0;
|
||||
while(bitsLeft > oldDepth) {
|
||||
ret |= val;
|
||||
ret <<= oldDepth;
|
||||
bitsLeft -= oldDepth;
|
||||
ret <<= std::min(bitsLeft, oldDepth);
|
||||
}
|
||||
|
||||
return ret | (val >> (oldDepth - bitsLeft));
|
||||
|
Loading…
Reference in New Issue
Block a user