summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_glsl.cpp
diff options
context:
space:
mode:
authorGravatar ameerj2021-05-21 19:55:58 -0400
committerGravatar ameerj2021-07-22 21:51:35 -0400
commitfb75d122a242a5e43d36edc916e16a873f807acd (patch)
tree1f2c7e7d8f001072d118939725cb18669e26791f /src/shader_recompiler/backend/glsl/emit_glsl.cpp
parentglsl: Pass IR::Inst& to Emit functions (diff)
downloadyuzu-fb75d122a242a5e43d36edc916e16a873f807acd.tar.gz
yuzu-fb75d122a242a5e43d36edc916e16a873f807acd.tar.xz
yuzu-fb75d122a242a5e43d36edc916e16a873f807acd.zip
glsl: Use std::string_view for Emit function args.
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.cpp b/src/shader_recompiler/backend/glsl/emit_glsl.cpp
index 0f528b027..d1c58cefc 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp
@@ -34,8 +34,8 @@ void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) {
34} 34}
35 35
36template <typename ArgType> 36template <typename ArgType>
37ArgType Arg(EmitContext& ctx, const IR::Value& arg) { 37auto Arg(EmitContext& ctx, const IR::Value& arg) {
38 if constexpr (std::is_same_v<ArgType, std::string>) { 38 if constexpr (std::is_same_v<ArgType, std::string_view>) {
39 return ctx.reg_alloc.Consume(arg); 39 return ctx.reg_alloc.Consume(arg);
40 } else if constexpr (std::is_same_v<ArgType, const IR::Value&>) { 40 } else if constexpr (std::is_same_v<ArgType, const IR::Value&>) {
41 return arg; 41 return arg;
@@ -143,7 +143,8 @@ void EmitCode(EmitContext& ctx, const IR::Program& program) {
143 143
144} // Anonymous namespace 144} // Anonymous namespace
145 145
146std::string EmitGLSL(const Profile& profile, IR::Program& program, Bindings& bindings) { 146std::string EmitGLSL(const Profile& profile, const RuntimeInfo&, IR::Program& program,
147 Bindings& bindings) {
147 EmitContext ctx{program, bindings, profile}; 148 EmitContext ctx{program, bindings, profile};
148 // ctx.SetupBuffers(); 149 // ctx.SetupBuffers();
149 EmitCode(ctx, program); 150 EmitCode(ctx, program);