mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 15:20:06 +00:00
Merge pull request #3714 from lioncash/copies
gl_shader_decompiler: Avoid copies where applicable
This commit is contained in:
commit
d64290884a
@ -484,7 +484,7 @@ private:
|
|||||||
code.AddLine("switch (jmp_to) {{");
|
code.AddLine("switch (jmp_to) {{");
|
||||||
|
|
||||||
for (const auto& pair : ir.GetBasicBlocks()) {
|
for (const auto& pair : ir.GetBasicBlocks()) {
|
||||||
const auto [address, bb] = pair;
|
const auto& [address, bb] = pair;
|
||||||
code.AddLine("case 0x{:X}U: {{", address);
|
code.AddLine("case 0x{:X}U: {{", address);
|
||||||
++code.scope;
|
++code.scope;
|
||||||
|
|
||||||
@ -1484,8 +1484,8 @@ private:
|
|||||||
dy += '(';
|
dy += '(';
|
||||||
|
|
||||||
for (std::size_t index = 0; index < components; ++index) {
|
for (std::size_t index = 0; index < components; ++index) {
|
||||||
const auto operand_x{derivates.at(index * 2)};
|
const auto& operand_x{derivates.at(index * 2)};
|
||||||
const auto operand_y{derivates.at(index * 2 + 1)};
|
const auto& operand_y{derivates.at(index * 2 + 1)};
|
||||||
dx += Visit(operand_x).AsFloat();
|
dx += Visit(operand_x).AsFloat();
|
||||||
dy += Visit(operand_y).AsFloat();
|
dy += Visit(operand_y).AsFloat();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user