mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-17 03:17:53 +00:00
gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList()
Avoids potentially perfoming multiple reallocations when we know the total amount of memory we need beforehand.
This commit is contained in:
parent
c984e79040
commit
f52fb79b19
1 changed files with 2 additions and 0 deletions
|
@ -507,6 +507,8 @@ private:
|
||||||
|
|
||||||
/// Build the GLSL register list.
|
/// Build the GLSL register list.
|
||||||
void BuildRegisterList() {
|
void BuildRegisterList() {
|
||||||
|
regs.reserve(Register::NumRegisters);
|
||||||
|
|
||||||
for (size_t index = 0; index < Register::NumRegisters; ++index) {
|
for (size_t index = 0; index < Register::NumRegisters; ++index) {
|
||||||
regs.emplace_back(index, suffix);
|
regs.emplace_back(index, suffix);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue