diff options
| author | 2019-04-04 19:35:01 -0400 | |
|---|---|---|
| committer | 2019-04-04 19:35:04 -0400 | |
| commit | 52746ed8dc776ee3f84b07791379941dbbc92fe4 (patch) | |
| tree | f97a0e6b06592284f54e872028fae35ee087259c /src | |
| parent | Merge pull request #2330 from lioncash/pragma (diff) | |
| download | yuzu-52746ed8dc776ee3f84b07791379941dbbc92fe4.tar.gz yuzu-52746ed8dc776ee3f84b07791379941dbbc92fe4.tar.xz yuzu-52746ed8dc776ee3f84b07791379941dbbc92fe4.zip | |
gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary()
Temporal generally indicates a relation to time, but this is just
creating a temporary, so this isn't really an accurate name for what the
function is actually doing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 11d1169f0..26162e56f 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -69,10 +69,10 @@ public: | |||
| 69 | shader_source += '\n'; | 69 | shader_source += '\n'; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | std::string GenerateTemporal() { | 72 | std::string GenerateTemporary() { |
| 73 | std::string temporal = "tmp"; | 73 | std::string temporary = "tmp"; |
| 74 | temporal += std::to_string(temporal_index++); | 74 | temporary += std::to_string(temporary_index++); |
| 75 | return temporal; | 75 | return temporary; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | std::string GetResult() { | 78 | std::string GetResult() { |
| @@ -87,7 +87,7 @@ private: | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | std::string shader_source; | 89 | std::string shader_source; |
| 90 | u32 temporal_index = 1; | 90 | u32 temporary_index = 1; |
| 91 | }; | 91 | }; |
| 92 | 92 | ||
| 93 | /// Generates code to use for a swizzle operation. | 93 | /// Generates code to use for a swizzle operation. |
| @@ -540,7 +540,7 @@ private: | |||
| 540 | 540 | ||
| 541 | } else if (std::holds_alternative<OperationNode>(*offset)) { | 541 | } else if (std::holds_alternative<OperationNode>(*offset)) { |
| 542 | // Indirect access | 542 | // Indirect access |
| 543 | const std::string final_offset = code.GenerateTemporal(); | 543 | const std::string final_offset = code.GenerateTemporary(); |
| 544 | code.AddLine("uint " + final_offset + " = (ftou(" + Visit(offset) + ") / 4) & " + | 544 | code.AddLine("uint " + final_offset + " = (ftou(" + Visit(offset) + ") / 4) & " + |
| 545 | std::to_string(MAX_CONSTBUFFER_ELEMENTS - 1) + ';'); | 545 | std::to_string(MAX_CONSTBUFFER_ELEMENTS - 1) + ';'); |
| 546 | return fmt::format("{}[{} / 4][{} % 4]", GetConstBuffer(cbuf->GetIndex()), | 546 | return fmt::format("{}[{} / 4][{} % 4]", GetConstBuffer(cbuf->GetIndex()), |
| @@ -587,9 +587,9 @@ private: | |||
| 587 | // There's a bug in NVidia's proprietary drivers that makes precise fail on fragment shaders | 587 | // There's a bug in NVidia's proprietary drivers that makes precise fail on fragment shaders |
| 588 | const std::string precise = stage != ShaderStage::Fragment ? "precise " : ""; | 588 | const std::string precise = stage != ShaderStage::Fragment ? "precise " : ""; |
| 589 | 589 | ||
| 590 | const std::string temporal = code.GenerateTemporal(); | 590 | const std::string temporary = code.GenerateTemporary(); |
| 591 | code.AddLine(precise + "float " + temporal + " = " + value + ';'); | 591 | code.AddLine(precise + "float " + temporary + " = " + value + ';'); |
| 592 | return temporal; | 592 | return temporary; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | std::string VisitOperand(Operation operation, std::size_t operand_index) { | 595 | std::string VisitOperand(Operation operation, std::size_t operand_index) { |
| @@ -601,9 +601,9 @@ private: | |||
| 601 | return Visit(operand); | 601 | return Visit(operand); |
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | const std::string temporal = code.GenerateTemporal(); | 604 | const std::string temporary = code.GenerateTemporary(); |
| 605 | code.AddLine("float " + temporal + " = " + Visit(operand) + ';'); | 605 | code.AddLine("float " + temporary + " = " + Visit(operand) + ';'); |
| 606 | return temporal; | 606 | return temporary; |
| 607 | } | 607 | } |
| 608 | 608 | ||
| 609 | std::string VisitOperand(Operation operation, std::size_t operand_index, Type type) { | 609 | std::string VisitOperand(Operation operation, std::size_t operand_index, Type type) { |