astc_decoder.comp: Remove unnecessary LUT SSBOs
We can move them to instead be compile time constants within the shader.
This commit is contained in:
parent
31b125ef57
commit
ace20ba4a4
5 changed files with 34 additions and 113 deletions
|
@ -269,7 +269,7 @@ static void DecodeQuintBlock(InputBitStream& bits, IntegerEncodedVector& result,
|
|||
static void DecodeIntegerSequence(IntegerEncodedVector& result, InputBitStream& bits, u32 maxRange,
|
||||
u32 nValues) {
|
||||
// Determine encoding parameters
|
||||
IntegerEncodedValue val = EncodingsValues[maxRange];
|
||||
IntegerEncodedValue val = ASTC_ENCODINGS_VALUES[maxRange];
|
||||
|
||||
// Start decoding
|
||||
u32 nValsDecoded = 0;
|
||||
|
@ -310,7 +310,7 @@ struct TexelWeightParams {
|
|||
nIdxs *= 2;
|
||||
}
|
||||
|
||||
return EncodingsValues[m_MaxWeight].GetBitLength(nIdxs);
|
||||
return ASTC_ENCODINGS_VALUES[m_MaxWeight].GetBitLength(nIdxs);
|
||||
}
|
||||
|
||||
u32 GetNumWeightValues() const {
|
||||
|
@ -755,12 +755,12 @@ static void DecodeColorValues(u32* out, std::span<u8> data, const u32* modes, co
|
|||
// figure out the max value for each of them...
|
||||
u32 range = 256;
|
||||
while (--range > 0) {
|
||||
IntegerEncodedValue val = EncodingsValues[range];
|
||||
IntegerEncodedValue val = ASTC_ENCODINGS_VALUES[range];
|
||||
u32 bitLength = val.GetBitLength(nValues);
|
||||
if (bitLength <= nBitsForColorData) {
|
||||
// Find the smallest possible range that matches the given encoding
|
||||
while (--range > 0) {
|
||||
IntegerEncodedValue newval = EncodingsValues[range];
|
||||
IntegerEncodedValue newval = ASTC_ENCODINGS_VALUES[range];
|
||||
if (!newval.MatchesEncoding(val)) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue