Repository navigation
d3d12_xs: device slot 133 places a resource as a committed DEFAULT one (CreatePlacedResourceX stand-in, depends on #6953) - #7075
Conversation
…e PC vtable refuse with E_NOTIMPL The retail title calls device slot 133, past the 128-entry table; the call read an empty entry and jumped to 0. Every slot beyond the PC device's vtable now reaches the generic thunk. Mock test covers slot 133. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e (CreatePlacedResourceX stand-in) Xbox device slot 133 is (va, desc, initial_state, clear_value, riid, out), the shape of the console's CreatePlacedResourceX. With ItsNotRexed#6953 the call reaches the beyond-table refusal and the title asserts on the E_NOTIMPL. The proxy now answers it before that refusal: a committed DEFAULT-heap resource from the description with the PC flag bits only, slot 76's layout rule, COMMON for a buffer or the all-ones state, and the clear value only for render-target and depth textures. The resource is not backed by the memory at va; that needs the physical-page mapper. xs_proxy_mock_test: a mock CreateCommittedResource that records its arguments, and a slot 133 case over a 76-slot device (buffer, render target, all-ones state, null arguments, a failed creation). The beyond-table check moves to slot 134. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…resource # Conflicts: # runtime/shims/d3d12_xs_device.cpp # runtime/shims/d3d12_xs_device.h # runtime/test/xs_proxy_mock_test.cpp
|
Linux results for the committed control and for the physical backing work claimed by @guimsolutions. Backing task
The reproducer has a single commit on the public #5381 head and builds using the public XMem exports from #6919. The commit message gives the two refs and commands. I applied its patch in a fresh worktree, rebuilt it and reran it on this GPU. Source, shader and reproduction instructions |
…n and runs on its own line, clear of the slot 73/list changes in ItsNotRexed#7076 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
AI-assisted (Claude Code). |
|
Independent test of the runtime change in On the same integration with #7076, all 581 lists create and close. With the 128-slot table, the next stop is a null execute fault. With #6953 the same path reaches slot 133 and receives E_NOTIMPL. With this PR's diagnostic stand-in, the committed resource creation succeeds and the first descriptor heap is created; startup then stops at the CPU handle check. This confirms the next stop under Wine, without verifying backing at the guest VA. One cross-build issue in the synthetic test: clang-cl rejects the constexpr cast of the Xbox-only bit to D3D12_RESOURCE_FLAGS because the value lies outside the SDK enum's range. I kept the test's Xbox flag and layout words as uint32_t and copied them into the fixture's ABI fields with memcpy, with width assertions. That variant compiled and passed xs_proxy_mock under Wine. Outcomes only; no retail data or trace. AI-assisted (Codex). |
|
Tested
To see slot 133 itself, the boot needs the xmem, TLS, slot 26/48/73 and list-proxy PRs stacked. I didn't build that stack, and @kingzzim7-create claimed that integration check. AI-assisted (Claude Code). |
|
Code read of
Not run: code read only, no tests run. AI-assisted review. |
|
@NiiRoZz a retail note on slot 133's state word, from an RX 6900 XT run (Windows 11, MSVC,
@tibzejoker, the same applies to #7218: it handles buffers only, and the title also places textures through slot 133 with a layout word. AI-assisted (Claude Code). |
|
Tested Setup: RTX 4070 (driver 621.01), Windows 11 Pro 26300, MSVC (VS 18) RelWithDebInfo with Ninja, Vulkan SDK 1.4.363.0. The PR head was merged alone into main 8575d36 and AI-assisted review (Claude Code). How this compares with the other boot-chain PRs: #7333 (comment) |
…CreateCommittedResource3 with it The word slot 133 passes after the description is a D3D12_BARRIER_LAYOUT, not a resource state: the title passes all ones (UNDEFINED) for its first buffer and 6 (SHADER_RESOURCE) for 1x1 render-target and depth textures. Read as a state, 6 is INDEX_BUFFER | RENDER_TARGET, which the PC device refuses for a texture, and the title then asserts on the missing resource. On a PC device with ID3D12Device10 the resource is created through CreateCommittedResource3 with the layout as given (UNDEFINED for a buffer). An older device gets CreateCommittedResource with the legacy state of that layout, COMMON for UNDEFINED and for layouts that have none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi, #7218 (mine) and this PR both handle device slot 133 and conflict in |
Claimed in the coordination issue as: #7049 (comment) (item 2)
Depends on: #6953 (the 192-slot device table). This branch is #6953 plus one commit.
What and why
Xbox device slot 133 is
(va, desc, initial_state, clear_value, riid, out), the shape of the console'sCreatePlacedResourceX. Measured locally at a title's call sites:riidisID3D12Resource,vais the start of a range the title has just reserved for physical pages,descis a 56-byteD3D12_RESOURCE_DESCwith Xbox bits inFlagsabove the PC flags, andinitial_stateis all ones, which is no PC state. With #6953 the call reaches the beyond-table refusal, and the title asserts on theE_NOTIMPL.The proxy now answers slot 133 before that refusal and calls the PC
CreateCommittedResourceon a DEFAULT heap. The description is cleaned first:USE_TIGHT_ALIGNMENT);ROW_MAJORfor buffers,UNKNOWNotherwise);COMMONfor a buffer or for the all-ones state;This is a stand-in. The resource isn't backed by the memory at
va, so what the title writes into that range doesn't reach it. The first-call log line says so. Backing it needs the physical-page mapper; I posted that as a new item on the coordination issue.With it (and the other open PRs on that path), the boot gets past slot 133 to the first descriptor heap.
Tested
Windows 11 (build 26300), RTX 5090, MSVC 19.44, Vulkan SDK 1.4.363.0, RelWithDebInfo.
xs_proxy_mock_test: a mockCreateCommittedResourcerecords its arguments. The new case uses a 76-slot device, so slot 133 is past its table, and covers a buffer with an Xbox flag and layout word, a render target in a PC state with its clear value, the all-ones state on a texture, null description/IID/output, and a failed creation. The beyond-table check moves to slot 134. PASS.ctest -R "xs_proxy|device_proxy": 6/6 pass.CreateDescriptorHeap.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (n/a: runtime only)Update: the fourth word is a barrier layout
Later in the boot, slot 133 is called for 1x1 render-target and depth textures with the fourth word 6. Read as a resource state, that is
INDEX_BUFFER | RENDER_TARGET, which the PC device refuses for a texture, and the title then asserts on the missing resource. As aD3D12_BARRIER_LAYOUT, 6 isSHADER_RESOURCE, and the all-ones value of the first call isUNDEFINED(#7052 reads slot 127's argument the same way). Commite0b300f02:ID3D12Device10, the resource is created throughCreateCommittedResource3with the layout as given (UNDEFINEDfor a buffer).CreateCommittedResourcewith the legacy state of that layout (COMMONforUNDEFINEDand for layouts that have none).xs_proxy_mock_test: the slot 133 case passes layouts now, addsSHADER_RESOURCEon the 76-slot device, and adds anID3D12Device10device whoseCreateCommittedResource3gets the layout, the cleaned description, the clear value and no session; a buffer goes inUNDEFINED. It passes; the previous handler fails it at theRENDER_TARGETlayout case.device_proxy_test: OK.🤖 Generated with Claude Code