From bd8b9bbcee93549f323352f227ff44d0e79e0ad4 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 26 Feb 2020 16:13:47 -0300 Subject: gl_shader_cache: Rework shader cache and remove post-specializations Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it. --- src/video_core/renderer_opengl/gl_shader_decompiler.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.h') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.h b/src/video_core/renderer_opengl/gl_shader_decompiler.h index 0f692c1db..ae97ab504 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.h +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include "common/common_types.h" @@ -18,10 +19,8 @@ class ShaderIR; } namespace OpenGL { -class Device; -} -namespace OpenGL::GLShader { +class Device; using Maxwell = Tegra::Engines::Maxwell3D::Regs; using SamplerEntry = VideoCommon::Shader::Sampler; @@ -78,11 +77,9 @@ struct ShaderEntries { std::size_t shader_length{}; }; -ShaderEntries GetEntries(const VideoCommon::Shader::ShaderIR& ir); - -std::string GetCommonDeclarations(); +ShaderEntries MakeEntries(const VideoCommon::Shader::ShaderIR& ir); -std::string Decompile(const Device& device, const VideoCommon::Shader::ShaderIR& ir, - Tegra::Engines::ShaderType stage, const std::string& suffix); +std::string DecompileShader(const Device& device, const VideoCommon::Shader::ShaderIR& ir, + Tegra::Engines::ShaderType stage, std::string_view suffix = {}); -} // namespace OpenGL::GLShader +} // namespace OpenGL -- cgit v1.2.3