d3d12: allow queue submissions during fallback clock calibration #1720
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1720
Loading…
Reference in a new issue
No description provided.
Delete branch "d3d12-calibration-queue-progress"
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?
Pull request successfully merged and closed
Claimed as D3D-CLOCK-CALIBRATION-SUBMIT.
Summary
Fallback
GetClockCalibrationused to hold the device-wide Vulkan submission lock across queue-idle waits. A slow calibration could block submissions from every D3D12 queue on the device.Drain prior work with an empty submission and wait for that marker and the timestamp sample on a private timeline outside the submission lock. The timestamp submission remains bracketed by QPC reads. If a host wait fails, the next call retires the outstanding sample before reusing the command buffer.
Verification
Checked clock pairing, queue submissions while a calibration wait is paused, and retry after an injected host wait failure. Also ran the fence event coverage.
AI-assisted: yes.
Tested
c6817c3d5merged ontomainbcaa13dad(clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060, driver 621.14, VS 2022 RelWithDebInfo + Ninja.d3d12_fence_timingpasses. Fullctest -j 6: 409 of 409 passed, same asmain.run_gpu_tests.py: 209/263, identical tomain.AI-assisted testing (non-developer tester).
Tested
c6817c3d5applied ontomain42537e7b6on AMD: Radeon RX 7900 XT, driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, VS 2022 RelWithDebInfo. This driver has calibrated timestamps, so the test exercises both the calibration-capable queue and the fallback. No game files.d3d12_fence_timing: passes 30 of 30 with--repeat until-fail:30, and 5 of 5 withLEONIDA_VK_VALIDATION=1(no messages).main42537e7b6So at idle the fallback is in the same range as before on this card. The run-to-run spread is larger than any difference between the two. I didn't measure it under concurrent submissions. That is where waiting outside the submission lock could widen the gap: work another thread queues on the same VkQueue after the marker drains runs ahead of the timestamp write.
ctest -j 6: 398 of 402 pass or skip. The failures ared3d12_texture_tiles,d3d12_clearandd3d12_geometry_views, the same as onmain.d3d12_indirect_rtfailed once under-j 6and passes 3 of 3 alone; it has done that on other trees here too.Red/green: the PR's test fails on main and passes with this PR (checked by OreoFR).
Runtime batch of 20 PRs tested by OreoFR (full build, ctest without the game, Python suite, translator): same results as main 09c153948, RTX 4070 Laptop / Windows 11.
AI-assisted (Claude Code, Claude Opus 5.5)
Verified by OreoFR
09c153948+ PR headc6817c3d5; integration package 1 of 6 (20 PRs, merged without conflict)AI-assisted (Claude Code, Claude Opus 5.5).