diff options
| author | oscarlosu-lab <251827664+oscarlosu-lab@users.noreply.github.com> | 2026-11-24 06:32:30 +0100 |
|---|---|---|
| committer | oscarlosu-lab <251827664+oscarlosu-lab@users.noreply.github.com> | 2026-11-24 06:32:30 +0100 |
| commit | 77f44fbe3bd477727a1f5ab6d20c6dd5f40e25e8 (patch) | |
| tree | a258fbd50f4d19309e8b4aab865721b0fe2437a7 /runtime/src/tls_host.cpp | |
| parent | 8f481cf16f261c7f37458aeb45e8f4e19994146d (diff) | |
xg_xs: lay out console textures and serve the texture computer (RT-XG-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>
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions