d3d12: report copy queue timestamp support from Vulkan queue capabilities #1154
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1154
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1154/head"
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?
@PyZikYG on GitHub · 2026-11-24 19:17 UTC · original
PyZikYG:copy-queue-timestamp-support→main· +122 −22 · 7 files · 2 commits · merged 2026-11-25 00:02 UTCClaimed as D3D-COPY-TIMESTAMP-CAPS.
OPTIONS3 always reported copy queue timestamps as unsupported, even when a copy queue could write and resolve them on the graphics family. Heap creation used the graphics family's timestamp support even when a copy queue could be assigned a dedicated transfer family.
Use the same capability check for OPTIONS3 and COPY_QUEUE_TIMESTAMP heaps. Every family the copy queue can use must provide timestamp bits and permit query reset and resolve. GetTimestampFrequency and submission validation now check the queue's actual family, and clock calibration receives that family's timestamp width.
AI-assisted: yes.
@KernelSmoker on GitHub · 2026-11-24 19:19 UTC · original · reviewed
Found a capability mismatch in
DeviceState::copy_timestamps_supported()(runtime/shims/d3d12_vulkan_device.cpp, around lines 629–634).CreateCommandQueuecan select a copy queue fromcopy_queuesor fall back tocommand_queueswhen that pool is exhausted (around 5742–5769), but the capability currently checks onlytimestamp_bits_for(info.copy_family). If the dedicated family supports timestamps while the graphics fallback family hastimestampValidBits == 0, OPTIONS3 and COPY_QUEUE_TIMESTAMP heap creation advertise support, yet a copy queue leased from the graphics family getsclock_for(graphicsFamily)with zero valid bits;GetTimestampFrequencythen returns E_FAIL and timestamp execution is rejected. The caller-owned-device path also advertises support without checking the actualqueue_familywhencommand_queuesis empty. Could the capability require support for every family a copy queue can use (includinginfo.queue_family), and add regression coverage for both the dedicated/fallback mismatch and a legacy caller-owned queue with zero valid bits? I did not run the Windows D3D12 integration test; this finding follows the queue-selection and capability code paths.@abnalstlll-byte on GitHub · 2026-11-24 19:21 UTC · original · approved these changes
Reviewed and verified. Robust handling of copy queue timestamp capabilities in D3D12/Vulkan layer. Accurately evaluates \ imestamp_bits_for\ and queue family resolve capabilities (distinguishing transfer-only families from graphics/compute fallbacks) and aligns \OPTIONS3.CopyQueueTimestampQueriesSupported\ and \COPY_QUEUE_TIMESTAMP\ heap creation with hardware capability. Verified with \d3d12_timestamp_test. 100% clean-room.
@KernelSmoker on GitHub · 2026-11-24 19:25 UTC · original · reviewed
Follow-up on the updated head
be010a409c: the newcopy_queue_timestamp_families_supported()helper now checks the graphics family plus the optional dedicated copy family, and its constexpr cases cover both the fallback mismatch and caller-owned queue using a nonzero family index. I builtvk_queue_testfrom this exact head in the project Vulkan tools container; CTestvk_queuepassed 1/1. The explicit no-game-data scan passed on the five changed implementation/test files. This Linux check validates the helper and queue-selection tests only: I could not run the Windows-onlyd3d12_query_rules_test/ D3D12 query integration, and GitHub reports no checks on this head.@madhyn on GitHub · 2026-11-24 19:28 UTC · original
Tested
a8ed98c23on Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti (595.58.03 / Vulkan):d3d12_vulkan_device(Wine): Passed (8.01 s)d3d12_query_rules(Wine): Passed (5.62 s)vk_queue(Linux): Passed (0.54 s)AI-assisted: yes
@Deedlyy on GitHub · 2026-11-24 20:12 UTC · original
Recommendation: [MERGE]
Reasoning: Copy-queue timestamp support (OPTIONS3, COPY_QUEUE_TIMESTAMP heaps,
GetTimestampFrequency) is now derived from the Vulkan families the copy queue can actually use, instead of hard-coded or the graphics family. KernelSmoker found a capability mismatch; the updated head addresses it withcopy_queue_timestamp_families_supported(), and KernelSmoker confirmed. Verified on Wine + RTX 3060 Ti by madhyn. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict withmain. Merge once the queued checks are green.Impact level: 5/10
@QemmHD on GitHub · 2026-11-25 00:02 UTC · original
Merging.
Why merged: D3D-COPY-TIMESTAMP-CAPS: timestamp bits are tracked per queue family, and transfer-only families count as 0 bits because they can't reset or resolve queries. This was the first native Windows run of the fixed head; madhyn's Wine run was on an older head, and KernelSmoker ran vk_queue on Linux. Behaviour change: OPTIONS3.CopyQueueTimestampQueriesSupported can now be TRUE, and a copy queue that gets a transfer-only family returns E_FAIL from GetTimestampFrequency and GetClockCalibration instead of borrowing the graphics family's bits.
Why it's good: d3d12_vulkan_device, d3d12_query_rules, vk_queue, vk_queue_query_sync and vk_queue_constructor_oom: 5/5 both plain and under validation on the 4070 SUPER.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main
0f98d193c, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative with the rest of this batch on main507029d1e: the repo-consistency set gives 578 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 317/318 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The semantic suite has only the known environment-only failure. git merge-tree against current main9c5e70661: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.AI-assisted (Claude Code, Claude Opus 5.5).