diff options
| author | Nolan Cotter <186326284+NolanCotter@users.noreply.github.com> | 2026-11-22 20:39:59 -0700 |
|---|---|---|
| committer | Nolan Cotter <186326284+NolanCotter@users.noreply.github.com> | 2026-11-22 20:39:59 -0700 |
| commit | fa5f26db8eafd2cc27f627b68c0a5a5949bcf2ff (patch) | |
| tree | fc57e238be829295fc216dff89a6d93e64c16b50 /runtime/test/vk_queue_test.cpp | |
| parent | 9b693ecd8a2f90799f6c47f8f06cf062feb9820c (diff) | |
| parent | 7b7d73f890f9fbbf5967bbb694390bbc99e33ba6 (diff) | |
Merge origin/main: DXGI device fields coexist with the console-ABI device state
Diffstat (limited to 'runtime/test/vk_queue_test.cpp')
| -rw-r--r-- | runtime/test/vk_queue_test.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/runtime/test/vk_queue_test.cpp b/runtime/test/vk_queue_test.cpp index 84289198c..9df720356 100644 --- a/runtime/test/vk_queue_test.cpp +++ b/runtime/test/vk_queue_test.cpp | |||
| @@ -61,7 +61,33 @@ int check_picker() { | |||
| 61 | const auto q = pick_queue_families(f, 0); | 61 | const auto q = pick_queue_families(f, 0); |
| 62 | EXPECT(q.copy == 2); | 62 | EXPECT(q.copy == 2); |
| 63 | } | 63 | } |
| 64 | std::printf("queue family picker: 4 layouts ok\n"); | 64 | // D3D12 tile mapping is legal on all queue kinds. Dedicated async queues that cannot |
| 65 | // bind sparse pages must use the graphics family when sparse buffers are offered. | ||
| 66 | { | ||
| 67 | constexpr VkQueueFlags S = VK_QUEUE_SPARSE_BINDING_BIT; | ||
| 68 | const std::array f{fam(G | S), fam(T), fam(C)}; | ||
| 69 | const auto preferred = pick_queue_families(f, 0); | ||
| 70 | EXPECT(preferred.compute == 2 && preferred.copy == 1); | ||
| 71 | const auto corrected = sparse_capable_queue_families(f, preferred, true); | ||
| 72 | EXPECT(corrected.direct == 0 && corrected.compute == 0 && corrected.copy == 0); | ||
| 73 | const auto no_sparse = sparse_capable_queue_families(f, preferred, false); | ||
| 74 | EXPECT(no_sparse.compute == 2 && no_sparse.copy == 1); | ||
| 75 | } | ||
| 76 | { | ||
| 77 | constexpr VkQueueFlags S = VK_QUEUE_SPARSE_BINDING_BIT; | ||
| 78 | const std::array f{fam(G | S), fam(T | S), fam(C | S)}; | ||
| 79 | const auto preferred = pick_queue_families(f, 0); | ||
| 80 | const auto corrected = sparse_capable_queue_families(f, preferred, true); | ||
| 81 | EXPECT(corrected.compute == 2 && corrected.copy == 1); // preserve dedicated queues | ||
| 82 | } | ||
| 83 | { | ||
| 84 | constexpr VkQueueFlags S = VK_QUEUE_SPARSE_BINDING_BIT; | ||
| 85 | const std::array f{fam(G | S), fam(T), fam(C | S)}; | ||
| 86 | const auto preferred = pick_queue_families(f, 0); | ||
| 87 | const auto corrected = sparse_capable_queue_families(f, preferred, true); | ||
| 88 | EXPECT(corrected.compute == 2 && corrected.copy == 0); // mixed capabilities | ||
| 89 | } | ||
| 90 | std::printf("queue family picker: 7 layouts ok\n"); | ||
| 65 | return 0; | 91 | return 0; |
| 66 | } | 92 | } |
| 67 | 93 | ||