diff options
| author | 2018-07-23 18:30:23 -0700 | |
|---|---|---|
| committer | 2018-07-23 18:30:23 -0700 | |
| commit | f6f6f3811ef0c8ff30134755fadc7222f070c507 (patch) | |
| tree | 63122d84de79dd7723d0f475e9bc0aed0db58c02 | |
| parent | Merge pull request #780 from lioncash/move (diff) | |
| parent | gl_shader_decompiler: Simplify GetCommonDeclarations() (diff) | |
| download | yuzu-f6f6f3811ef0c8ff30134755fadc7222f070c507.tar.gz yuzu-f6f6f3811ef0c8ff30134755fadc7222f070c507.tar.xz yuzu-f6f6f3811ef0c8ff30134755fadc7222f070c507.zip | |
Merge pull request #781 from lioncash/decl
gl_shader_decompiler: Simplify GetCommonDeclarations()
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index ba827181b..e771411ef 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -6,6 +6,9 @@ | |||
| 6 | #include <set> | 6 | #include <set> |
| 7 | #include <string> | 7 | #include <string> |
| 8 | #include <string_view> | 8 | #include <string_view> |
| 9 | |||
| 10 | #include <fmt/format.h> | ||
| 11 | |||
| 9 | #include "common/assert.h" | 12 | #include "common/assert.h" |
| 10 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 11 | #include "video_core/engines/shader_bytecode.h" | 14 | #include "video_core/engines/shader_bytecode.h" |
| @@ -1774,11 +1777,8 @@ private: | |||
| 1774 | }; // namespace Decompiler | 1777 | }; // namespace Decompiler |
| 1775 | 1778 | ||
| 1776 | std::string GetCommonDeclarations() { | 1779 | std::string GetCommonDeclarations() { |
| 1777 | std::string declarations; | 1780 | return fmt::format("#define MAX_CONSTBUFFER_ELEMENTS {}\n", |
| 1778 | declarations += "#define MAX_CONSTBUFFER_ELEMENTS " + | 1781 | RasterizerOpenGL::MaxConstbufferSize / sizeof(GLvec4)); |
| 1779 | std::to_string(RasterizerOpenGL::MaxConstbufferSize / (sizeof(GLvec4))); | ||
| 1780 | declarations += '\n'; | ||
| 1781 | return declarations; | ||
| 1782 | } | 1782 | } |
| 1783 | 1783 | ||
| 1784 | boost::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, u32 main_offset, | 1784 | boost::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, u32 main_offset, |