Retail game: XGTextureAddressComputer subresource layout, DSV format … #169
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!169
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/169/head"
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?
@sandhani01 on GitHub · 2026-11-23 18:38 UTC · original
sandhani01:fix/gta6-startup-fixes→main· +173 −7 · 4 files · 1 commits · closed without merging…118 remap
hle/xg.rs: implement XGTextureAddressComputer::#10 and #11 (GetSubresourceLayout and GetSubresourceOffsetBytes) to resolve the null-write crash at +0x2215c35.
hle/d3d12x/real.rs: remap console DSV format 118 (D16_UNORM_S8_UINT) to format 45 (D24_UNORM_S8_UINT) with format 20 fallback, fixing 620 rejected PSOs.
hle/d3d12x/real.rs: disambiguate mesh pipeline stream AS/MS subobject fallback.
HANDOFF.md: document first-run analysis and fixes.
.github/workflows/ci.yml: add GitHub Actions CI workflow for Windows.
@TheFrenchPepeAI on GitHub · 2026-11-23 19:25 UTC · original
Tested on a third machine: #169 does clear the null-write.
RTX 4090, Windows 10 22H2 (19045), driver 32.0.16.2114, main@956a476 + #169,
device_type = anaconda,title_memory = auto. The run presents its first frame, then dies at a different, later stop:It happens while pixel-shader pipelines are being set up (the log's last lines are
[SHADER] ps …), with anxcl-dstoragethread parked. Without #169 the same build dies earlier at+0x2215c35(write at 0), so #169 moves the frontier on NVIDIA too.device_type = "lockhart"withtitle_memory = "8192"dies before any present, at the old+0x2215c35;anaconda+ auto is the working pair here.Also:
xcl shaders <shaders.rpf> --precompile --pipelinesworks as documented (26 503 programs, ~10/s on 31 threads).@TheFrenchPepeAI on GitHub · 2026-11-23 19:35 UTC · original
Isolation follow-up on the same machine (RTX 4090, Windows 10 22H2):
0x80000003atgame_scarlett_master.exe+0x344196, while[SHADER] ps …lines are streaming (pixel pipelines being built),xcl-dstoragethread parked.vcruntime140.dll+0x1989(write at 0x0,rdx = 0, a game vtable inrbx) immediately afterD3D12.X: video-memory arena for title addresses 0x19844000000..0x1984c000000. It looks like a virtual call on a null object reached through the new arena path.Both runs present one frame first. Every build here is
anaconda+title_memory = auto;lockhart+"8192"dies before any present at the old+0x2215c35.@Kalmarv on GitHub · 2026-11-23 20:40 UTC · original
A note on this PR's
xg.rspart, from a CPU-only probe at4283131(synthetic textures, no console library). The full comparison with #192 and #195 is at https://github.com/ivall/xcl/pull/192#issuecomment-7113394778.Slots 10 and 11 are answered as
GetSubresourceLayout/GetSubresourceOffsetBytes, and the code picks a form by checking which arguments look like pointers. Called withGetResourceTiling's real arguments, legal calls go wrong, because the first four outputs are[out, optional]:(NULL, NULL, &shape, &count, 0, tilings): returns S_OK, but writes a 0x70-byteXG_SUBRESOURCE_LAYOUTinto the 12-byteD3D12_TILE_SHAPE, 100 bytes past it.GetDescriptor(0, 32-byte buffer): writes 0x70 bytes, 80 past the buffer, and returns S_OK.TheFrenchPepeAI's runs show that this PR gets past the null write at
+0x2215c35. The probe can't tell which answer did that. If #192 on its own also gets past it, this PR's slots 10 and 11 could be dropped in favour of #192. The DSV-118 and mesh parts aren't affected. Could someone with the title try #192 alone?AI-assisted (Claude Code).
@ivall on GitHub · 2026-11-23 20:52 UTC · original
Closing: this is covered on main now. XG computer #10 is GetResourceTiling, checked against the console library (
resource_tiling_matches_the_console_library, 8 960 cases, none differ). The D16S8 family (118-120) has the console's layouts and PC formats, and mesh streams with the MS in the AS slot are handled (38b05b7). The argument mismatch your probe found is what led there. Thanks!@TheFrenchPepeAI on GitHub · 2026-11-23 21:27 UTC · original
One more isolation result, same machine: main moved under #169. After
af20b4b,xg.rsalready carriesget_resource_tilingin the vtable and the merge conflicts in that slot list.With that conflict resolved either way — subresource slots after tiling (#10 tiling, #11/#12 subresource) or before it (#10/#11 subresource, #12 tiling) — the run is back to
0xc0000005write at 0x0 at+0x2215c35and never presents. On956a476(noget_resource_tilingin that table) the same #169 build presents a frame and stops later at+0x344196.So on this machine the #169 fix does not survive the new vtable entry; whoever owns the slot numbering should reconcile it. Back on
956a476 + #169here, which is the only build that presents.Pull request closed