1
0
Fork 0
forked from suyu/suyu

Merge pull request #781 from lioncash/decl

gl_shader_decompiler: Simplify GetCommonDeclarations()
This commit is contained in:
bunnei 2018-07-23 18:30:23 -07:00 committed by GitHub
commit f6f6f3811e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,9 @@
#include <set> #include <set>
#include <string> #include <string>
#include <string_view> #include <string_view>
#include <fmt/format.h>
#include "common/assert.h" #include "common/assert.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "video_core/engines/shader_bytecode.h" #include "video_core/engines/shader_bytecode.h"
@ -1774,11 +1777,8 @@ private:
}; // namespace Decompiler }; // namespace Decompiler
std::string GetCommonDeclarations() { std::string GetCommonDeclarations() {
std::string declarations; return fmt::format("#define MAX_CONSTBUFFER_ELEMENTS {}\n",
declarations += "#define MAX_CONSTBUFFER_ELEMENTS " + RasterizerOpenGL::MaxConstbufferSize / sizeof(GLvec4));
std::to_string(RasterizerOpenGL::MaxConstbufferSize / (sizeof(GLvec4)));
declarations += '\n';
return declarations;
} }
boost::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, u32 main_offset, boost::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, u32 main_offset,