[dxvk] Add config option for graphics pipeline library enablement

This commit is contained in:
Philip Rebohle 2022-07-05 18:56:43 +02:00
parent 06c084616f
commit a6b0783a51
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
5 changed files with 22 additions and 2 deletions

View File

@ -272,6 +272,20 @@
# dxvk.shrinkNvidiaHvvHeap = Auto
# Controls graphics pipeline library behaviour
#
# Can be used to change VK_EXT_graphics_pipeline_library usage for
# debugging purpose. Doing so will likely result in increased stutter
# or degraded performance.
#
# Supported values:
# - Auto: Enable if supported, and compile optimized pipelines in the background
# - True: Enable if supported, but do not compile optimized pipelines
# - False: Always disable the feature
# dxvk.enableGraphicsPipelineLibrary = Auto
# Sets enabled HUD elements
#
# Behaves like the DXVK_HUD environment variable if the

View File

@ -46,7 +46,8 @@ namespace dxvk {
// cannot use this effectively in many games since no client API provides
// interpoation qualifiers in vertex shaders.
return m_features.extGraphicsPipelineLibrary.graphicsPipelineLibrary
&& m_properties.extGraphicsPipelineLibrary.graphicsPipelineLibraryIndependentInterpolationDecoration;
&& m_properties.extGraphicsPipelineLibrary.graphicsPipelineLibraryIndependentInterpolationDecoration
&& m_options.enableGraphicsPipelineLibrary != Tristate::False;
}

View File

@ -6,6 +6,7 @@ namespace dxvk {
enableDebugUtils = config.getOption<bool> ("dxvk.enableDebugUtils", false);
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
enableGraphicsPipelineLibrary = config.getOption<Tristate>("dxvk.enableGraphicsPipelineLibrary", Tristate::Auto);
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
shrinkNvidiaHvvHeap = config.getOption<Tristate>("dxvk.shrinkNvidiaHvvHeap", Tristate::Auto);
hud = config.getOption<std::string>("dxvk.hud", "");

View File

@ -18,6 +18,9 @@ namespace dxvk {
/// when using the state cache
int32_t numCompilerThreads;
/// Enable graphics pipeline library
Tristate enableGraphicsPipelineLibrary;
/// Shader-related options
Tristate useRawSsbo;

View File

@ -167,7 +167,8 @@ namespace dxvk {
m_cache (device),
m_workers (device, &m_cache),
m_stateCache(device, this, &m_workers) {
Logger::info(str::format("DXVK: Graphics pipeline libraries ",
(m_device->canUseGraphicsPipelineLibrary() ? "supported" : "not supported")));
}