[dxvk] Add option to control pipeline lifetime tracking

This commit is contained in:
Philip Rebohle 2022-08-09 04:54:42 +02:00 committed by Philip Rebohle
parent eddbe73ba4
commit 915b03ba7b
5 changed files with 31 additions and 0 deletions

View File

@ -286,6 +286,20 @@
# dxvk.enableGraphicsPipelineLibrary = Auto
# Controls pipeline lifetime tracking
#
# If enabled, pipeline libraries will be freed aggressively in order
# save memory and address space. Has no effect if graphics pipeline
# libraries are not supported or disabled.
#
# Supported values:
# - Auto: Enable tracking for 32-bit applications only
# - True: Always enable tracking
# - False: Always disable tracking
# dxvk.trackPipelineLifetime = Auto
# Sets enabled HUD elements
#
# Behaves like the DXVK_HUD environment variable if the

View File

@ -68,6 +68,13 @@ namespace dxvk {
}
bool DxvkDevice::mustTrackPipelineLifetime() const {
bool result = env::is32BitHostPlatform();
applyTristate(result, m_options.trackPipelineLifetime);
return result && canUseGraphicsPipelineLibrary();
}
DxvkFramebufferSize DxvkDevice::getDefaultFramebufferSize() const {
return DxvkFramebufferSize {
m_properties.core.properties.limits.maxFramebufferWidth,

View File

@ -209,6 +209,12 @@ namespace dxvk {
*/
bool canUsePipelineCacheControl() const;
/**
* \brief Checks whether pipelines should be tracked
* \returns \c true if pipelines need to be tracked
*/
bool mustTrackPipelineLifetime() const;
/**
* \brief Queries default framebuffer size
* \returns Default framebuffer size

View File

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

View File

@ -21,6 +21,9 @@ namespace dxvk {
/// Enable graphics pipeline library
Tristate enableGraphicsPipelineLibrary;
/// Enables pipeline lifetime tracking
Tristate trackPipelineLifetime;
/// Shader-related options
Tristate useRawSsbo;