Repository navigation
Retail game: XGTextureAddressComputer subresource layout, DSV format … - #169
sandhani01 wants to merge 1 commit into
Conversation
…118 remap - hle/xg.rs: implement XGTextureAddressComputer::ivall#10 and ivall#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.
…offset (from ivall#169) The retail game called ivall#10 (a stub returning E_NOTIMPL) and then wrote to address 0 at +0x2215c35. ivall#10 / ivall#11 are GetSubresourceLayout / GetSubresourceOffsetBytes: the XG_SUBRESOURCE_LAYOUT of a subresource, or its byte offset. Only xg.rs of ivall#169 is taken: its DSV format 118 remap is covered more completely by ivall#163 (merged with ivall#170: resource descs, pipelines, depth buffers that are UAVs).
…offset (from ivall#169) A title called ivall#10 (a stub returning E_NOTIMPL) and then wrote to address 0. ivall#10 / ivall#11 are GetSubresourceLayout / GetSubresourceOffsetBytes: the XG_SUBRESOURCE_LAYOUT of a subresource, or its byte offset. Only xg.rs of ivall#169 is taken: its DSV format 118 remap is covered more completely by ivall#163 (merged with ivall#170: resource descs, pipelines, depth buffers that are UAVs).
|
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, It happens while pixel-shader pipelines are being set up (the log's last lines are
Also: |
|
Isolation follow-up on the same machine (RTX 4090, Windows 10 22H2):
Both runs present one frame first. Every build here is |
… console library's code) The library's vtable, disassembled: slot 10 takes ID3D12Device::GetResourceTiling's six arguments for the computer's resource – it reads *pNumSubresourceTilings, writes a D3D12_PACKED_MIP_INFO, a D3D12_TILE_SHAPE and D3D12_SUBRESOURCE_TILINGs indexed by D3D12 subresource skipping the packed levels. E_FAIL unless the swizzle mode is a 64 KiB one (8–11, 16–19, 24–27), E_NOTIMPL for 1D and 3D textures; the standard tile in elements goes by their size (256×256 for 1 byte … 64×64 for 16), reported in texels; a level's tiling is its padded size over the tile, its start tile the level's offset in 64 KiB tiles plus the slice's; the packed levels take one tile at the first one's offset. A title's texture streaming asks this for every texture it places in a tiled pool. The guess taken from ivall#169 (GetSubresourceLayout / Offset, sniffing which arguments are pointers) answered E_INVALIDARG by luck with the real arguments (the "plane" was the low half of a pointer) and would have written 0x70 bytes over a 12-byte tile shape otherwise. Slot 11 is GetDescriptor(plane, 32-byte hardware descriptor), not modelled: a stub again. Test: resource_tiling_of_a_64kb_texture.
|
A note on this PR's Slots 10 and 11 are answered as
TheFrenchPepeAI's runs show that this PR gets past the null write at AI-assisted (Claude Code). |
|
Read:
AI-assisted review (Gemini + Claude); code read only, not run. |
|
Closing: this is covered on main now. XG computer #10 is GetResourceTiling, checked against the console library ( |
|
One more isolation result, same machine: main moved under #169. After 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 So on this machine the #169 fix does not survive the new vtable entry; whoever owns the slot numbering should reconcile it. Back on |
…118 remap
hle/xg.rs: implement XGTextureAddressComputer::Olympus: harden GameSave read results #10 and Olympus: honor disabled process task queues #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.