From 134f3ff9b4e0ca0e9a5d41d14d5f5a938762b5fd Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sat, 14 Mar 2020 00:09:56 -0300 Subject: astc: Call std::vector:reserve on decodedClolorValues to avoid reallocating --- src/video_core/textures/astc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp index 5c65844dd..c15548d34 100644 --- a/src/video_core/textures/astc.cpp +++ b/src/video_core/textures/astc.cpp @@ -811,6 +811,8 @@ static void DecodeColorValues(u32* out, u8* data, const u32* modes, const u32 nP // We now have enough to decode our s32eger sequence. std::vector decodedColorValues; + decodedColorValues.reserve(32); + InputBitStream colorStream(data); DecodeIntegerSequence(decodedColorValues, colorStream, range, nValues); -- cgit v1.2.3