diff options
| author | 2020-04-14 01:34:20 -0300 | |
|---|---|---|
| committer | 2020-04-14 01:34:20 -0300 | |
| commit | 453d7419d92fc089c8a3c55e1c9ac344ebd161b3 (patch) | |
| tree | 29512449b22713a2afe043852b889e4414b72d61 /src | |
| parent | Merge pull request #3636 from ReinUsesLisp/drop-vk-hpp (diff) | |
| download | yuzu-453d7419d92fc089c8a3c55e1c9ac344ebd161b3.tar.gz yuzu-453d7419d92fc089c8a3c55e1c9ac344ebd161b3.tar.xz yuzu-453d7419d92fc089c8a3c55e1c9ac344ebd161b3.zip | |
gl_shader_cache: Use CompileDepth::FullDecompile on GLSL
From my testing on a Splatoon 2 shader that takes 3800ms on average to
compile changing to FullDecompile reduces it to 900ms on average.
The shader decoder will automatically fallback to a more naive method if
it can't use full decompile.
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 6d2ff20f9..12c6dcfde 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -34,6 +34,8 @@ | |||
| 34 | namespace OpenGL { | 34 | namespace OpenGL { |
| 35 | 35 | ||
| 36 | using Tegra::Engines::ShaderType; | 36 | using Tegra::Engines::ShaderType; |
| 37 | using VideoCommon::Shader::CompileDepth; | ||
| 38 | using VideoCommon::Shader::CompilerSettings; | ||
| 37 | using VideoCommon::Shader::ProgramCode; | 39 | using VideoCommon::Shader::ProgramCode; |
| 38 | using VideoCommon::Shader::Registry; | 40 | using VideoCommon::Shader::Registry; |
| 39 | using VideoCommon::Shader::ShaderIR; | 41 | using VideoCommon::Shader::ShaderIR; |
| @@ -43,7 +45,7 @@ namespace { | |||
| 43 | constexpr u32 STAGE_MAIN_OFFSET = 10; | 45 | constexpr u32 STAGE_MAIN_OFFSET = 10; |
| 44 | constexpr u32 KERNEL_MAIN_OFFSET = 0; | 46 | constexpr u32 KERNEL_MAIN_OFFSET = 0; |
| 45 | 47 | ||
| 46 | constexpr VideoCommon::Shader::CompilerSettings COMPILER_SETTINGS{}; | 48 | constexpr CompilerSettings COMPILER_SETTINGS{CompileDepth::FullDecompile}; |
| 47 | 49 | ||
| 48 | /// Gets the address for the specified shader stage program | 50 | /// Gets the address for the specified shader stage program |
| 49 | GPUVAddr GetShaderAddress(Core::System& system, Maxwell::ShaderProgram program) { | 51 | GPUVAddr GetShaderAddress(Core::System& system, Maxwell::ShaderProgram program) { |