diff options
| author | Logan <Logan@cattn.dev> | 2026-11-23 12:16:11 -0500 |
|---|---|---|
| committer | Logan <Logan@cattn.dev> | 2026-11-23 12:16:11 -0500 |
| commit | afb14d56c6a1683fae4345702c874a62d9234e71 (patch) | |
| tree | cf37c6433ddef092c52435ba3a18434a326fb416 /runtime/test/device_proxy_test.cpp | |
| parent | a3f917c7ea8e185ca7126917efe9fe822a108388 (diff) | |
PresentX: device-side WaitFrameEventX and the frame pacer share one token source
Device slot 80 (WaitFrameEventX, from #6935) numbered its tokens with a
counter of its own, while XboxPresentation's pacer refuses any token above
the ones it issued itself. A title that waits through the device and
presents through the device's XboxPresentation therefore had every
PresentX refused with E_INVALIDARG once its tokens ran ahead of the
pacer's.
leonida::FrameTokenSource is now the counter both use: a pacer takes an
optional shared source (a standalone pacer still owns its own and numbers
as before), the device proxy owns one and exposes it through
rt::d3d12_xs::device_frame_tokens, and XboxPresentation passes a given
source to its pacer. A token that was never issued is still refused.
Reported by rafaelpssz in #7496.
Diffstat (limited to 'runtime/test/device_proxy_test.cpp')
| -rw-r--r-- | runtime/test/device_proxy_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/test/device_proxy_test.cpp b/runtime/test/device_proxy_test.cpp index 46a853e7c..164af5587 100644 --- a/runtime/test/device_proxy_test.cpp +++ b/runtime/test/device_proxy_test.cpp | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include "d3d12_trace.h" | 24 | #include "d3d12_trace.h" |
| 25 | #include "d3d12_xs_device.h" | 25 | #include "d3d12_xs_device.h" |
| 26 | #include "shims.h" | 26 | #include "shims.h" |
| 27 | #include "../src/frame_pacer.h" | ||
| 27 | 28 | ||
| 28 | namespace { | 29 | namespace { |
| 29 | 30 | ||
| @@ -348,6 +349,10 @@ int main(int argc, char** argv) { | |||
| 348 | check(hr == S_OK && token2 != 0 && token2 != token, "slot 80 returns a fresh token on the next wait"); | 349 | check(hr == S_OK && token2 != 0 && token2 != token, "slot 80 returns a fresh token on the next wait"); |
| 349 | hr = reinterpret_cast<WaitFrameEventFn>(proxy_vtbl[80])(device.Get(), 0, 0, nullptr, 0, nullptr); | 350 | hr = reinterpret_cast<WaitFrameEventFn>(proxy_vtbl[80])(device.Get(), 0, 0, nullptr, 0, nullptr); |
| 350 | check(hr == E_POINTER, "slot 80 refuses a null token with E_POINTER"); | 351 | check(hr == E_POINTER, "slot 80 refuses a null token with E_POINTER"); |
| 352 | const auto tokens = rt::d3d12_xs::device_frame_tokens(device.Get()); | ||
| 353 | check(tokens && tokens->issued() == token2 && token2 == token + 1, | ||
| 354 | "slot 80 tokens come from the device's frame token source"); | ||
| 355 | check(!rt::d3d12_xs::device_frame_tokens(nullptr), "a non-proxy has no frame token source"); | ||
| 351 | check(rt::d3d12_xs::device_slot_hits(78) == 1 && rt::d3d12_xs::device_slot_hits(79) == 1 && | 356 | check(rt::d3d12_xs::device_slot_hits(78) == 1 && rt::d3d12_xs::device_slot_hits(79) == 1 && |
| 352 | rt::d3d12_xs::device_slot_hits(80) == 3, | 357 | rt::d3d12_xs::device_slot_hits(80) == 3, |
| 353 | "slots 78/79/80 hit counters are 1/1/3"); | 358 | "slots 78/79/80 hit counters are 1/1/3"); |