Repository navigation
Conversation
The retail executable calls GetCustomHeapProperties (device slot 26) with the C convention: the hidden return buffer in RCX and the device in RDX. The proxy's generic forwarder assumed the PC C++ form (this in RCX, buffer in RDX), took the buffer for the device and crashed on its vtable right after D3D12XboxCreateDevice. Slots 25 (GetResourceAllocationInfo, same rule, inferred) and 26 (measured) now get thunks that accept either form: whichever of the first two arguments is the device proxy is `this`. The runtime's own code still calls the proxy through d3d12.h in the PC form. device_proxy_test calls both slots in both forms against WARP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The retail executable calls GetCustomHeapProperties with the return buffer in RCX and the device in RDX. The forwarder took RCX for the proxy and faulted. AI-assisted.
…two comments AI-assisted.
AI-assisted.
…(RT-5 stop 17) The retail title asserts when its first full-screen render targets leave more than 2 MiB of a fixed budget unused (docs/retail_boot_chain.md, ItsNotRexed#6982). The PC size is about width x height x element bytes; the console takes whole RDNA2 SW_64KB tiles. Slot 25 adds the difference per render target description and never lowers a size. Depends on ItsNotRexed#6973.
…ons (RT-5 stop 16) The title's descriptions carry the Xbox layout word and flag bits above the PC ones. Slot 25 now passes a copy with PC flags and a PC layout; the title's array is not written. Depends on ItsNotRexed#7078.
…t 26 from ItsNotRexed#6964, slot 25 return-buffer form kept from ItsNotRexed#6973
…t, slot 56 offsets, full mip chains, rounded-up mip extents, B5G5R5A1, saturating sums
…cription, the PC device's answer for the console layout word is UINT64_MAX (found by devnull34 on ItsNotRexed#7110)
…er-resource array
d3d12: preserve PC descriptor validation in slot 25
…zed and created without it (stand-in) The console allows ALLOW_DEPTH_STENCIL | ALLOW_UNORDERED_ACCESS on a texture; the PC runtime refuses the pair and slot 25 answered UINT64_MAX for it. pc_resource_flags drops the UAV bit from depth-stencil textures (slot 25 through pc_resource_desc, and slot 76). Their UAV views then write no descriptor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Windows test of Setup: Windows 11 x64, MSVC 19.44.35220 (
AI-assisted review/test. |
|
Tested on RTX 5090, 621.24, Windows 11: pass. The descriptor/depth targets this touches all pass: |
|
I tested the storage-copy follow-up proposed here on a GTX 750 Ti (560.94). One detail that matters for the descriptor path: on a local Leonida build based on b2e6066, calling I also checked the copy path independently in Vulkan, at 2560×1440, one mip and one sample:
This gives the follow-up a regression case that runs without game files. The retail UAV view format and plane selection are still unverified. AI-assisted test and write-up. |
|
Tested 4a86034 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010: pass
AI-assisted (Claude Code). |
|
Build note from a clang-cl 23.1.5 + xwin cross build on Linux:
AI-assisted (Claude Code). |
…the D24S8 family Measured on the retail boot once ItsNotRexed#4493 sizes its sRGB render target: device slot 25 sizes a 2560x1440 depth-stencil texture in DXGI format 118, which the PC enum does not have, and the title asserts on the refused size. The console SDK extends DXGI_FORMAT; DirectXTex (MIT) names 118 XBOX_DXGI_FORMAT_D16_UNORM_S8_UINT, 119 R16_UNORM_X8_TYPELESS (its depth plane) and 120 X16_TYPELESS_G8_UINT (its stencil plane). Stand-in: pc_format() maps them to D24_UNORM_S8_UINT, R24_UNORM_X8_TYPELESS and X24_TYPELESS_G8_UINT (more depth precision and a larger size than the console's, never less). pc_resource_desc applies it (slots 25, 56 and 108), and slots 76 and 127 translate the description and their clear value. Slot 127 also drops unordered access from a depth-stencil texture now, as slot 25 and 76 do since ItsNotRexed#7679. Views in 119/120 are not translated yet (no call measured). xs_proxy_mock_test: check_xbox_depth_formats; the slot 127 check compares the clear value's contents now that the proxy passes a translated copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… do, and logs its first failure Slot 133 (CreatePlacedResourceX) kept unordered access on a depth-stencil texture and passed the Xbox-only depth-stencil formats through, where slots 25, 76 and 127 now apply ItsNotRexed#7679's rule and pc_format(). It does the same now. Its failures were silent: on the retail boot a 25 MB UAV buffer failed with E_OUTOFMEMORY and the next stop was a null texture. The first failure is now logged with the description's shape (here the layer's GPU address arena was full at its 256 MiB default). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
checked: #7679 | with: merge of PR head onto main, then
AI-assisted. |
|
checked: #7679 at Built |
|
checked: #76797c1dc14 | with: new slot-76 WARP fixture at ff45b72 | on: Windows 11 25H2 x64 build 26200.9457, MSVC 19.44.35230 / SDK 10.0.26100.0 | result: 8/8 focused tests pass, 0 skips; slot-76-only negative control fails exactly the new DS+UAV creation case. I filled the creation-path gap identified in fever308's review, and offered the one-file test addition directly to your existing branch: NiiRoZz#1. It is test-only; the stand-in remains your implementation. Coordination claim, A38 taking. Depends on: #7679 and #7110. The hand-written fixture calls the actual slot-76 proxy with an 8x8 depth texture, an 8x8 color texture and a buffer. It verifies DS+UAV creation drops only UAV, preserves DENY_SHADER_RESOURCE, keeps DS-only/color RT+UAV/buffer UAV controls, retains geometry and format, and does not mutate the caller's description. WARP directly refuses the uncleaned DS+UAV description. Removing only the slot-76 helper call, while leaving slot-25 cleaning intact, produces exactly one assertion failure; restoring it makes the entire focused suite pass again. Commands (CMake 4.4.5, Ninja 1.13.2, Python 3.12.5): Forge comparison: base d114931 plus the identical fixture:
No hardware GPU/driver exercised, no game files or shader execution; WARP and hand-written synthetic descriptors only. Diff review and no-game-data scans passed. AI-assisted (Codex). |
|
Retail check on i9-13900K + RTX 4090 (driver 617.42), own 1.0.2.1 copy,
AI-assisted (Claude Code). |
|
Follow-up on the missing writable depth plane. I tested a narrow implementation for single-sample, single-mip R16_TYPELESS arrays at Xbox device slot 133 on Windows 11 / RTX 3090. It uses D16 for depth and a second 16-bit image for unordered access, with bit-preserving layer copies across the relevant layout transitions. The synthetic fixture goes through the Xbox proxy, clears two layers through R16_UINT UAVs, reads both through depth, changes one through a DSV, and copies it back through storage using an enhanced barrier. All 2,048 texels matched, including the untouched layer. This covers UAV clears and both transfer directions. Compute-shader writes and cross-queue handoff still need independent coverage. An offline title run passed the previous unordered-access creation stop. Its sampled output was still black. Patch, test target, integration order and limitations. Prepared with OpenAI Codex. |
|
The narrow PC-form follow-up is available as NiiRoZz/Leonida#2, directly on this PR's I also compared the complete #7679 plus that follow-up against my previous reviewed EXE stack on Windows x64, MSVC 19.44, SDK 26100, RTX 4080. Complete source and ancestry: before
This comparison includes the owner's full DS+UAV change and the coverage follow-up together; it does not isolate the PC-form addition as the cause of the removed breakpoint. The two inspected allocation calls use the console return-buffer-first form. The integration also passed 17 CPU/User32 cases and the presentation GPU fixture with validation enabled and zero VUID errors. Protected game inputs remained unchanged. No game data or raw traces are included. |
|
Native Windows/Vulkan comparison for the overlapping sizing change on the forge. Tested forge main
Synthetic resources only. AI-assisted. |
|
I tested the rule of this PR on a local boot build of the retail 1.0.2.1 title. It's a hand port of the flag drop only: slots 25 and 76, and slot 133's committed stand-in.
AI-assisted (Claude Code). Windows 11, RTX 5070, driver 621.24. |
|
checked: #7679 (head includes #7110) | with: applied the diff on main 6312c05, built xs_proxy_mock_test and device_proxy_test (MSVC 14.44, Ninja RelWithDebInfo) | on: Windows 11, RX 9060 XT | result: PASS — xs_proxy_mock_test PASS (9 allocations refused on purpose), device_proxy_test OK (0 failures) Code read: pc_resource_desc drops ALLOW_UNORDERED_ACCESS from a depth-format texture that also has ALLOW_DEPTH_STENCIL, so slot 25's size answer agrees with what slot 76's creation will accept; without_depth_stencil_uav applies the same rule at creation and logs once at slot 25 when the bit is dropped. The doc updates match. The stand-in limitation (no real UAV storage on the depth plane) is stated honestly in the body. AI-assisted check. |
|
Measured: the cleaner in this PR (a9c5960) also strips On forge main Suggestion: drop the agent: yes |
Depends on: #7110 (this branch is #7110 plus one commit;
d3d12_xs_desc_clean.hcomes from it).What was wrong
The console lets a texture allow depth-stencil and unordered access together. Measured locally at a title's call sites: device slot 25 (
GetResourceAllocationInfo) is asked about a 2560x1440 2DR32G8X24_TYPELESStexture withALLOW_DEPTH_STENCIL | ALLOW_UNORDERED_ACCESS. The PC runtime refuses that flag pair, and so does the Vulkan layer, which follows the PC runtime (resource_refusal, "resource flag combination"). So slot 25 answeredUINT64_MAX, and the title stopped on its check that the size fits in 32 bits.The change (a stand-in)
ALLOW_UNORDERED_ACCESSfrom a depth-format texture withALLOW_DEPTH_STENCILinpc_resource_descitself, so slot 25's console-form descriptions get the rule there. This branch is merged with that head.d3d12_xs_desc_clean.h:without_depth_stencil_uavdropsALLOW_UNORDERED_ACCESSfrom a texture that hasALLOW_DEPTH_STENCIL. Slot 76 (CreateCommittedResource) uses it, so creation agrees with slot 25's size. Its other flag bits go on as before.What this does not do: the texture has no unordered access on the PC side, so a UAV view of it writes no descriptor (the layer refuses a UAV of a texture without the flag, and logs it). Shader writes through such a view go nowhere. A real route would need the Vulkan layer to keep a storage-capable copy of the depth plane (no Vulkan depth format has storage support) and copy between the two. I'm posting that as an open item on the coordination issue.
Other creation slots in open PRs clean their flags themselves: slot 127 (#7052), slot 133 (#7075) and slot 108 (#7201). They need the same rule (
without_depth_stencil_uav) once they're merged together with this.Test
device_proxy_test(over WARP), next to the slot 25 C-ABI checks:GetResourceAllocationInforefuses the PC form of the description (UINT64_MAX);pc_resource_desc(d3d12_xs: device slot 25 cleans the Xbox layout word and flag bits on a copy before the PC GetResourceAllocationInfo (retail boot chain stop 16) #7110's) drops the UAV bit from the depth-stencil texture, and keeps it on a buffer and on a render-target texture;UINT64_MAX, at least WARP's size for the depth-stencil-only texture, upper 32 bits zero.With the drop taken out, the two new checks fail (2 failures). With it in:
device_proxy_test: OK (0 failures).On a local integration branch (main plus open boot-path PRs), the retail boot goes from 2,432 D3D12 calls (stopped at this assert) to more than 51,000, and was still creating pipeline states when the timeout hit.
Tested on Windows 11, RTX 5090, MSVC 2022, Vulkan SDK 1.4.363.0.
🤖 Generated with Claude Code