mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #971] [CLOSED] d3d12_xs: GetResourceAllocationInfo answers streamed textures with their console size (RT-ALLOC-INFO-CONSOLE) #1008
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1008
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/971
Author: @DadaCap
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:alloc-info-console📝 Commits (4)
77f44fbxg_xs: lay out console textures and serve the texture computer (RT-XG-TEXTURE-COMPUTER)a84d387Merge commit 'refs/boot/pr461n' into alloc-info-console9f89522d3d12_xs: GetResourceAllocationInfo answers streamed textures with their console size (RT-ALLOC-INFO-CONSOLE)c7c882aMerge main into alloc-info-console: streamed-texture sizes for console-form calls, as main's render-target sizes📊 Changes
7 files changed (+1527 additions, -93 deletions)
View changed files
📝
docs/runtime_imports.md(+13 -7)➕
runtime/shims/console_texture_size.h(+13 -0)📝
runtime/shims/d3d12_xs_device.cpp(+31 -0)📝
runtime/shims/xg_xs.cpp(+464 -38)➕
runtime/src/console_texture_layout.h(+610 -0)📝
runtime/test/xg_xs_test.cpp(+356 -48)📝
runtime/test/xs_proxy_mock_test.cpp(+40 -0)📄 Description
Depends on: #461
Claim: RT-ALLOC-INFO-CONSOLE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136979744). 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 (https://github.com/ubiquitarianism/leonida/issues/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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.