mirror of https://github.com/doitsujin/dxvk
[dxvk] Add a config option to enable debug utils in addition to DXVK_PERF_EVENTS=1
This commit is contained in:
parent
cf1cee04b8
commit
5156994440
10
dxvk.conf
10
dxvk.conf
|
@ -557,3 +557,13 @@
|
||||||
# - True/False
|
# - True/False
|
||||||
|
|
||||||
# d3d9.apitraceMode = False
|
# d3d9.apitraceMode = False
|
||||||
|
|
||||||
|
# Debug Utils
|
||||||
|
#
|
||||||
|
# Enables debug utils as this is off by default, this enables user annotations like BeginEvent()/EndEvent().
|
||||||
|
# Alternatively could be enabled with DXVK_PERF_EVENTS=1 environment variable.
|
||||||
|
#
|
||||||
|
# Supported values:
|
||||||
|
# - True/False
|
||||||
|
|
||||||
|
# dxvk.enableDebugUtils = True
|
||||||
|
|
|
@ -94,8 +94,10 @@ namespace dxvk {
|
||||||
|
|
||||||
// Hide VK_EXT_debug_utils behind an environment variable. This extension
|
// Hide VK_EXT_debug_utils behind an environment variable. This extension
|
||||||
// adds additional overhead to winevulkan
|
// adds additional overhead to winevulkan
|
||||||
if (env::getEnvVar("DXVK_PERF_EVENTS") == "1") {
|
if ((env::getEnvVar("DXVK_PERF_EVENTS") == "1") ||
|
||||||
|
(m_options.enableDebugUtils)) {
|
||||||
insExtensionList.push_back(&insExtensions.extDebugUtils);
|
insExtensionList.push_back(&insExtensions.extDebugUtils);
|
||||||
|
Logger::warn("DXVK: Debug Utils are enabled, perf events are ON. May affect performance!");
|
||||||
}
|
}
|
||||||
|
|
||||||
DxvkNameSet extensionsEnabled;
|
DxvkNameSet extensionsEnabled;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
DxvkOptions::DxvkOptions(const Config& config) {
|
DxvkOptions::DxvkOptions(const Config& config) {
|
||||||
|
enableDebugUtils = config.getOption<bool> ("dxvk.enableDebugUtils", false);
|
||||||
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
|
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
|
||||||
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
||||||
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
||||||
|
|
|
@ -8,6 +8,9 @@ namespace dxvk {
|
||||||
DxvkOptions() { }
|
DxvkOptions() { }
|
||||||
DxvkOptions(const Config& config);
|
DxvkOptions(const Config& config);
|
||||||
|
|
||||||
|
/// Enable debug utils (alternative to DXVK_PERF_EVENTS=1)
|
||||||
|
bool enableDebugUtils;
|
||||||
|
|
||||||
/// Enable state cache
|
/// Enable state cache
|
||||||
bool enableStateCache;
|
bool enableStateCache;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue