From 2f1a7cbee1ffecdd25ebc206ceab55ef934b7256 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 16 Mar 2018 23:10:22 +1000 Subject: Implement "Skip" ubershader mode Skip ubershader mode works the same as hybrid ubershaders in that the shaders are compiled asynchronously. However, instead of using the ubershader to draw the object, it skips it entirely until the specialized shader is made available. This mode will likely result in broken effects where a game creates an EFB copy, and does not redraw it every frame. Therefore, it is not a recommended option, however, it may result in better performance on low-end systems. --- Source/Core/VideoCommon/VideoConfig.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 55abd69e75..9c90c009a0 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -103,7 +103,8 @@ void VideoConfig::Refresh() iCommandBufferExecuteInterval = Config::Get(Config::GFX_COMMAND_BUFFER_EXECUTE_INTERVAL); bShaderCache = Config::Get(Config::GFX_SHADER_CACHE); bWaitForShadersBeforeStarting = Config::Get(Config::GFX_WAIT_FOR_SHADERS_BEFORE_STARTING); - iUberShaderMode = static_cast(Config::Get(Config::GFX_UBERSHADER_MODE)); + iShaderCompilationMode = + static_cast(Config::Get(Config::GFX_SHADER_COMPILATION_MODE)); iShaderCompilerThreads = Config::Get(Config::GFX_SHADER_COMPILER_THREADS); iShaderPrecompilerThreads = Config::Get(Config::GFX_SHADER_PRECOMPILER_THREADS); @@ -178,6 +179,12 @@ bool VideoConfig::IsVSync() const return bVSync && !Core::GetIsThrottlerTempDisabled(); } +bool VideoConfig::UsingUberShaders() const +{ + return iShaderCompilationMode == ShaderCompilationMode::SynchronousUberShaders || + iShaderCompilationMode == ShaderCompilationMode::AsynchronousUberShaders; +} + static u32 GetNumAutoShaderCompilerThreads() { // Automatic number. We use clamp(cpus - 3, 1, 4). -- cgit v1.2.3