diff options
| author | 2020-04-21 20:16:02 -0400 | |
|---|---|---|
| committer | 2020-04-21 20:16:02 -0400 | |
| commit | d64290884a3f07971e5432f24a984d997bf8aba0 (patch) | |
| tree | 56842a9ec3209326393061b992749d07698977cd /src | |
| parent | Merge pull request #3745 from bunnei/fix-homebrew-load (diff) | |
| parent | gl_shader_decompiler: Avoid copies where applicable (diff) | |
| download | yuzu-d64290884a3f07971e5432f24a984d997bf8aba0.tar.gz yuzu-d64290884a3f07971e5432f24a984d997bf8aba0.tar.xz yuzu-d64290884a3f07971e5432f24a984d997bf8aba0.zip | |
Merge pull request #3714 from lioncash/copies
gl_shader_decompiler: Avoid copies where applicable
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 22242cce9..0cd3ad7e1 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -484,7 +484,7 @@ private: | |||
| 484 | code.AddLine("switch (jmp_to) {{"); | 484 | code.AddLine("switch (jmp_to) {{"); |
| 485 | 485 | ||
| 486 | for (const auto& pair : ir.GetBasicBlocks()) { | 486 | for (const auto& pair : ir.GetBasicBlocks()) { |
| 487 | const auto [address, bb] = pair; | 487 | const auto& [address, bb] = pair; |
| 488 | code.AddLine("case 0x{:X}U: {{", address); | 488 | code.AddLine("case 0x{:X}U: {{", address); |
| 489 | ++code.scope; | 489 | ++code.scope; |
| 490 | 490 | ||
| @@ -1484,8 +1484,8 @@ private: | |||
| 1484 | dy += '('; | 1484 | dy += '('; |
| 1485 | 1485 | ||
| 1486 | for (std::size_t index = 0; index < components; ++index) { | 1486 | for (std::size_t index = 0; index < components; ++index) { |
| 1487 | const auto operand_x{derivates.at(index * 2)}; | 1487 | const auto& operand_x{derivates.at(index * 2)}; |
| 1488 | const auto operand_y{derivates.at(index * 2 + 1)}; | 1488 | const auto& operand_y{derivates.at(index * 2 + 1)}; |
| 1489 | dx += Visit(operand_x).AsFloat(); | 1489 | dx += Visit(operand_x).AsFloat(); |
| 1490 | dy += Visit(operand_y).AsFloat(); | 1490 | dy += Visit(operand_y).AsFloat(); |
| 1491 | 1491 | ||