Skip to content

d3d12_xs: translate title-owned CPU descriptor handles in ListProxy and preserve ClearDepthStencilView FLOAT Depth - #7880

Closed
alexander-src wants to merge 9 commits into
ProjectLeonida:mainfrom
alexander-src:d3d12-xs-list-cpu-handles
Closed

alexander-src wants to merge 9 commits into
ProjectLeonida:mainfrom
alexander-src:d3d12-xs-list-cpu-handles

Conversation

@alexander-src

Copy link
Copy Markdown

Claimed in the coordination issue as: #7694 (comment)

Depends on: #2490, #7021

What and why

#7021 translates title-owned CPU descriptor handles (__XMemAllocationHooks__) on device slots 17–24, and #2490 wraps console-ABI graphics command lists in ListProxy, but neither PR wires translate_cpu_handle into ListProxy. When a title records ClearRenderTargetView (console slot 52) or OMSetRenderTargets (console slot 50) using handles from a hooked descriptor heap, the raw console CPU address reaches the PC/Vulkan command list untranslated and fails.

In addition, console slot 51 (ClearDepthStencilView → PC slot 47) passes FLOAT Depth as its 4th parameter (XMM3 on Windows x64 ABI). The generic all-uint64_t list_slot template reads R9 instead of XMM3, dropping/clobbering Depth before forwarding.

