Repository navigation
Conversation
… 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.
…applied ivall#192: XGTextureAddressComputer ivall#10 as GetResourceTiling, read from the console library's code - replaces the local version, which was not checked against it. ivall#191: recompiler wave32 src_vccz / src_execz and SDWA f16 inline constants. Their authors' work, applied as it is. 200 s run through the title's menus: no change in the picture, no regression. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
AI-assisted triage (Claude Code) of Tested heads, each one directly on
This builds on the #192-vs-#195 comparison in #195 (comment) (3D tile depth, 4 KiB modes, packed entries) and doesn't repeat it. The new parts are #169 against the other two, arrays, and how each one compares with the documented API. Method. One probe, compiled unchanged into all four trees. It builds a computer and calls vtable slot 10 with
Probe result: #169 against the other two. #169 doesn't implement With
All of the NULL outputs above are TheFrenchPepeAI's runs show #169 clearing the null write at #192 and #195 agree on every 2D 64 KiB case I tried:
That matches D3D12's standard 64 KiB 2D tile shapes. They differ only in the three places already reported. An array with packed levels (new). RGBA8 256×256×2, full chain, room 18:
So with #192 a caller that reads Against the documentation. The console's
#195 follows that on the packed entries and the count. #192 departs from it there, and says this follows the console library's code, read from its disassembly. I can't check that without the library, and #192 is the only one of the three with a stated console source. Neither PC D3D12 nor #192 has a 4 KiB "tile", and #195's 3D shape is wrong whatever the library does (see the earlier comment). My suggestion:
Not tested:
|
|
Closing: main has XG computer #10 as GetResourceTiling, checked against the console library itself ( |
…ole 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 #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.