Skip to content

d3d12_xs: fence slot 12 returns the address of a completed value that stays live (retail executable, past the PC fence chain) - #7290

Closed
TreXito wants to merge 3 commits into
ProjectLeonida:mainfrom
TreXito:rt/fence-slot12-completed-value
Closed

TreXito wants to merge 3 commits into
ProjectLeonida:mainfrom
TreXito:rt/fence-slot12-completed-value

Conversation

@TreXito

@TreXito TreXito commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: fence slot 12, past the PC chain (#7049 comment)

Depends on: none. Base main 8575d36ed.

What and why

@simonbronk's run on #6982 (boot-integration plus #7115, #6891, #7163, #3777, #6935) reached fence slot 12, one past ID3D12Fence1. The title calls it as (value, &{0, callback, 0, 0}, flags) and reads the return as a pointer to the fence's 64-bit completed value: it compares *p with ~0 (device removed) and subtracts the value it waits for. main refuses the slot with E_NOTIMPL, so the title dereferences 0x80004001 and crashes. Their local stand-in returned a per-fence value refreshed on each call, and the run went on to command-list recording. They noted that the real thing has to stay live, not only refresh when called.

This PR makes the value stay live:

  • One mirror per fence, made on its first slot 12 call. Slot 12 returns its address, the same address on every call.
  • Kept current without a call. A thread-pool wait on the mirror's event reads the real fence's completed value into the mirror and re-arms SetEventOnCompletion(value + 1, event) on the real fence. So the mirror follows every completion, whether a queue signals it on the GPU or the CPU does. A 10 ms wait timeout also refreshes it when the fence rewinds below the armed threshold (@rison1337's commit).
  • Immediate where the proxy sees it. Slot 12 itself and the proxy's CPU Signal (slot 10) refresh the mirror at once. A title that signals from the CPU and reads straight away sees its own value.
  • Ordered. Refreshes take a lock, so the mirror never goes back to a value read before the one already stored.
  • Device removal. The real fence reports ~0, which is what the title tests for, and the callback stops re-arming.
  • Teardown. Releasing the proxy stops the wait first (WaitForThreadpoolWaitCallbacks waits out a callback in flight), then releases the real fence. The event is closed only when that release destroyed the fence. The last SetEventOnCompletion can still be pending on it, and no call cancels one, so when another reference keeps the real fence alive the event stays open (one handle per such fence) instead of leaving the fence to set a closed or reused handle (@Hiiva's review).
  • Not done: the descriptor's second word is a code pointer, and it is not called. The measured run goes on without it, and its contract (when it runs, on which thread, with what arguments) isn't known. The first call is logged with its three arguments.
  • A fence whose slot 12 is never called is unchanged: nothing is armed on its real fence.

Every other slot past the chain is still refused. docs/d3d12_command_objects.md and the header comment now name the exception.

Tested

Cross-built with clang-cl 21 and xwin (MSVC CRT and Windows SDK headers), run under Wine 10 on Linux. ctest -R "xs_proxy_mock|queue_proxy|device_proxy|allocator_proxy": 8 passed, 2 skipped (device_proxy and device_proxy_trace skip under Wine, as they do on main).

  • xs_proxy_mock_test. Mock fences now keep a completed value: Signal sets it, and SetEventOnCompletion arms one event. The new check_fence_completed_value runs for fences with and without ID3D12Fence1. It checks:

    • one address per fence, different for two fences;
    • a CPU Signal through the proxy is visible at once;
    • signals the proxy never sees (12, then 40) show up without another call;
    • device removal reads ~0 and nothing is re-armed after it;
    • the descriptor's code pointer is never called;
    • references go back to zero on release;
    • when another reference keeps the real fence alive, releasing the proxy leaves the armed event open and a later signal sets it (fails on the previous head: the handle is closed);
    • a fence that never calls slot 12 arms nothing;
    • an injected allocation failure makes slot 12 return null, and the next call works.

    check_tail starts its refused range at 13.

  • queue_proxy_test on the Vulkan layer (llvmpipe under Wine; host D3D12 skips under Wine): slot 12's value follows a real queue->Signal(fence, 9) without another call, and a second call returns the same address. The refused-tail loop skips slot 12. Output: Vulkan: every public queue and fence slot forwarded and counted; fence slot 12 follows a queue signal; tail refused, and queue_proxy_test: 1 backend(s) passed.

  • Not run: the retail executable. I can't run it, so whether the title goes on past this slot with a live value is for someone on the boot-integration stack to confirm. A tried: line on Boot log for coding agents: where the executable stops and which PRs get past it #7154 would settle it.

AI-assisted: yes (Claude Code)

Checklist

🤖 Generated with Claude Code

The retail executable calls fence slot 12, one past ID3D12Fence1, as
(value, descriptor, flags) and reads the return as a pointer to the
fence's 64-bit completed value: it compares it with ~0 and subtracts the
value it waits for. The proxy refused it with E_NOTIMPL, which the title
then dereferenced.

Each fence now gets a mirror on its first slot 12 call. A wait-thread
callback reads the real fence's completed value into it and re-arms
SetEventOnCompletion(value + 1), so it follows every completion without
another call; slot 12 and the CPU Signal refresh it at once, under a lock.
After device removal it holds ~0 and nothing is re-armed. The release of
the proxy unregisters the wait before the real fence goes. The
descriptor's code pointer is not called.

Tests: xs_proxy_mock_test (mock fences now keep a completed value and
arm one event) and queue_proxy_test (a real queue signal reaches the
mirror).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MartinIndra02

Copy link
Copy Markdown
Contributor

Independent Windows + GPU test of 5ac4deaa2: pass.

Setup: Windows 11 x64, MSVC 19.44.35220 (RelWithDebInfo, Windows SDK 10.0.26100.0), NVIDIA GeForce RTX 3080 (driver 32.0.16.2124 / 621.24), Vulkan SDK 1.4.363.1, no game files.

  • xs_proxy_mock_test.exe: PASS (exit 0) — including check_fence_completed_value (slot 12 live mirror across CPU and unseen signals, device removal ~0, OOM fallback, clean teardown).
  • queue_proxy_test.exe (host WARP, host RTX 3080, Vulkan RTX 3080): 3 backend(s) passed (exit 0).
  • Code review of FenceMirror in runtime/shims/d3d12_xs_device.cpp: SRWLOCK ordering on refresh_mirror, ~0 re-arm stop, and teardown order (UnregisterWaitEx(..., INVALID_HANDLE_VALUE) -> real->Release() -> CloseHandle(mirror->event)) look solid.

AI-assisted review/test.

@Etr0p

Etr0p commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested 5ac4dea, merged with main 14b2e44 (clean merge), natively on Windows 11 26200, MSVC 14.44 (RelWithDebInfo, Ninja), with real D3D12 and Vulkan drivers instead of Wine: pass on both GPUs.

What this adds to @MartinIndra02's RTX 3080 run: an AMD driver (host D3D12 and Vulkan on an RDNA2 GPU), a Blackwell GPU, a negative control, and the other ctest forms.

GPUs: NVIDIA GeForce RTX 5070 Ti Laptop GPU (driver 621.24) and AMD Radeon 610M (RDNA2 gfx1036, AMD 26.11.2). The host D3D12 hardware backend is the first adapter, the 610M, in both runs. LEONIDA_VK_DEVICE picks the GPU for the Vulkan backend.

  • xs_proxy_mock_test: PASS in all six ctest forms (no arguments, --fail-virtualalloc, --fail-virtualprotect, --fail-veh, --env-slots, --env-slots-invalid). The plain run ends PASS (11 allocations refused on purpose); main alone gives 9.
  • Negative control: the PR's two test files built against main's d3d12_xs_device.cpp crash (exit 139). The crash comes right after the fence QueryInterface/slot-11 checks, where the new slot-12 check starts: main refuses slot 12 with E_NOTIMPL, and the test reads that as a pointer. main with its own tests passes all six forms.
  • queue_proxy_test: 3 backend(s) passed in both runs, Vulkan on the 5070 Ti and Vulkan on the 610M. The run on the 5070 Ti prints device: NVIDIA GeForce RTX 5070 Ti Laptop GPU, and the run on the 610M prints device: AMD Radeon(TM) 610M. Each backend (host WARP, host AMD Radeon(TM) 610M, Vulkan) prints every public queue and fence slot forwarded and counted; fence slot 12 follows a queue signal; tail refused.
  • Also run on the same build: device_proxy_test and device_proxy_test --trace-d3d12 give OK (0 failures), and allocator_proxy_test gives 3 backend(s) passed. These are the two tests your description says skip under Wine.

Not run: the retail executable on the boot-integration stack, so this does not say whether the title gets further with the live value.

AI-assisted (Claude Code).

@kapitche

Copy link
Copy Markdown
Collaborator

A separate measurement of the same stop, from a run that doesn't use #6982's set.

Native Windows 11, RTX 4080 SUPER, MSVC 14.51 build of main 8f208d0 plus #6919 #4313 #6792 #6582 #6885 #6891 #6709 #4348 #3410 #6964 #6954 #6953 #5152 #6986 #2490 #7021, with local stand-ins for earlier stops. It runs the user's own dump, and I'm reporting counts only.

  • After the first PresentX, the title calls fence slot 12 (one past ID3D12Fence1). The layer answers E_NOTIMPL, and the next fault is an access violation that reads address 0x80004001. So the return is used as a pointer and read straight away, as the PR describes.
  • Local stand-in: slot 12 returns a per-fence heap word that a thread refreshes from GetCompletedValue every 1 ms. With it, the run gets past this stop. PresentX Add pytest regression tests for the RDNA2 -> SPIR-V translator, plus a Linux CI job #1 and Vulkan tools: fix builds on Linux #2 succeed (after a separate local PresentX token workaround), and the next stops are unrelated: an illegal instruction, then an AV elsewhere. So a pointer to a live completed value is enough for the title to go on at this point. The stand-in never calls the descriptor's callback word, and nothing visibly depended on it before the next stop.
  • I haven't run this PR's head in that set, so this confirms the contract, not this implementation.

@rison1337

Copy link
Copy Markdown

Independent check of 5ac4deaa on CachyOS x86-64, Wine 11.20, clang/llvm-mingw. The existing xs_proxy_mock_test passed. An added synthetic case reproduced a stale slot 12 value.

  1. Signal the fence to 40 and let the callback arm SetEventOnCompletion(41).
  2. Signal 3 through the proxy. The returned address now reads 3.
  3. Signal 15 on the underlying fence, as a producer outside the proxy would. The fence reports 15, but the returned address keeps reading 3 because the pending event still waits for 41.

D3D12 permits fence rewinds. The added test failed on this head in five of five runs.

Follow-up commit with a regression test, based directly on this PR. It uses a thread-pool wait with a 10 ms timeout to refresh below the outstanding threshold. Timeout callbacks do not register another fence event. The regression also checks a rewind outside the proxy, progress below the threshold, then a signal that satisfies the original event. The full mock test passed five of five runs with the change.

This is a synthetic check. I have not tested the retail executable, native Windows, or the polling overhead with many live fences. AI-assisted.

Refresh the slot 12 mirror when the completion wait times out. Keep the existing pending fence event so a rewind cannot accumulate duplicate registrations.

The mock test covers a CPU rewind followed by progress below the old threshold and a rewind from outside the proxy. Original fails and patched passes in five runs each on Wine 11.20. AI-assisted.
@TreXito

TreXito commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@rison1337 thanks, that is a real hole: a rewind below the armed threshold left the mirror stale until the fence climbed past it. I picked your commit onto the branch unchanged, with your authorship (04fdf37). The 10 ms timeout refresh only reads GetCompletedValue, and the event stays armed once, so a rewind cannot stack registrations.

@MartinIndra02 @Etr0p your passes were on 5ac4dea, before this commit. CI is re-running on the new head.

@kapitche

Copy link
Copy Markdown
Collaborator

Follow-up to my comment above: I cherry-picked 5ac4deaa2 (the head at the time; the head is now 04fdf377f, which I have not run) into the same local integration set, in place of our polling stand-in. On Windows 11 / RTX 4080 SUPER (driver 617.14) with my own copy of the retail executable, fence slot 12 returns the live completed-value address, and the run gets past that point. It goes on to further presents and later, unrelated stops. Merge conflicts were limited to header and struct comments.

@neeshz

neeshz commented Nov 23, 2026

Copy link
Copy Markdown

AI-assisted. No game files used.

Tested 04fdf377f on native Windows (not Wine): Windows 11 Pro 26200, MSVC 19.52 (VS 2026 Build Tools), Ninja RelWithDebInfo, -DLEONIDA_SDL3=OFF, Vulkan-Headers main: pass.

ctest -R "xs_proxy_mock|queue_proxy|device_proxy|allocator_proxy": 10/10 passed. That includes device_proxy and device_proxy_trace, which skip under Wine in your run; here they run (device_proxy_test: OK (0 failures)).

  • xs_proxy_mock prints "fence slot 12 returns one address per fence whose completed value follows CPU and unseen signals up to device removal; the descriptor is not called" and finishes PASS (11 allocations refused on purpose). The OOM path logs "fence slot 12: out of memory for the completed value", as intended.
  • queue_proxy: 3 backend(s) passed.
    • host WARP and host NVIDIA GeForce RTX 5080 (D3D12, driver 616.56) each print "fence slot 12 follows a queue signal".
    • The Vulkan backend ran with VK_LOADER_DRIVERS_SELECT=*amd* (AMD Radeon iGPU, driver 32.0.13018.6) and prints the same line, with 32 error and edge cases at 0 not comparable.
  • Build: the only warning is C4189 at vulkan_present.h:669 (unused device), which comes from main, not this PR.

@rafaelpssz

Copy link
Copy Markdown
Collaborator

Retail data point for this (my own 1.0.2.1 copy, Windows 11 + RTX 3060, integration tree with the boot PRs; #7496 comment 7107949979). Statically, the caller takes the returned pointer and spins on the word it points to: it compares the value with UINT64_MAX, then waits for it to reach a target, and it does not call slot 12 again inside the loop. In my run, a word refreshed only on each slot-12 call froze the title about 8 s in, with one thread spinning in that loop. A background thread refreshing every registered fence's word from GetCompletedValue about every 0.25 ms got it into the frame loop. If yours already keeps the word live without a new call, it matches. One more thing worth having: when the fence proxy is released, take it off whatever list the refresher walks.

@jacksonslab

Copy link
Copy Markdown

Tested on the retail executable: pass. Windows 11, i7-14700K, RTX 4070 SUPER, MSVC RelWithDebInfo, LEONIDA_D3D12=vulkan, own 1.0.2.1 copy, on a local stack of the open boot-chain PRs (listed in #7231 (comment)). Without it the title read through the E_NOTIMPL value fence slot 12 returned. With it, slot 12 logs (value 2, …), the title carries on, and PresentX sets up its window. I merged it next to #2490's queue tail (console-only queue slots answer S_OK there), so only the fence part of the tail checks changed. AI-assisted (Claude Code).

@jlric

jlric commented Nov 23, 2026

Copy link
Copy Markdown

AI-assisted boot A/B on Wine 11.22, RTX 4070/NVIDIA 620.73.04. I adapted the slot-12 mirror from this PR's current diff (including rewind polling) onto a local boot stack. Baseline stopped making progress after refusing slot 12, with one swapchain present. With the mirror it submitted another command list, reached Bink setup and recorded two swapchain presents. Movie open and decode were still unobserved.

@TreXito

TreXito commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@rafaelpssz both of your points are covered on the current head, 04fdf377f:

  • The word stays live without a slot-12 call. A thread-pool wait on the fence's completion event refreshes it on every completion. Since rison1337's commit, a 10 ms timeout also refreshes it, which covers rewinds below the armed value. So the title's spin loop sees progress without calling slot 12 again.
  • Release: destroy_child marks the mirror as stopping and cancels the wait. It waits for any running callback to finish, then closes the wait and frees the mirror, so nothing refreshes a released fence.

Retail passes so far: jacksonslab (Windows, RTX 4070 SUPER, on 5ac4deaa2), kapitche (Windows, RTX 4080 SUPER, on 5ac4deaa2), and jlric's Wine A/B (an adapted mirror with the rewind polling). neeshz ran the mock tests on 04fdf377f natively.

zneel added a commit to zneel/Leonida that referenced this pull request Nov 23, 2026
The fork keeps the console queue tail answering S_OK; fence slot 12 joins it as
the one fence slot past the public chain that is served. The mock fence keeps the
queue-frequency and heap cases next to ItsNotRexed#7290's fence switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@isfcrctfs

Copy link
Copy Markdown

checked: #7290d5fa829 | with: head-vs-forge-main comparison of the 04fdf377f→d5fa8294 delta (2 files, +28/-3; git apply --check on forge tip b516390: clean); fresh clone of origin/main (867d922f0) + git apply the PR (clean, 5 files +362/-18); cmake --build build --target xs_proxy_mock_test queue_proxy_test, both run under Wine; negative control with the imported 04fdf377f d3d12_xs_device.cpp and the head's test | on: Linux, clang-cl 23.1.5 + lld-link against xwin SDK 10.0.26100, CMake 4.5.1, Wine 11.22-staging, llvmpipe (Vulkan backend; no GPU) | result: pass — an earlier revision of this PR is already in the forge main; the 1-commit delta is not, applies cleanly, and its regression test passes here and fails without it.

Import status:

Runs (base main@867d922f0 + d5fa82948; main has since moved to 6312c057, which touches only xgameruntime.cpp and pe_loader.*):

  • xs_proxy_mock_test.exe: PASS, exit 0 — "PASS (11 allocations refused on purpose)", including the new shared-reference event check.
  • queue_proxy_test.exe: exit 0, 1 backend passed (Vulkan/llvmpipe): "every public queue and fence slot forwarded and counted; fence slot 12 follows a queue signal; tail refused".
  • Negative control: the head's test with the imported 04fdf377f d3d12_xs_device.cpp fails at xs_proxy_mock line 594: pending && GetHandleInformation(pending, &handle_flags), exit 1 — the handle was closed under the surviving fence, which is what the delta fixes.
  • Not run: the retail executable, native Windows, real GPUs (llvmpipe only). Cross-build + Wine, not a Windows or GPU check.

Audit: audit.py diff clean, diff read; no CI, build-script, network, submodule or binary changes; no game data. The thread-pool wait on the real fence's event is the imported part's only concurrency; the delta only changes when the event handle is closed.

agent: yes
AI-assisted.

@KevinPratap

Copy link
Copy Markdown

Tested d5fa82948 on RTX 4050 Laptop (NVIDIA 592.82), Windows 11, MSVC 14.44 RelWithDebInfo, LEONIDA_D3D12=vulkan, own 1.0.2.1 copy, gta6rt --run offline, no asserts stepped over: pass.

Merged onto @tibzejoker's rt5-integration 5fef1f1b1 plus #7746, #7922 and #7880, with the 52 builder programs in pipeline_cache.bin (#8858), and #7110 2f2fb2fbb. Conflicts were the proxy comment blocks and the proxy object's members in d3d12_xs_device.cpp/.h; I kept the stack's queue-layout and allocator-callback members and added this PR's mirror. The tests' conflicts are not in this check.

  • Before: fence slot 12 logged beyond the PC fence vtable (12 slots); returning E_NOTIMPL, and the title then faulted reading 0x80004001, the E_NOTIMPL value used as an address.
  • With it: fence slot 12 (value 2, …): returns the address of the fence's completed value, kept live, no fault, and the run goes on to the next slot 25 stop (d3d12: A8_UNORM textures in 1D and 3D, as the host makes them #7755).

Traces stay local; only outcomes, slot numbers and public formats here. AI-assisted (Claude Code).

@Hiiva

Hiiva commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Source-only integration note for d5fa829488f37e99331a4a279d3a3e932d1b845b: the retained-reference change addresses the earlier immediate-close concern, but the Vulkan backend has a separate ordering gap on current GitHub main 6312c057f88f5627108643e3e1f572d18232c8d2.

In runtime/src/vulkan_backend.h, FenceWaitDispatcher::cancel marks an inactive ready-batch slot canceled and waits only for a Vulkan wait or an active callback on another thread. The skipped entry in dispatch_outside_lock can still signal its raw event afterward. Consequently, a final real-fence Release() returning zero is not by itself a guarantee that every deferred event signal has completed before destroy_child closes the mirror event.

The existing #6243 at 29246fedd996dc7998588b244101c3253da646cf addresses this exact backend gap. It transfers unstarted entries into registered cancellation-owned slots, drains them before returning, rechecks concurrent or nested cancellation, and removes the later event signal from the original batch. Three independent source reads agreed on this interaction. I am reviewing the two complete PRs together for the EXE integration.

This is a source-level ordering finding. No event-handle lifetime reproducer was executed, and no runtime failure of this ordering is claimed.

@simonbronk

Copy link
Copy Markdown
Contributor

Retail test report (local integration, AI-assisted with Claude Code; RTX 5070, driver 621.24, Windows 11): the idea here fixes a real stop. Without a live mirror, the main thread spins on fence slot 12's value, one short of the target, and the title watchdog fires at about 62 s. A local port (a thread-pool wait per fence proxy that refreshes the mirror and re-arms SetEventOnCompletion(v+1)) clears it. The boot then goes on to the first command lists.

@byPreaZy

Copy link
Copy Markdown

checked: #7290 | with: applied the diff on main 6312c05, built xs_proxy_mock_test and queue_proxy_test (MSVC 14.44, Ninja RelWithDebInfo) | on: Windows 11, RX 9060 XT | result: PASS — xs_proxy_mock_test PASS (11 allocations refused on purpose), queue_proxy_test 3 backend(s) passed covering all 64 fence slots on WARP and Vulkan

Code read: slot 12 returns the address of a per-fence mirror kept live by a thread-pool wait that re-arms SetEventOnCompletion(value+1) on the real fence, refreshes on slot-12 calls and CPU Signal, takes a lock for ordering, propagates ~0 on device removal, and WaitForThreadpoolWaitCallbacks drains callbacks before teardown. The 10 ms wait timeout covers fence rewind. Matches the title's (value, &{0, callback, 0, 0}, flags) call shape and its *p vs ~0 / value-subtraction reads.

AI-assisted check.

@sh1shu1

sh1shu1 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested d5fa829 (merged into a local tree: tibzejoker:rt5-integration 5fef1f1 plus #7078, #7009, #7755 and a queue slot 35 routing) on Intel i7-8700, NVIDIA RTX 4070 SUPER (driver 616.92), Windows 11 26200, MSVC 14.44, RelWithDebInfo, retail executable (own 1.0.2.1 copy, LEONIDA_STUB_PIPELINES=1, LEONIDA_SKIP_INT3=1): pass. Without this PR the tree reaches stop 27 of docs/retail_boot_frame_loop.md (#8554): an E_NOTIMPL from fence slot 12 read as a pointer. With it, fence slot 12 answers the completed value's address and the run goes on through 89,964 D3D12 calls to the AcpHal shims and past stop 28. Reached in 1 of 3 runs; the other two die earlier on an int3 that fires on this host in 4 of 6 runs regardless of this PR. Not run: the PR's own tests (its test files were not merged, the tree's own queue/fence tests kept). AI-assisted (Claude Code, Claude Fable 5.1).

dadnotdaddy pushed a commit to dadnotdaddy/Leonida that referenced this pull request Nov 23, 2026
…ress of a completed value that stays live (retail executable, past the PC fence chain)

Squashed from ItsNotRexed#7290 by TreXito, head 04fdf37 (security scan PASS).

Conflicts in xs_proxy_mock_test only: the Mock struct keeps ItsNotRexed#7235's allocation_size/private_data next to this PR's fence fields; the fence switch replaces the fixed GetCompletedValue line, with the resource SetPrivateDataInterface and heap 9/10 cases kept after it; the check list takes the union.
dadnotdaddy pushed a commit to dadnotdaddy/Leonida that referenced this pull request Nov 23, 2026
…o ExecuteCommandLists

Squashed from ItsNotRexed#7286 by Vadson159, head e925b63 (security scan PASS).

Conflicts with ItsNotRexed#7290 (fence slot 12): the queue and fence slot constants are both kept, the header's queue/fence paragraph names slot 35 and fence slot 12, and the refused-tail loops skip both (queue_slot_overridden, fence slot 12). Reviewers' unwrapping bug (a list proxy reaching ExecuteCommandListsX) does not apply here: command lists are not wrapped in this tree (ItsNotRexed#2490 is not in).
dadnotdaddy pushed a commit to dadnotdaddy/Leonida that referenced this pull request Nov 23, 2026
… slot 9 (SetAllocatorCallbackX) on allocator proxy

Squashed from ItsNotRexed#7949 by DevilNine, head e29e989 (security scan PASS).

Conflicts with ItsNotRexed#7290/ItsNotRexed#7286 in the child proxy: the allocator-callback fields sit next to the fence mirror, and the allocator slot-9 branch follows the queue slot-35 branch.
dadnotdaddy pushed a commit to dadnotdaddy/Leonida that referenced this pull request Nov 23, 2026
…load arena, PC-list fixture path

Squashed from ItsNotRexed#2490 by NolanCotter, head ef9d075 (security scan PASS).

Taken at ef9d075, after upstream's revert (57c1753): this head keeps device proxies made by direct callers on PC-shaped lists (the run_tiny_frame regression), maps the console list IID, wraps slot-73 lists, and routes console list slot 139 (Reset) to PC slot 10. Security: prescan no flags, Haiku read PASS; the IID header cites a GPL-3.0 project as a second source for one GUID value measured from the executable (provenance note, no code taken).

Conflicts with Wave 2: the queue proxy keeps ItsNotRexed#7286's ExecuteCommandListsX (slot 35) ahead of this PR's console-layout detection, SignalX and PresentX, and queue_execute_command_lists now unwraps list proxies the way this PR's slot-10 path does (with list proxies in play, ItsNotRexed#7286's early return would have handed the real queue proxies, as ItsNotRexed#7286's reviewers predicted); fence slot 12 (ItsNotRexed#7290) and allocator slot 9 (ItsNotRexed#7949) stay in front of the queue block; device_slot_overridden takes slot 12 with the Wave 2 slots. Tests: queue_proxy_test and the mock's check_tail keep fence slot 12 and expect this PR's S_OK queue tail except overridden slots (35); the mock Kind enum keeps heap and list; the check list takes the union.
@Hiiva

Hiiva commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested the complete source of #7290 (d5fa829488f37e99331a4a279d3a3e932d1b845b) together with #6243 (29246fedd996dc7998588b244101c3253da646cf) in integration 9b423691, including main 5d74c272.

Windows x64, MSVC, RTX 4080, driver 610.62:

  • Full runtime build passed.
  • All 16 selected CPU/User32 tests passed. The selection contains seven existing early-return mock modes and both device-proxy WARP cases. The default mock lifetime fixture was not run or modified.
  • queue_proxy, vk_fence_dispatcher_sync, vk_fence_dispatcher_edge, and xbox_present passed with Vulkan validation enabled and zero VUIDs.
  • The merged queue fixture preserves the existing slot-35 check and uses later values 10/11/12 for the mirror and subsequent signals.

These are synthetic test results. They do not verify the retained-real-fence lifetime fixture, every concurrency interleaving, the unused descriptor callback, or actual title pixels. The documented retained-reference event-handle leak is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.