From 8d1556774e65d921d27abc540f70c347123dea32 Mon Sep 17 00:00:00 2001 From: Nolan Cotter <186326284+NolanCotter@users.noreply.github.com> Date: Sun, 22 Nov 2026 18:30:17 -0700 Subject: tests: queue and marker tests follow the console list/queue ABI shdann's run on #2490 (Windows 11, MSVC, RTX 4090 + Radeon): two tests that pass on main fail on this head. queue_proxy expected E_NOTIMPL for every queue slot past the public chain. The console contract answers those S_OK instead - frame pacing flows through them - which xs_proxy_mock already requires. The queue loop now expects S_OK, SignalX at slot 23 and PresentX at slot 30 are checked as the modelled methods they are (a fence reaching 9 proves SignalX forwarded; PresentX is handled, not refused), and the fence tail keeps its E_NOTIMPL contract unchanged. d3d12_debug_markers called SetMarker/BeginEvent/EndEvent through the PC interface on what is now a console-shaped list: PC slot 56/57/58 land on console slots that map elsewhere, and the first Close failed. The console ABI has no SetMarker or BeginEvent at all - its one marker slot is EndEvent at console 60 - so the PC calls now go to the real list behind each proxy via list_proxy_real_list; the proxy queue still unwraps the proxies at ExecuteCommandLists. --- runtime/test/queue_proxy_test.cpp | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'runtime/test/queue_proxy_test.cpp') diff --git a/runtime/test/queue_proxy_test.cpp b/runtime/test/queue_proxy_test.cpp index 3d5ed98fa..f04b5287b 100644 --- a/runtime/test/queue_proxy_test.cpp +++ b/runtime/test/queue_proxy_test.cpp @@ -8,8 +8,9 @@ // - heap, queue and fence proxies are unwrapped where the real runtime receives them (Signal/Wait, // SetEventOnMultipleFenceCompletion, MakeResident/Evict/SetResidencyPriority/EnqueueMakeResident, // CreateSharedHandle), and OpenSharedHandle wraps a shared fence; -// - slots past the public chain are refused (E_NOTIMPL) up to the end of the table, and a slot past the table -// faults on the vtable read in the guard region and is counted; +// - slots past the public chain answer the console contract — a queue slot returns S_OK having signalled +// nothing (frame pacing flows through those methods), a fence slot is refused with E_NOTIMPL — and a +// slot past either table faults on the vtable read in the guard region and is counted; // - calls from eight threads at once, and repeated device, queue and fence creation without leaks; // - the child-process runner of the differential check itself: large output, hangs, crashes, failed starts. // No shaders, game data or Xbox DLLs. LEONIDA_VK_VALIDATION=1 runs the Vulkan device under @@ -384,24 +385,39 @@ int check_slots(const Backend& b) { } } - // The refused tail: every slot from the end of the public chain to the end of the table. + // The console queue tail answers S_OK instead of refusing: frame pacing flows through those + // methods, the contract xs_proxy_mock checks too. The two methods the proxy models — SignalX at + // 23 and PresentX at 30 on the older layout the 16/17 calls above pinned — are checked below. for (unsigned slot = 19; slot < xs::queue_proxy_table_size(); ++slot) { + if (slot == 23 || slot == 30) continue; before = qhits(slot); - EXPECT(as_hr(call_slot(queue.p, slot)) == E_NOTIMPL); + EXPECT(as_hr(call_slot(queue.p, slot)) == S_OK); EXPECT(qhits(slot) == before + 1 && xs::queue_slot_first_call_seen(slot)); } + // SignalX forwards to the real queue's Signal with the extra word dropped: the fence reaching 9 + // proves the call was forwarded rather than swallowed by the console-tail answer. + before = qhits(23); + EXPECT(as_hr(raw_call(queue.p, 23, reinterpret_cast(fence.p), 9)) == S_OK); + EXPECT(qhits(23) == before + 1 && xs::queue_slot_first_call_seen(23)); + if (wait_for(label, fence.p, 9)) return 1; + // PresentX is handled by the presentation front end, not refused: its status is the swapchain's + // (a black frame on the test window, or S_OK where it cannot present), so anything but E_NOTIMPL + // shows the modelled path ran. + before = qhits(30); + EXPECT(as_hr(call_slot(queue.p, 30)) != E_NOTIMPL); + EXPECT(qhits(30) == before + 1 && xs::queue_slot_first_call_seen(30)); for (unsigned slot = fence_slots; slot < xs::fence_proxy_table_size(); ++slot) { before = fhits(slot); EXPECT(as_hr(call_slot(fence.p, slot)) == E_NOTIMPL); EXPECT(fhits(slot) == before + 1 && xs::fence_slot_first_call_seen(slot)); } - // The objects still work after refused calls. + // The objects still work after the tail calls. EXPECT(SUCCEEDED(queue->Signal(fence.p, 10))); if (wait_for(label, fence.p, 10)) return 1; EXPECT(xs::command_object_proxy_ref_count(queue.p) == 1 && xs::command_object_proxy_ref_count(fence.p) == 1); } EXPECT(xs::device_proxy_ref_count(device) == device_refs); // every queue and fence gave its reference back - std::printf("%s: every public queue and fence slot forwarded and counted; tail refused\n", label); + std::printf("%s: every public queue and fence slot forwarded and counted; console tail answered\n", label); return 0; } -- cgit v1.2.3