diff --git a/src/gallium/frontends/clover/spirv/invocation.cpp b/src/gallium/frontends/clover/spirv/invocation.cpp index 48f0d9e1fa0..b92bdb11cad 100644 --- a/src/gallium/frontends/clover/spirv/invocation.cpp +++ b/src/gallium/frontends/clover/spirv/invocation.cpp @@ -125,6 +125,7 @@ namespace { const pipe_binary_program_header header { uint32_t(code.size()) }; binary::section text { 0, section_type, header.num_bytes, {} }; + text.data.reserve(sizeof(header) + header.num_bytes); text.data.insert(text.data.end(), reinterpret_cast(&header), reinterpret_cast(&header) + sizeof(header)); text.data.insert(text.data.end(), code.begin(), code.end());