Repository navigation
Conversation
…l call passes, not 24 The retail executable's one D3D12XboxCreateDevice call passes adapter = null, ID3D12Device11's IID and a 0x50-byte (20-word) params block in its own stack frame. The shim logged 24 words, reading 16 bytes past the caller's block. Log 20 words, have device_proxy_trace check the last word and that nothing past the block prints, and state the measured size in the docs.
This was referenced Nov 23, 2026
|
Tested
|
|
Checked the executable side of this PR statically on my own 1.0.2.1 copy: pass. Linux,
Layout and counts only; no addresses or values from the executable. AI-assisted (Claude Code). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke. The retail executable calls
D3D12XboxCreateDeviceonce, with adapter = null,ID3D12Device11's IID and a params block of 0x50 bytes (20 32-bit words) in its own stack frame.runtime/shims/d3d12_xs.cpplogged 24 words, so every call read 16 bytes past the caller's block and printed 4 words of unrelated stack as if they were device parameters.docs/boot.mdQ1 anddocs/d3d12_vulkan.md§8.2 #1 (plus three other doc rows) carried the same 24-word assumption.Repro on main:
device_proxy_test --trace-d3d12with a 24-word buffer whose words 20-23 hold a sentinel prints that sentinel on theparams[24]line.Fix. Log exactly 20 words (
params[20] = ...). The docs now state the measured size (20 words, 0x50 bytes), the null adapter and theID3D12Device11IID; field meanings stay open. The test fixtures that pass a params block (tiny_frame,d3d12_translated_draw_test) and theruntime_typeslayout check use 20 words.Tests.
device_proxy_tracenow passes word 0 =1234abcd, word 19 =5e1f0013and0bad0badin the four words past the block. Its PASS regex requires the lineparams[20] =1234abcd ... 5e1f0013to end at word 19, and0bad0badis a FAIL regex.Native Windows 11 (10.0.26200), MSVC 19.51.36260 (VS 18), Ninja RelWithDebInfo, full runtime build with
-j 6:device_proxy,device_proxy_trace,runtime_types,d3d12_translated_draw,run_tiny_frame,run_tiny_frame_queue_test_settings: all pass on the RTX 4080 SUPER. The same set withoutd3d12_translated_drawpasses withVK_LOADER_DRIVERS_DISABLE=*nv*andLEONIDA_VK_DEVICE=Intel.d3d12_vulkan_device,d3d12_indirect_dispatch_countandd3d12_indirect_rtfail both with this branch and with main'sd3d12_xs.cppin the same build, so the change doesn't cause them.tests/test_docs_*.pygive the same results as main. Thedocs/dev-tools.mdfailures intest_docs_cli_flagsandtest_docs_linksalready happen on main.Negative control. With main's
runtime/shims/d3d12_xs.cpprestored and rebuilt,device_proxy_tracefails (Error regular expression found in output. Regex=[0bad0bad]). With this branch's file restored, it passes.Coordination: #6025's summary regex accepts any word count. Its fixture and doc text say 24, and I left a note there. #5328 changes the proxy line below this block and doesn't touch the word count.
AI-assisted.