diff options
| author | QemmHD <stephenlethco2@gmail.com> | 2026-11-24 19:02:38 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-24 19:02:38 -0500 |
| commit | 706f5429e16f08c8defc45675f524d413656ed70 (patch) | |
| tree | 05850c5f893c2295855dfdf8208a1f1a6ac8371f /runtime/src | |
| parent | af868171d918dfdf7581fee99e87886dc110763a (diff) | |
| parent | be010a409c24c5732c3dc6122f28f2a493a5afc6 (diff) | |
Merge pull request #1154 from PyZikYG/copy-queue-timestamp-support
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 main 507029d1e: 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 main 9c5e70661: 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).
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/queue_families.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/src/queue_families.h b/runtime/src/queue_families.h index 3148d0ad1..f7a9e80e9 100644 --- a/runtime/src/queue_families.h +++ b/runtime/src/queue_families.h | |||
| @@ -8,10 +8,23 @@ | |||
| 8 | #include <cstddef> | 8 | #include <cstddef> |
| 9 | #include <cstdint> | 9 | #include <cstdint> |
| 10 | #include <initializer_list> | 10 | #include <initializer_list> |
| 11 | #include <optional> | ||
| 11 | #include <span> | 12 | #include <span> |
| 12 | 13 | ||
| 13 | namespace leonida { | 14 | namespace leonida { |
| 14 | 15 | ||
| 16 | constexpr std::uint32_t queue_family_timestamp_bits(std::span<const std::uint32_t> bits, std::uint32_t family) { | ||
| 17 | return family < bits.size() ? bits[family] : 0; | ||
| 18 | } | ||
| 19 | |||
| 20 | // A copy queue can lease from either family. Caller-owned devices may supply only the graphics queue. | ||
| 21 | constexpr bool copy_queue_timestamp_families_supported(std::span<const std::uint32_t> bits, | ||
| 22 | std::uint32_t graphics, | ||
| 23 | std::optional<std::uint32_t> dedicated_copy) { | ||
| 24 | return queue_family_timestamp_bits(bits, graphics) != 0 && | ||
| 25 | (!dedicated_copy || queue_family_timestamp_bits(bits, *dedicated_copy) != 0); | ||
| 26 | } | ||
| 27 | |||
| 15 | // Queue families for D3D12's three queue types. Direct needs graphics. Compute prefers a family with compute and no | 28 | // Queue families for D3D12's three queue types. Direct needs graphics. Compute prefers a family with compute and no |
| 16 | // graphics (async compute), copy one with transfer and neither (a DMA engine); each falls back to a more capable | 29 | // graphics (async compute), copy one with transfer and neither (a DMA engine); each falls back to a more capable |
| 17 | // family, ending at the graphics one. A dedicated copy family is only used when its image transfer granularity is | 30 | // family, ending at the graphics one. A dedicated copy family is only used when its image transfer granularity is |