Repository navigation
Conversation
…-TEXTURE-COMPUTER) XGSuggestSwizzleMode and every texture-computer slot returned E_NOTIMPL, so the title's texture layout and copy calls did nothing. They now run on a model of the GFX10 texture layouts (runtime/src/console_texture_layout.h, AMD addrlib's rules for the linear, 256 B, 4 KiB and 64 KiB modes): the suggested mode, the layout structure (slot 2), element offsets (slot 6), copies into and out of a subresource (slots 8 and 9) and the 64 KiB tiling (slot 10). A description the model cannot lay out still gets a computer in *out (with E_INVALIDARG), as before, because two measured callers use *out without checking the HRESULT. Not modelled: compression metadata planes and the XOR and MSAA modes' addressing (E_NOTIMPL). The layout model, the computer's method table and the layout structure are ported from Marvisak/VIctory (GPL-3.0), crates/victory-formats/src/texture.rs and crates/victory-hle/src/modules/xg.rs at d2a4bae1f, credited in the files; the addrlib notice is kept. xg_xs_test now checks the model (hand-checked addresses, mip tails, a two-plane depth-stencil, a bijection and round trip over every element of ten layouts) and the shim's slots: 106 checks, MSVC /W4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eir console size (RT-ALLOC-INFO-CONSOLE) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Checked 9f89522 merged into current
One question, not a blocker: the console answer brings the console's alignment (4 KiB for the mode AI-assisted (Claude). |
|
@tiguan26 thank you for the check, and for cross-building it.
Measured on Windows 11, RTX 5080 (NVIDIA 621.24), with a local stack on top of main; counts only, no game data. AI-assisted (Claude Code). |
|
@DadaCap you're right, line 279 already checks it and I missed it (I only read the mock test's diff). Thanks also for the slot 70/71 and 133 counts: that settles the alignment question for the streaming path. |
tiguan26
left a comment
There was a problem hiding this comment.
Approving 9f89522 (the RT-ALLOC-INFO-CONSOLE commit; #461 underneath as the PR says). My checks are in the comment above: merged cleanly into main 4a50caf, cross-built with clang-cl 19 + xwin, xs_proxy_mock and xg_xs pass under Wine 11.22, and the multi-description layout reads right. My two points are answered: the initializer is checked at xg_xs_test.cpp:279, and the streamed textures go through slots 70/71/133 by address, not the PC-style CreatePlacedResource, so the console alignment never meets that check.
AI-assisted (Claude).
…e-form calls, as main's render-target sizes Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Merged current One conflict, in
On the merged head, Windows 11, VS 18 RelWithDebInfo: AI-assisted (Claude Code). |
|
Closing this one as well:
@tiguan26 thank you for the review; the points you raised went into the branch before this. AI-assisted (Claude Code). |
Depends on: #461
Claim: RT-ALLOC-INFO-CONSOLE (#14 (comment)). Only the last commit is this pull request; the rest is #461.
The retail title sizes its streamed textures with device slot 25,
GetResourceAllocationInfo, with layout 0, and computes offsets and lengths inside its texture archives from the answers. The runtime forwarded the call, so it answered with the PC GPU's sizes and the title asked DirectStorage for a part of a compressed chunk. It asserts on that: the int3 atgame_scarlett_master.exe+0x4ffd879(1.0.2.1) right after the start screen, also seen on an RTX 5070 (#14, DesertGamer).Two of the textures it asserted on: 128x4 R16G16B16A16_UNORM, answered 2 pages of 4 KiB where the archive's chunk is 4; 128x128 BC1 with 6 mips, answered 4 where the chunk is 3. #461's layout gives 4 and 3 in the 4 KiB mode
XGSuggestSwizzleModepicks for both.Slot 25 now answers from #461's layout when every description is a texture with a swizzle mode (
0x100 | mode) or layout 0, and not a render or depth target. Anything else keeps the PC answer for the whole list. It goes through a pointer, so the proxy does not link the xg_xs shim.Not covered: slot 108 (
GetResourceAllocationInfo2, #219), which needs the same two lines once it lands; arrays, 3D and targets are not measured on the title.Tested
xs_proxy_mock_test: exit 0 (new: one and two textures, the alignment between them, and five lists that keep the PC answer).xg_xs_test: 0 failures (new: the sizes above). Windows 11, MSVC.AI-assisted (Claude Code, Opus 5.5).
🤖 Generated with Claude Code