Add opt-in VICTORY_NO_TDR switch to disable the direct queue's GPU timeout #3252
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3252
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3252"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Moonwolf711 on GitHub · 2026-11-26 14:39 UTC · original
Moonwolf711:no-tdr-queue-flag→main· +27 −0 · 2 files · 2 commits · openThe title can submit one indivisible multi-second GPU workload per frame (everything between waits is a single command-list burst). The default two-second TDR watchdog then removes the device mid-frame and the process exits through
DXGI_ERROR_DEVICE_HUNG(0x887A0007) — the run-ending GPU fault the README warns about.Change
When the existing
VICTORY_NO_TDRswitch is set, create the direct command queue withD3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUTinstead of the default. This is per-queue and process-local, so Windows keeps TDR protection for every other process on the machine — noTdrDelayregistry edits needed.Verification (RX 6600 XT, driver-level translate cache warm)
DXGI_ERROR_DEVICE_HUNGat the present.VICTORY_NO_TDR=1: the same build runs past frame 3000 at a steady 30 fps with zero device faults, and the run continues. The saved host pipeline library is written normally at exit.The switch defaults to off, so nothing changes for existing users.
@Dukestar69 on GitHub · 2026-11-26 14:49 UTC · original · approved these changes
Reviewed the diff and verified locally on Windows 11 x64 (RTX 5090 + WARP):
esource::tests::buffer_data_reaches_the_host_texture passed on both).
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@Moonwolf711 on GitHub · 2026-11-26 16:24 UTC · original
Update pushed (
5c2ff9d): the flag now covers every command queue, not only the direct one.Follow-up evidence: a diagnostics build (
VICTORY_D3D12_DEBUG=1) that hit the same device removal reported the debug layer's reason asDXGI_ERROR_DEVICE_RESET: "The hardware took an unreasonable amount of time to execute a command on a different Device Context... TDR has been triggered" — i.e. the timeout fired on a queue the direct-queue-only flag did not protect. The same run's final state also showed thousands of liveID3D12Heap/ID3D12CommandAllocator/ID3D12GraphicsCommandListobjects (the debug layer's "Kernel memory failure... memory leak" hint), so the timeout switch addresses the watchdog dimension of the fault; a separate resource-lifetime dimension may remain.The shader-emit host's validation queues now get the flag too (with an inline env check, since
victory-shadercannot reachvictory-gpu's switch module).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.