Repository navigation
Conversation
…nslate CPU handles
…ttedResource3 with Xbox descriptors, RT-5 stop 15) Slot 127 is past the PC device vtable and was refused with E_NOTIMPL. It has the argument list of ID3D12Device10::CreateCommittedResource3; the proxy now calls the PC device's with the Xbox layout word and flag bits cleaned as slot 76 does. Measured in ItsNotRexed#6982.
…nment, refuses null heap properties; tests pin heap flags, session and reference counts Review of ItsNotRexed#7052: dispatch and release through the ID3D12Device10 interface pointer (not the base device's vtable); keep every PC-valid resource flag bit, 0x400 included; null heap properties return E_POINTER; the test now passes non-zero heap flags and a protected session, checks the single release returns 0 for texture and buffer, and covers a distinct Device10 pointer.
…allocation hooks for descriptor heaps)
…le's XMem hook (retail boot chain stop 17) The console D3D runtime allocates a committed resource's memory with XMemAlloc, so a title's __XMemAllocationHooks__ see it. Around its first full-screen render targets the title installs a hook that bump-allocates allocations with page-size field 2 from a fixed arena and then asserts that little of the arena is left unused; with no call reaching the hook, nothing is counted and the assert fires. After the PC device creates the resource, slot 127 calls the installed hook (the one ItsNotRexed#7021 bridges for descriptor heaps) with the PC allocation size and the D3D allocator ID, page-size field 2, and attaches the memory to the resource as private data, so it goes back through the hook's free when the resource dies. The PC resource is not backed by it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Retail Linux integration result on RX 9070 XT / Mesa RADV 26.3.1 / Wine 11.22. With #7052, #7078 and #7110, both 3840×2160 RGBA8 render targets were created. The host and tiled sizes agreed at 33,423,360 bytes per target. The last three traced calls created the SRV, RTV and UAV for the second target. The title then stopped. With this PR’s slot 127 hook and #5680’s catalogue loader added, the same title reached Xbox slot 62 (CreateComputePipelineState) and loaded 26,584 translated shader entries from my local work folder. After that the trace shows four more committed resources, command lists, a descriptor heap and two more SRVs. It still ends during System Init, frame 0. The integration also contains #7075’s independent resource and #7066’s null view, so this measures startup progression only. A separate synthetic test on Wine / lavapipe created two render targets. Each allocation hook was called once for 65,536 bytes, and the matching free ran on the last Release of each resource. No game data or shader artifacts are attached. |
|
@NiiRoZz measured on the AMD Windows driver: RX 6900 XT (gfx1030), AMD 26.11.2, Windows 11, MSVC,
Suggestion: hand the hook the console tile size for render targets, not the PC size. AI-assisted (Claude Code). |
|
Independent native Windows 11 / MSVC 19.44.35230.0 / AMD Radeon RX 6700 XT (
AI-assisted (Gemini, Antigravity). |
|
Tested Base: main
On this GPU slot 25 already answers with the tile size, so the lease is 33,423,360 B per target, as @controldebils expected for NVIDIA and RADV. The AMD overrun does not show here. Exit codes, module offsets and slot numbers only. AI-assisted (Claude Code). |
|
A note from reviewing #7240, which leases the same slot-127 render targets: at On AMD's Windows driver that size is larger than the console's. @controldebils measured 33,619,968 B (513 × 64 KiB) for a 3840 × 2160 I read the code; I haven't run this PR on AMD hardware. AI-assisted. No game files. |
|
Tested Retail Xbox Series 1.0.2.1 package + executable (sizes match
Outcomes only; no game data. |
Claimed in #7231 (comment)
Depends on: #7021 (the
__XMemAllocationHooks__bridge) and #7052 (device slot 127). This branch is #7021's head with #7052 merged in; only the last commit,f5dae9ff2, is this PR. #7021 currently conflicts with main, so the diff against main also shows both of them until they land.What
After the PC device creates a committed resource for Xbox device slot 127, the proxy calls the title's installed XMem allocation hook for that resource's allocation size (from the PC
GetResourceAllocationInfo). It passes the D3D allocator ID and page-size field 2 (kXmemCommittedResourceAttributes). The memory is attached to the resource withSetPrivateDataInterface, so it goes back through the hook's free when the resource dies. The PC resource is not backed by that memory; it only keeps the title's accounting the same as on the console. With no hook installed, if the hook refuses, or if the PC call fails, slot 127 behaves as before.Why
Stop 17 of the retail boot chain (#6982): a fatal assert right after the title's first full-screen render targets. Measured locally at the title's call sites, it isn't a size check against our answers:
XMemAlloc, so the hook sees the targets. Through our proxy nothing reaches it: the arena stays untouched and the assert fires, whatever sizes slot 25 answers.R8G8B8A8_UNORMrender targets with UAV. On this machine, the PC answers 33,423,360 B for each, already whole 64 KiB tiles, so d3d12_xs: GetResourceAllocationInfo answers console tile sizes for 2D render targets (slot 25 return-buffer form; sizes #7240 leases at stop 17) #7078's padding doesn't change them. With this change both reach the hook and the check passes.Limits: the object type of a resource allocation is not measured, so it is 0. Only slot 127 does this; the other committed-resource paths (slots 27, 53, 76) can follow once a title is seen counting them.
Tested
Windows 11, MSVC 2022 (14.44, RelWithDebInfo, Ninja), RTX 5090:
xs_proxy_mock_test: PASS. The new check calls slot 127 with a hook installed and checks the following: one allocation of the PC size with the committed-resource attributes; the memory held while the resource lives and freed once, with the same attributes, on the lastRelease; a refusing hook (resource created, nothing freed); a PC failure (hook not asked); and no hook (unchanged).device_proxy_test: OK (0 failures).python -I scripts/check_no_game_data.py: OK.LEONIDA_D3D12=vulkan, locally merged with the boot-path PRs, including d3d12_xs: honour __XMemAllocationHooks__ for descriptor heaps and translate CPU handles #7021, d3d12_xs: Xbox device slot 70 is handled by the proxy (a null SRV for now, its raw words logged), not the PC CreatePlacedResource1 (retail boot chain stop 14) #7066, d3d12_xs: Xbox device slot 127 creates a committed resource through the PC CreateCommittedResource3 (retail boot chain stop 15) #7052, 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 and d3d12_xs: GetResourceAllocationInfo answers console tile sizes for 2D render targets (slot 25 return-buffer form; sizes #7240 leases at stop 17) #7078): before, the stop 17 assert at 1,640 D3D12 calls. After, the hook allocates both targets and the boot goes on to the first root signature and compute pipeline.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code