Skip to content

Commit 574be6b

Browse files
committed
Merge branch 'envvar-gpu-crash-profile' into 'main'
Add env.vars for GPU crash options to avoid .conf file editing during analysis See merge request lightspeedrtx/dxvk-remix-nv!2305
2 parents ce26cc8 + f74e3e8 commit 574be6b

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/dxvk/dxvk_memory_tracker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
namespace dxvk {
88
struct MemoryTrackerSettings {
9-
RTX_OPTION_FLAG("rtx.profiler.memory", bool, enable, false, RtxOptionFlags::NoSave, "Enables the memory profiler which allows users to inspect Remix resources using the profiler tool in the Dev Settings Remix window. This option is disabled by default, and must be enabled from application launch to work correctly.");
10-
RTX_OPTION_FLAG("rtx.profiler.memory", bool, includeWholeFrame, false, RtxOptionFlags::NoSave, "Profiles memory across the entire frame when enabled. When disabled we only see a snapshot of memory at the time of sampling. This has some additional CPU performance overhead so is disabled by default.");
9+
RTX_OPTION_FLAG_ENV("rtx.profiler.memory", bool, enable, false, RtxOptionFlags::NoSave, "RTX_PROFILER_MEMORY_ENABLE", "Enables the memory profiler which allows users to inspect Remix resources using the profiler tool in the Dev Settings Remix window. This option is disabled by default, and must be enabled from application launch to work correctly.");
10+
RTX_OPTION_FLAG_ENV("rtx.profiler.memory", bool, includeWholeFrame, false, RtxOptionFlags::NoSave, "RTX_PROFILER_MEMORY_INCLUDE_WHOLE_FRAME", "Profiles memory across the entire frame when enabled. When disabled we only see a snapshot of memory at the time of sampling. This has some additional CPU performance overhead so is disabled by default.");
1111
};
1212

1313
// If src is longer than (N-2), the last three characters of the copied
@@ -179,7 +179,7 @@ namespace dxvk {
179179
ImGui::TextWrapped("This is a tool to help diagnose memory related problems in Remix. Press the `Sample Memory` button to take a snapshot of all the memory allocations currently in use by the application. You can refresh this list at any time by clicking that button. Once you have a snapshot, the data will be displayed as a list below.");
180180

181181
if (!MemoryTrackerSettings::enable()) {
182-
ImGui::TextWrapped("Memory profiler is disabled. Please enable in the rtx.conf with `rtx.profiler.memory.enable = True`.");
182+
ImGui::TextWrapped("Memory profiler is disabled. Please enable in the rtx.conf with `rtx.profiler.memory.enable = True` or with `RTX_PROFILER_MEMORY_ENABLE = 1` environment variable");
183183
return;
184184
}
185185

src/dxvk/dxvk_options.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ namespace dxvk {
3333
hud = config.getOption<std::string>("dxvk.hud", "");
3434

3535
// NV-DXVK start: Integrate Aftermath
36-
enableAftermath = config.getOption<bool>("dxvk.enableAftermath", false);
37-
enableAftermathResourceTracking = config.getOption<bool>("dxvk.enableAftermathResourceTracking", false);
38-
enableGpuCrashState = config.getOption<bool>("rtx.enableGpuCrashState", false);
39-
enableGpuCrashStateBufferRetention =
40-
config.getOption<bool>("rtx.enableGpuCrashStateBufferRetention", false);
36+
enableAftermath = config.getOption<bool>("dxvk.enableAftermath", false, "DXVK_ENABLE_AFTERMATH");
37+
enableAftermathResourceTracking = config.getOption<bool>("dxvk.enableAftermathResourceTracking", false, "DXVK_ENABLE_AFTERMATH_RESOURCE_TRACKING");
38+
enableGpuCrashState = config.getOption<bool>("rtx.enableGpuCrashState", false, "DXVK_ENABLE_GPU_CRASH_STATE");
39+
enableGpuCrashStateBufferRetention = config.getOption<bool>("rtx.enableGpuCrashStateBufferRetention", false, "DXVK_ENABLE_GPU_CRASH_STATE_BUFFER_RETENTION");
4140
// NV-DXVK end
4241

4342
// NV-DXVK start: early submit heuristics for memcpy work

0 commit comments

Comments
 (0)