This commit (0aba6c361, stacked cleanly on #2490 ef9d0759d + #7021 355201c51):

  • Translates title-owned CPU descriptor handles across all five ID3D12GraphicsCommandList CPU-handle slots in ListProxy:
    • console slot 50 (PC 46) OMSetRenderTargets: translates RTV arrays into a stack copy (without mutating caller buffers), respects RTsSingleHandleToDescriptorRange (reads only [0]), handles zero RTVs / null DSV, and avoids overrunning stack scratch when NumRenderTargetDescriptors > 8;
    • console slot 51 (PC 47) ClearDepthStencilView: installs a typed WINAPI thunk (list_clear_depth_stencil_view) in vtable[51] that preserves FLOAT Depth in XMM3 and translates DepthStencilView;
    • console slot 52 (PC 48) ClearRenderTargetView: translates RenderTargetView;
    • console slots 53/54 (PC 49/50) ClearUnorderedAccessViewUint/ClearUnorderedAccessViewFloat: preserves ViewGPUHandleInCurrentHeap and translates ViewCPUHandle.
  • Adds synthetic mock tests in xs_proxy_mock_test.cpp covering all five slots (confirmed red before the fix at om_rtvs[0] and green after) and an end-to-end GPU clear + readback test in device_proxy_test.cpp verifying title-backed RTV/DSV clears and exact 0.25f depth clear preservation through XMM3.

Tested

  • OS / compiler / GPU: Windows 11 (26200), MSVC 19.44.35230 (RelWithDebInfo), Windows SDK 10.0.26100, NVIDIA GeForce RTX 5090 (driver 621.24, Vulkan 1.4.357 / SDK 1.4.363.0).
  • Red before fix: xs_proxy_mock_test fails on untranslated OMSetRenderTargets RTV handles (real_list->om_rtvs[0] == kMockHeapCpuStart + off1).
  • Green after fix:
    • xs_proxy_mock_test: PASS (0 failures)
    • device_proxy_test (WARP): OK (0 failures, including RTV RGBA (255, 0, 128, 255) and DSV 0.25f readback)
    • device_proxy_test (LEONIDA_D3D12=vulkan LEONIDA_VK_VALIDATION=1): OK (0 failures, 0 validation errors)
    • ctest -R ^(xs_proxy_mock|device_proxy|queue_proxy|xbox_present|d3d12_present|d3d12_descriptor|d3d12_clear|d3d12_draw)$ with LEONIDA_VK_VALIDATION=1: 8/8 passed
    • scripts/check_no_game_data.py on all modified files: PASS
  • Retail 1.0.2.1 check (local integration worktree, RTX 5090, LEONIDA_D3D12=vulkan): cleared ClearRenderTargetView (slot 52) and OMSetRenderTargets (slot 50) handle translation; Close 586 ok / 0 failed, advancing into DrawInstanced. Counts/outcomes only.

AI-assisted: yes (Antigravity).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (N/A — runtime d3d12_xs proxy only, no shader translator changes.)

Khuraie and others added 9 commits November 23, 2026 23:42
The d3d12_xs shim's device now hands callers console-shaped command
lists (160-slot vtable, object body at +0x18 with the write cursor
pinned at the record limits, console slots 27-30 recorded not
forwarded, slot map measured to the PC table: 60->58, 61->59,
146->80). Queue layout detection is atomic and device-wide; SignalX
(slot 23/25 by layout) forwards as Signal, PresentX (30/32) reaches
the presentation core, and ambiguous slot 18 serves the timestamp-
frequency getter until the layout is proven.

AllocateUploadMemory (console slot 148) carves a bump arena out of
persistently-mapped UPLOAD-heap buffers; the six root-VA setters and
the IA/SO view setters translate arena pointers to buffer device
addresses in proxy-owned copies. Impossible sizes and non-power-of-
two alignments are refused before any arithmetic that could wrap.

PC-compiled callers opt into real PC-shaped lists with
console_lists=false on create_device_proxy, and PC-compiled guests
with LEONIDA_D3D12_LISTS=pc — the fixture path check_tiny_frame.py
sets, so a guest ClearRenderTargetView at PC slot 48 reaches the
real list. The GPU tests take the flag; unmeasured console slots
stay console-shaped for the title path.

docs/d3d12_xs_console_abi.md records the measured ABI.

Split from ItsNotRexed#2490 (third of three): fixes the run_tiny_frame failure
the revert reported. AI-assisted. Hardware verification on the
earlier identical code is in ItsNotRexed#2490's thread (RTX 3060 Ti-5080, RX
7600/9060/9070/7900 XT, Intel UHD, RADV; 177/177). Wine/clang-cl on
the build host: xs_proxy_mock PASS incl. the overflow regression,
queue_proxy child-runner section fails identically on unmodified
main (Wine env), loader_test 86/0 upstream count.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
test_every_variable_is_named_in_a_document fails when a code-used
environment variable is documented nowhere. The variable is described
in the command-list section where the two list layouts are defined.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Upstream's device routes Xbox slot 73, but returned the real PC list
unwrapped: the title's next console-slot call read through the PC
vtable. With console_lists the device now builds the real list as
ID3D12GraphicsCommandList and wraps it like the slot-12 path; a
console IID is answered by the list proxy's QueryInterface.
The title's first call on a wrapped list is QueryInterface with the
console command-list IID c3827890-...-51dc4874; is_list_iid knew only
PC IIDs and refused it. Port the measured console->PC IID table from
(closed, unmerged) ItsNotRexed#7124 into d3d12_xs_command_list_iid.h and run the
requested IID through it in list_query_interface and in the PC-mode
slot-73 path, so a console IID maps to ID3D12GraphicsCommandList6 and
the caller gets the console-shaped proxy back.
create_device_proxy's console_lists default was true, so every test
harness that links the TU and calls it directly got console-shaped
lists and crashed or failed Close on PC vtable indices (kormocicsaba:
d3d12_bindless_churn segfault, d3d12_mesh Close). The console shape is
the title path: D3D12XboxCreateDevice opts in (unless
LEONIDA_D3D12_LISTS=pc), and the default is now false so direct
callers keep the pre-PR behaviour. The mock test pins both: slot 12
on a console_lists=false device returns the real list.
Pipodi measured the retail title calling console list slot 139 with
(allocator proxy, pso) before recording — Reset, at PC slot 10. Map it
and unwrap the allocator (and a pipeline state the same way); the
unwrap now keys on the PC slot so console-10 and console-139 both land
on the real Reset.

xs_proxy_mock: PASS under Wine

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nd preserve ClearDepthStencilView FLOAT Depth

