diff options
| author | 2019-10-15 19:00:20 -0400 | |
|---|---|---|
| committer | 2019-10-15 19:00:48 -0400 | |
| commit | 67df3f7742187abb34d9a2eb4633334331c3318e (patch) | |
| tree | 16cb5eaae86cb451fcefa93d0f7d0f0585ea924a /src | |
| parent | gl_shader_decompiler: Fold flow_var constant into GetFlowVariable() (diff) | |
| download | yuzu-67df3f7742187abb34d9a2eb4633334331c3318e.tar.gz yuzu-67df3f7742187abb34d9a2eb4633334331c3318e.tar.xz yuzu-67df3f7742187abb34d9a2eb4633334331c3318e.zip | |
gl_shader_decompiler: Use a std::string_view with GetDeclarationWithSuffix()
This allows the function to be completely non-allocating for inputs of
all sizes (i.e. there's no heap cost for an input to convert to a
std::string_view).
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index bd0c5c5d6..2c50ed538 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -2246,7 +2246,7 @@ private: | |||
| 2246 | code.AddLine("#ifdef SAMPLER_{}_IS_BUFFER", sampler.GetIndex()); | 2246 | code.AddLine("#ifdef SAMPLER_{}_IS_BUFFER", sampler.GetIndex()); |
| 2247 | } | 2247 | } |
| 2248 | 2248 | ||
| 2249 | std::string GetDeclarationWithSuffix(u32 index, const std::string& name) const { | 2249 | std::string GetDeclarationWithSuffix(u32 index, std::string_view name) const { |
| 2250 | return fmt::format("{}_{}_{}", name, index, suffix); | 2250 | return fmt::format("{}_{}_{}", name, index, suffix); |
| 2251 | } | 2251 | } |
| 2252 | 2252 | ||