mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-14 16:59:58 +00:00
astc: Call std::vector::reserve on texelWeightValues to avoid reallocating
This commit is contained in:
parent
801fd04f75
commit
3377b78ea7
1 changed files with 2 additions and 0 deletions
|
@ -1538,6 +1538,8 @@ static void DecompressBlock(const u8 inBuf[16], const u32 blockWidth, const u32
|
||||||
memset(texelWeightData + clearByteStart, 0, 16 - clearByteStart);
|
memset(texelWeightData + clearByteStart, 0, 16 - clearByteStart);
|
||||||
|
|
||||||
std::vector<IntegerEncodedValue> texelWeightValues;
|
std::vector<IntegerEncodedValue> texelWeightValues;
|
||||||
|
texelWeightValues.reserve(64);
|
||||||
|
|
||||||
InputBitStream weightStream(texelWeightData);
|
InputBitStream weightStream(texelWeightData);
|
||||||
|
|
||||||
DecodeIntegerSequence(texelWeightValues, weightStream, weightParams.m_MaxWeight,
|
DecodeIntegerSequence(texelWeightValues, weightStream, weightParams.m_MaxWeight,
|
||||||
|
|
Loading…
Reference in a new issue