ItsNotRexed#7021 translates title-owned CPU descriptor handles (__XMemAllocationHooks__) on
device slots 17-24, and ItsNotRexed#2490 wraps console-ABI command lists in ListProxy, but
neither wires translate_cpu_handle into the five graphics command-list methods
that consume CPU descriptor handles:
- console slot 50 (PC 46): OMSetRenderTargets (RTV array / single-range + DSV)
- console slot 51 (PC 47): ClearDepthStencilView (DSV handle)
- console slot 52 (PC 48): ClearRenderTargetView (RTV handle)
- console slot 53 (PC 49): ClearUnorderedAccessViewUint (CPU handle; GPU kept)
- console slot 54 (PC 50): ClearUnorderedAccessViewFloat (CPU handle; GPU kept)

Also installs a typed WINAPI thunk for console slot 51 (ClearDepthStencilView):
on the Windows x64 ABI, FLOAT Depth (4th argument) is passed in XMM3 rather than
R9, so the generic all-uint64_t list_slot template dropped/clobbered Depth before
forwarding to the real list.

Adds synthetic mock coverage across all five slots (including single-range RTVs,
null/zero-RTV cases, count > 8 bounds safety, outside-range passthrough, and
XMM3 float preservation) plus an end-to-end WARP/Vulkan GPU clear and readback
check in device_proxy_test.
@shdann

shdann commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested 0aba6c361 on Windows 11 with AMD Radeon Graphics (32.0.21043.5001) and NVIDIA GeForce RTX 4090 (32.0.16.2101). The color and depth readback checks pass on both adapters. AI-assisted.

I built device_proxy_test and xs_proxy_mock_test in RelWithDebInfo. The unmodified CTest run passed all three tests selected by -R "^(xs_proxy_mock|device_proxy|device_proxy_trace)$". The device fixture uses WARP by default.

For the two hardware runs, I changed only the adapter selection in the local fixture. I used DXGI vendor IDs 0x1002 and 0x10DE and checked the printed adapter names. On each adapter, console slot 52 wrote the expected RGBA texel through the hooked descriptor heap. Slot 51 preserved the requested depth of 0.25. Both runs exited 0.

I also built the new mock test against parent ce3f2dbde. It exits 1 at line 1299 because slot 50 forwards the wrong first render-target handle. All inputs were synthetic.

@fladit123

Copy link
Copy Markdown
Contributor

Independent Windows review — PC descriptor-handle mismatch (COMMENT)

Tested head: 0aba6c3611541f169c25f0e3a1de90db25bdd2d4

Environment: Windows 11 build 26300, MSVC 19.51, Windows SDK 10.0.26100, WARP.

I independently reproduced a wrong-target RTV clear when a PC command list receives a custom CPU descriptor handle returned by heap slot 9.

Synthetic reproducer

Two RGBA8 textures, A and B, and valid WARP RTV heaps were used.

The custom allocation hook supplied a second heap's CPU base. Its descriptor at index 1 already referenced texture B, while the device proxy translated the custom destination correctly when creating an RTV for texture A.

The subsequent clear identifies which descriptor the command list actually consumed.

Configuration Result
#7021, PC list, ordinary RTV handle Clears A
#7021, PC list, custom slot-9 handle Clears B
#7880, PC list, custom slot-9 handle Clears B
#7880, console ListProxy, custom slot-9 handle Clears A
#7880, PC list, explicitly translated handle Clears A

Each configuration was run twice with consistent results. Readback checked all four color channels after fence completion. Control texels remained unchanged.

Likely explanation

Device slots 17–24 translate custom CPU descriptor handles, and the console ListProxy in #7880 translates the relevant command-list arguments.

However, proxy_create_command_list() returns the native command list when console_lists=false. That path bypasses the translation performed by the console wrapper.

Consequently, a PC command list receiving a title-owned custom handle may interpret it as an ordinary native descriptor address and operate on a different resource.

Scope and question

The console path tested here behaves correctly. This finding does not establish a regression in the intended console behavior.

Could we clarify the intended contract for PC-mode command lists?

  • If PC mode is only used by fixtures, translating the handle explicitly before passing it to the native list may be the least risky solution.
  • If PC clients are expected to consume custom-backed descriptor heaps directly, the PC ABI path also requires compatible descriptor translation without changing COM identity or ordinary handle behavior.

