mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoConfig: Add config options for ubershaders
This commit is contained in:
@ -168,6 +168,35 @@ struct VideoConfig final
|
||||
// Currently only supported with Vulkan.
|
||||
int iCommandBufferExecuteInterval;
|
||||
|
||||
// The following options determine the ubershader mode:
|
||||
// No ubershaders:
|
||||
// - bBackgroundShaderCompiling = false
|
||||
// - bDisableSpecializedShaders = false
|
||||
// Hybrid/background compiling:
|
||||
// - bBackgroundShaderCompiling = true
|
||||
// - bDisableSpecializedShaders = false
|
||||
// Ubershaders only:
|
||||
// - bBackgroundShaderCompiling = false
|
||||
// - bDisableSpecializedShaders = true
|
||||
|
||||
// Enable background shader compiling, use ubershaders while waiting.
|
||||
bool bBackgroundShaderCompiling;
|
||||
|
||||
// Use ubershaders only, don't compile specialized shaders.
|
||||
bool bDisableSpecializedShaders;
|
||||
|
||||
// Precompile ubershader variants at boot/config reload time.
|
||||
bool bPrecompileUberShaders;
|
||||
|
||||
// Number of shader compiler threads.
|
||||
// 0 disables background compilation.
|
||||
// -1 uses an automatic number based on the CPU threads.
|
||||
int iShaderCompilerThreads;
|
||||
|
||||
// Temporary toggling of ubershaders, for debugging
|
||||
bool bForceVertexUberShaders;
|
||||
bool bForcePixelUberShaders;
|
||||
|
||||
// Static config per API
|
||||
// TODO: Move this out of VideoConfig
|
||||
struct
|
||||
@ -226,6 +255,10 @@ struct VideoConfig final
|
||||
return backend_info.bSupportsGPUTextureDecoding && bEnableGPUTextureDecoding;
|
||||
}
|
||||
bool UseVertexRounding() const { return bVertexRounding && iEFBScale != SCALE_1X; }
|
||||
u32 GetShaderCompilerThreads() const;
|
||||
bool CanUseUberShaders() const;
|
||||
bool CanPrecompileUberShaders() const;
|
||||
bool CanBackgroundCompileShaders() const;
|
||||
};
|
||||
|
||||
extern VideoConfig g_Config;
|
||||
|
Reference in New Issue
Block a user