diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 19:56:42 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 19:56:42 -0500 |
| commit | 7e3bfb4e33e7276c32af515e601bc41c5424df54 (patch) | |
| tree | a7ad8f733943d5f52ed7a5324f90a0ef887e4a1d /runtime/test | |
| parent | 1d28e6e361c5c7e66ad6ea5ff59df483ff9d5c94 (diff) | |
PresentX: docs and a test state the one-slot-per-layout rule of the merge
The merged queue proxy recognises PresentX at slot 30 on a queue in the older layout and at slot 32 on a queue detected as the newer one (a fence at slot 16 or 17, or SignalX at 25), which is #984's measured behaviour, with main's LEONIDA_XS_PRESENT_X_SLOT pinning one slot and an attached handler answering first. Only one of the two is PresentX at a time: in the newer layout slot 30 is another method.
docs/d3d12_vulkan.md still had main's row (the queue slots stay refused, gta6rt creates no presentation) and runtime/README.md still said PresentX has an unknown slot. Both describe the merged code now. check_presentation_wiring gains the newer-layout case: before the fence 30 reaches the presenter and 32 does not, after it 32 does and 30 does not.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test')
| -rw-r--r-- | runtime/test/xs_proxy_mock_test.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/runtime/test/xs_proxy_mock_test.cpp b/runtime/test/xs_proxy_mock_test.cpp index 875881604..30e687344 100644 --- a/runtime/test/xs_proxy_mock_test.cpp +++ b/runtime/test/xs_proxy_mock_test.cpp | |||
| @@ -3675,7 +3675,29 @@ int check_presentation_wiring() { | |||
| 3675 | 3675 | ||
| 3676 | EXPECT(release(queue) == 0); | 3676 | EXPECT(release(queue) == 0); |
| 3677 | EXPECT(release(device) == 0 && mock->refs == 0); | 3677 | EXPECT(release(device) == 0 && mock->refs == 0); |
| 3678 | std::printf("%s: presentation handler wiring (slots 78-81 and queue PresentX 30) passed\n", g_label); | 3678 | |
| 3679 | // PresentX is one slot per layout, never both. A queue is in the older layout (PresentX at 30) until a fence | ||
| 3680 | // reaches slot 16 or 17, which only the newer layout's Signal and Wait take; from then on PresentX is two slots | ||
| 3681 | // later, at 32, and slot 30 is another console method there: S_OK, and the presenter is not called. | ||
| 3682 | Mock* newer_mock = nullptr; | ||
| 3683 | void* newer_device = make_device(newer_mock, 11, true); | ||
| 3684 | void* newer_queue = make_queue(newer_device); | ||
| 3685 | void* newer_fence = make_fence(newer_device); | ||
| 3686 | EXPECT(newer_device && newer_queue && newer_fence); | ||
| 3687 | MockPresenter np; | ||
| 3688 | xs::PresentationHandler nh = h; | ||
| 3689 | nh.context = &np; | ||
| 3690 | EXPECT(xs::set_presentation_handler(newer_device, &nh)); | ||
| 3691 | EXPECT(hr_of(raw(newer_queue, 30, 1, 0x1000, 0x2000)) == S_OK && np.present_calls == 1); | ||
| 3692 | EXPECT(hr_of(raw(newer_queue, 32, 1, 0x1000, 0x2000)) == S_OK && np.present_calls == 1); | ||
| 3693 | EXPECT(hr_of(raw(newer_queue, 16, word(newer_fence), 1)) == S_OK); | ||
| 3694 | EXPECT(hr_of(raw(newer_queue, 32, 2, 0x1000, 0x2000)) == S_OK && np.present_calls == 2 && np.last_planes == 2); | ||
| 3695 | EXPECT(hr_of(raw(newer_queue, 30, 1, 0x1000, 0x2000)) == S_OK && np.present_calls == 2); | ||
| 3696 | EXPECT(xs::set_presentation_handler(newer_device, nullptr)); | ||
| 3697 | EXPECT(release(newer_queue) == 0 && release(newer_fence) == 0); | ||
| 3698 | EXPECT(release(newer_device) == 0 && newer_mock->refs == 0); | ||
| 3699 | std::printf("%s: presentation handler wiring (slots 78-81 and queue PresentX 30, or 32 in the newer layout) " | ||
| 3700 | "passed\n", g_label); | ||
| 3679 | return 0; | 3701 | return 0; |
| 3680 | } | 3702 | } |
| 3681 | 3703 | ||