소스 검색

astc: Call std::vector::reserve on texelWeightValues to avoid reallocating

ReinUsesLisp 6 년 전
부모
커밋
3377b78ea7
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/video_core/textures/astc.cpp

+ 2 - 0
src/video_core/textures/astc.cpp

@@ -1538,6 +1538,8 @@ static void DecompressBlock(const u8 inBuf[16], const u32 blockWidth, const u32
     memset(texelWeightData + clearByteStart, 0, 16 - clearByteStart);
 
     std::vector<IntegerEncodedValue> texelWeightValues;
+    texelWeightValues.reserve(64);
+
     InputBitStream weightStream(texelWeightData);
 
     DecodeIntegerSequence(texelWeightValues, weightStream, weightParams.m_MaxWeight,