I recommend resolving that scope decision with #2490 and #7021 before opening overlapping implementation work.

Related: #7066 also requires destination-handle translation when composed with #7021; that integration point was previously identified and tested independently.

Synthetic fixtures only. No proprietary game files, repository changes or publication were involved in the reproduction.

AI-assisted investigation using OpenAI Codex.

@Stalkerino

Copy link
Copy Markdown

I reproduced the retail 1.0.2.1 console-list case under Proton CachyOS 11.0-20261015, Gamescope, and RADV on an RX 9070 XT. The test used the same local integration of #2490 and #7021 before and after adding the runtime change from 0aba6c361.

Retail trace Before With #7880
Successful command-list Reset 1 1
Successful Close 585 586
Failed Close 1 0
ClearRenderTargetView calls 1 1

A separate diagnostic on the baseline tied the failure to console slot 52. The target received by the clear had a missing resource or zero layer count. Both barriers were recorded on the list, and the subsequent Close returned E_INVALIDARG with no open query. With #7880, the same clear was followed by a successful Close. All eight proxy mock invocations passed under Proton, including the console descriptor-handle assertions.

On our tested configuration PresentX accepted one plane, the 960 × 540 window appeared black, and the title stopped at Game Init, engine frame 0. We observed no PC ExecuteCommandLists or DrawInstanced in either trace. Queue slot 35 was still unimplemented in both builds. This check used the console ListProxy path. AI-assisted testing.

@controldebils

Copy link
Copy Markdown
Contributor

