From 3377b78ea783ced2088370d698114b79b4ed1aa7 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 13 Mar 2020 23:52:51 -0300 Subject: astc: Call std::vector::reserve on texelWeightValues to avoid reallocating --- src/video_core/textures/astc.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/video_core/textures') diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp index eb93b44bd..5c65844dd 100644 --- a/src/video_core/textures/astc.cpp +++ b/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 texelWeightValues; + texelWeightValues.reserve(64); + InputBitStream weightStream(texelWeightData); DecodeIntegerSequence(texelWeightValues, weightStream, weightParams.m_MaxWeight, -- cgit v1.2.3