Retail confirmation from Windows 11 + AMD RX 6900 XT (LEONIDA_D3D12=vulkan, own 1.0.2.1 copy, game shaders translated, frame loop with #2490 ef9d0759d and #7286): translating the title-owned CPU handles in the list proxy for console list slots 50-54 (OMSetRenderTargets, ClearDepthStencilView, ClearRenderTargetView, the UAV clears) makes the cleared RTV the same resource PresentX presents. With it, a forced clear colour reaches the presented plane on every pixel. Our local stand-in matches this PR's approach; we haven't run this head itself yet.

AI-assisted (Claude Code).

@jlric

jlric commented Nov 23, 2026

Copy link
Copy Markdown

CachyOS, Wine 11.22, Vulkan, RTX 4070 (620.73.04), AI-assisted. With the slot-139 reset fix held constant, the runtime hunk from 0aba6c361 eliminated ClearRenderTargetView as the first invalid command at Close (50 before, 0 after, 92 RTV handles translated). The focused slots 50–54 mock passed under Wine. Remaining first-invalid closes were on the compute dispatch path.

tibzejoker added a commit to tibzejoker/Leonida that referenced this pull request Nov 23, 2026
Only the PR's own commit is applied (its branch is ItsNotRexed#2490ef9d075 + ItsNotRexed#7021, both already here): list slots 50/52/53/54 translate title-owned CPU handles through ItsNotRexed#7021's translate_cpu_handle, slot 51 gets the typed thunk that keeps FLOAT depth. List routing (139, 73, queue 35 unwrap) is unchanged. Mock test keeps every earlier field and check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tedin7

tedin7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

checked: #7880 at 0aba6c3, merged onto main 867d922 (clean merge) | on: Wine 11 on RunPod RTX 4090 (Linux), clang-cl cross-build; not native Windows, host D3D12/WARP comparisons do not run | scope note: this branch is a stack. git log origin/main.. shows #2490's seven commits, the merge of #7021 (ce3f2dbde), and one unique commit 0aba6c361; what I reviewed as this PR's own change is that commit (3 files, +447/-5: the five descriptor-handle translations in the console command list and a typed thunk for list slot 51). Merging it merges #2490 and #7021 too.

ran: xs_proxy_mock_test EXIT 0 (PASS (10 allocations refused on purpose), includes the new five-slot and XMM3 checks) and its five ctest modes by hand (--fail-virtualalloc, --fail-virtualprotect, --fail-veh, --env-slots, --env-slots-invalid), all EXIT 0. device_proxy_test builds, EXIT 77 SKIP: no WARP adapter, so its new GPU clear-and-readback check did not run here. Negative control: with only d3d12_xs_device.cpp set back to the parent commit (#2490 + #7021, PR tests kept), xs_proxy_mock_test exits 1; with the PR it exits 0. So the mock test does fail without the change.

diff review of 0aba6c361: slot 51 now has a typed thunk (list_clear_depth_stencil_view(self, dsv, flags, FLOAT depth, UINT8 stencil, ...)) so Depth stays in XMM3 and the title-owned DSV handle is translated; this is the fix for the float-argument defect I reported on #2490, and the mock checks that the float arrives intact. OMSetRenderTargets translates into local copies (no write to the caller's array), a single-range RTV only translates the range start, and a count above 8 is passed through untranslated (D3D12's maximum is 8, so I see no harm). ClearRenderTargetView and the two ClearUnorderedAccessView calls translate only the CPU handle and keep the GPU handle. The new code is small and bounded. I did not find a defect in the commit itself.

What this does not cover (not fixed by this PR, still true at this head): (a) the PC-list path. @fladit123 reproduced on WARP that a PC list (console_lists=false, returned as the native list) given a custom slot-9 handle clears the wrong texture, because only the console wrapper translates; (b) the guest runners: runtime/test/run_guest_draw.cmake and scripts/run_guest_scene.py still contain no LEONIDA_D3D12_LISTS, so the regression I described on #2490 for d3d12_translated_draw_guest / d3d12_guest_scene is still there by reading; (c) the upload arena that never rewinds and the never-shown PresentX window from #2490 are in this branch too.

Not verified: native Windows, WARP or real-device behaviour (the GPU readback test is skipped under Wine), retail boot, the guest runners.

agent: yes
AI-assisted.

@lines9686-rgb

Copy link
Copy Markdown
Contributor

Retail boot check on NVIDIA Ampere: this PR clears the per-frame Close failures.

Setup: Windows 11, RTX 3060 Ti, NVIDIA 610.88, MSVC 19.52 RelWithDebInfo, own 1.0.2.1 copy, LEONIDA_D3D12=vulkan. Base: tibzejoker's rt5-integration 5fef1f1b1, plus #7516, #7290, #7746, #6885, #7286 (slot 35 unwrapping the list proxies) and #6945, merged locally.

  • Without this PR: in a 150 s run, ID3D12GraphicsCommandList::Close failed 15,342 times in 30,684 slot-35 submissions. I added a local log (not in any PR) to the layer's check() with the call site. Every invalidation came from one place, ClearRenderTargetView -> CommandList::clear_render_target, whose TargetView check fails. The handle that reached it was the title's console CPU handle, untranslated.
  • With this PR: 0 Close failures. In a 600 s run: 39,500 Close ok, 38,877 slot-35 submissions, 50,468 CreatePipelineState ok. The log stays silent.
  • Still no PresentX call in that run. It ends at about 55 s in NVIDIA's shader compiler (nvgpucomp64.dll, read at 0x17, called from nvoglv64.dll during a queue submission). That has nothing to do with this PR.

No game data. AI-assisted (Claude Code).

@throny throny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 0aba6c3 on the retail exe boot stack (Windows 11, RTX 4080 610.88): the per-frame Close failure is gone. Failed Close calls go from 196 to 0.

  • Base: ramenbellic:boot/retail-stack (current main) plus about 20 open boot PRs and #7180, MSVC 14.44, RelWithDebInfo, LEONIDA_D3D12=vulkan, translated shaders, offline. Only this PR's own commit was cherry-picked; its dependencies (#2490, #7021) were already in the stack.
  • Before (one run, stopped at 115 s): 68,902 D3D12 calls, 196 Close failed, one per frame, on the list that holds ClearRenderTargetView and the frame's DrawInstanced.
  • After (one run, stopped at 214 s): 66,056 D3D12 calls, 0 Close failed, 837 Close ok, 107 ClearRenderTargetView, 106 DrawInstanced, 213 ExecuteCommandLists ok.
  • Not changed by it: no PresentX call in either run.
  • The two runs differ in one local setting besides this PR (driver pipeline compiles limited to 2 at a time before, 1 after), so compare the Close counts, not the times. Both runs were stopped by a local memory watchdog, not by a fault.
  • Merge: d3d12_xs_device.cpp and device_proxy_test.cpp applied cleanly; xs_proxy_mock_test.cpp conflicted with other open PRs in the stack and I kept the stack's copy, so this PR's mock tests were not run.
  • Read: the d3d12_xs_device.cpp change of that commit only, so this is a comment, not an approval.

AI-assisted (Claude Code). Counts and slot numbers only, no game data.

@KevinPratap

Copy link
Copy Markdown

Tested 0aba6c361 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: pass.

Merged onto @tibzejoker's rt5-integration 5fef1f1b1 plus #7746 and #7922. There were 3 conflicts with that stack: the include block and the device-slot list in d3d12_xs_device.cpp (the stack's list is a superset), and the slot comment in d3d12_xs_device.h. I kept the stack's side; this PR's list-proxy translation merged cleanly.

  • Before: 12,017 D3D12 calls, 1 failed: an ID3D12GraphicsCommandList::Close right after ClearRenderTargetView and an enhanced Barrier. A local diagnostic build that logs the first check(false) per list named ClearRenderTargetView → clear_render_target → valid(target) failing: the title's CPU handle reached the layer untranslated and read as a target view with no resource.
  • With this PR: 12,158 calls, 0 failed, and the diagnostic reports no invalid list.

The run then stops at the same title int3 as before, so that assert is not caused by this Close. Traces stay local; no game data. AI-assisted (Claude Code).

@fever308

Copy link
Copy Markdown

checked: #78800aba6c3 | with: cmake -S runtime -B runtime/build -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.26100.0 -DLEONIDA_VULKAN_HEADERS_FETCH=ON -DLEONIDA_REQUIRE_VULKAN=ON, cmake --build runtime/build --config Release --target device_proxy_test xs_proxy_mock_test queue_proxy_test -- /nr:false /m:1, device_proxy_test.exe, xs_proxy_mock_test.exe, queue_proxy_test.exe, python -I scripts/check_no_game_data.py ... | on: Windows 11 x64, MSVC 19.44.35222.0, Windows SDK 10.0.26100.0, NVIDIA GeForce RTX 5090 (driver 617.42), synthetic tests only (no game files) | result: pass (0aba6c361 standalone device_proxy_test: 0 failures; forge main@d11493131 + 0aba6c3611: xs_proxy_mock_test PASS with 12 allocations refused on purpose, queue_proxy_test 3/3 backends pass including Vulkan RTX 5090, and all 7 new #7880 checks in device_proxy_test pass; check_no_game_data.py: clean)

Integration note for forge main@d11493131 (git.notrexed.dev/enx/leonida)

  • forge main already includes #2490 and #7021, plus commit 13da4634eb (d3d12_xs: console list slot 51 (ClearDepthStencilView) keeps its FLOAT depth), which defines a 3-line list_clear_depth_stencil_view thunk without translate_cpu_handle.
  • When cherry-picking #7880's unique commit 0aba6c3611 onto forge main@d11493131, Git auto-merges runtime/shims/d3d12_xs_device.cpp cleanly on the surface while leaving two definitions of list_clear_depth_stencil_view (error C2084: function 'list_clear_depth_stencil_view' already has a body), and conflicts in 4 additive blocks of runtime/test/xs_proxy_mock_test.cpp.
  • Dropping 13da4634eb's duplicate list_clear_depth_stencil_view in favor of #7880's translate_cpu_handle-aware version (and keeping both sides of the 4 additive xs_proxy_mock_test.cpp blocks) compiles and passes all #7880 tests on forge main@d11493131.
  • Note: on forge main@d11493131 itself (unrelated to #7880), device_proxy_test has 1 pre-existing failure (FAIL queue slot 18 PC form still forwards GetDesc because an undetected queue's PC-order slot 18 answers #2490's newer-layout timestamp frequency getter rather than #7937's GetDesc).

Negative control

  • Temporarily skipping translate_cpu_handle(self->device, dsv) in list_clear_depth_stencil_view causes xs_proxy_mock_test.exe to fail at xs_proxy_mock line 2662: real_list->clear_dsv_handle == kMockHeapCpuStart + off6 (exit 1).

AI-assisted.

@rideinstead

Copy link
Copy Markdown

✅ Automated security review: CLEAN (commit 0aba6c36)

  • No findings.

Scope: static analysis of added diff lines only; no code was executed. Please review findings manually.

@SirKingg

Copy link
Copy Markdown
Contributor

Independent Windows/MSVC check of head 0aba6c3 in a temporary integration stack: all 12 targeted startup, XMem, GameInput, proxy and host-memory CTest cases passed. The WARP proxy test exercised title-backed RTV/DSV clears and verified the GPU readback, including depth 0.25.

With Vulkan in a Windows Sandbox configured with networking disabled (and guest checks for no active adapters/default routes), dry-run and init succeeded. The retail run passed descriptor heap slots 9/10, recorded 1,187 successful D3D12 calls, and next stopped with a host write access violation after the first forwarded device slot 70. This is consistent with the separate existing slot-70 work in #7066/#8304/#9285; I have not independently proven the exact host instruction's cause. This is progression evidence only, not a rendering or retail memory-coherence validation.

@jtrudeau1530

Copy link
Copy Markdown

checked: the #7880 own delta passes its mock checks, but our older integration also needed #2490's separate list-139 Reset fix to clear its first Close failure.

Linux, Wine 11.18, RX 7900 XT/RADV, clang-cl 23.1.6 + xwin. This is the frozen older integration from our #7746 comparison, not current main or the forge. Same five shader indexes, runner, prefix and display setting throughout; source, patch, executable/PDB and index hashes verified locally. Existing diagnostic stand-ins remain in that base.

Three snapshots:

Snapshot Only added change Observed first recording
c3q control None No PC Reset; Close fails
c3r #7880's own ce3f2db..0aba6c3 delta Slot 52 reached; no PC Reset; Close still fails
c3s c3r + only #2490's 5be2fd2..ef9d075 delta Console slot 139 reaches PC Reset, which succeeds; subsequent Close succeeds

We did not take the newer #2490 IID/default-list-shaping commits or 084c8bd's GameInput change. #7880 production merged with a constants union only. Its mock needed three declared adaptations to the older harness: two Kind::command_list alternatives reduced to Kind::list, and the fifth make_device argument omitted because this harness already defaults to console lists. All #7880 assertions were retained. The typed slot-51 thunk stayed in c3s.

Each added snapshot built and ran the same 51-test subset: 45 pass, one corpus skip without its environment, five unchanged failures (device_proxy/device_proxy_trace, the two known Wine startup/TLS cases, d3d12_mesh). All eight xs_proxy_mock modes pass. The WARP device-creation failure prevents #7880's end-to-end clear/readback cases from being exercised here.

Two separate negative controls retain byte-identical tests: removing only slot-52 handle translation fails the new translated-RTV assertion; removing only the slot-139 mapping fails the Reset-routing/allocator-unwrapping assertion.

Retail: fresh c3q/c3r runs have the same method/outcome counts (2,334 calls, one failed Close), with a queue-event ordering variation. c3s uses that recent c3r run as its hash-verified control: 2,336 calls, zero failed traced outcomes, one new successful Reset, and Close changes from failed to successful. A console-only queue event occurs twice rather than once. The old failure's HRESULT is not logged, so “already closed” remains a mechanism inferred from source; the isolated Reset change demonstrably removes the failure.

All three still hit the same worker-thread title breakpoint and exit 3. The 11 untraced slot-67 failures (eight missing programs), format-65 allocation warning and allocator-slot-9 refusal remain. PresentX is ready, but no PresentX call or rendered frame is established on these runs. Clearing Close is therefore insufficient to clear that assertion. This is an older-base integration result, not a general failure verdict on #7880.

AI-assisted (Codex review; Claude execution). agent: yes

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.