upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRain156 <77776581+Rain156@users.noreply.github.com>2026-11-24 21:17:13 +0800
committerRain156 <77776581+Rain156@users.noreply.github.com>2026-11-24 21:17:13 +0800
commit65b8569bbce801f5d083fd5c91cd8bc13f825ece (patch)
tree5a08b0a63f618312284831c1c13133b452c0942d /docs
parentabed2e19382dab7e16fbefbd63959644150394b3 (diff)
parent77f44fbe3bd477727a1f5ab6d20c6dd5f40e25e8 (diff)
Integrate #461 for the Windows first-run UI
Diffstat (limited to 'docs')
-rw-r--r--docs/runtime_imports.md20
1 files changed, 13 insertions, 7 deletions
diff --git a/docs/runtime_imports.md b/docs/runtime_imports.md
index 7b9f62d5a..74be4533a 100644
--- a/docs/runtime_imports.md
+++ b/docs/runtime_imports.md
@@ -165,13 +165,19 @@ policy "other" (none is counted as returning an `HRESULT`), and they come from s
165 165
166The game executable imports two functions from `xg_xs.dll`, the console's texture layout library: 166The game executable imports two functions from `xg_xs.dll`, the console's texture layout library:
167`XGSuggestSwizzleMode` (2 call sites, in the helper that fills a texture description) and `XGCreateTextureComputer` 167`XGSuggestSwizzleMode` (2 call sites, in the helper that fills a texture description) and `XGCreateTextureComputer`
168(4 call sites, which use slots 1, 2, 8 and 10 of the returned object's vtable). The runtime has no model of the console 168(4 call sites, which use slots 1, 2, 8 and 10 of the returned object's vtable). `runtime/shims/xg_xs.cpp` answers them
169resource layout, so `runtime/shims/xg_xs.cpp` computes none: both return `E_NOTIMPL` and write no layout. Two of the 169from a model of the console's texture layouts, `runtime/src/console_texture_layout.h` (AMD addrlib's GFX10 rules for
170four `XGCreateTextureComputer` callers ignore the HRESULT and call through the object at once, so the shim still stores 170the linear, 256 B, 4 KiB and 64 KiB modes: block shapes, mip tails, the micro tile patterns, a separate stencil plane),
171a static object in the out pointer; its slot 1 (read as `Release`) does nothing, and every other slot up to 31 logs its 171ported with the computer's method table and layout structure from Marvisak/VIctory (GPL-3.0, `xg.rs` and `texture.rs`
172index and caller once and returns `E_NOTIMPL` without writing its arguments. The call shapes and the reasoning are at 172at `d2a4bae1f`). `XGSuggestSwizzleMode` writes `0x100 | mode` (linear for 1D, `64KB_Z_X` for depth, `64KB_R_X` for
173the top of the file; `xg_xs_test` covers them. Textures whose layout the game asks for are therefore not laid out yet. 173render targets, else `4KB_S`); the computer fills the layout (slot 2), gives an element's offset (slot 6), copies a
174The table above was measured before this shim and still lists these two as unimplemented; they are served now. 174subresource into (slot 8) and out of (slot 9) tiled memory, and reports the 64 KiB tiling (slot 10). Not modelled:
175compression metadata planes, and addressing or copies for the pipe/bank XOR modes and MSAA (`E_NOTIMPL`). A description
176it cannot lay out still gets a computer in the out pointer with `E_INVALIDARG`, because two of the four callers ignore
177the HRESULT and call through the object at once; that object answers every slot with `E_NOTIMPL` and writes nothing.
178`xg_xs_test` covers the model (hand-checked addresses, mip tails, a bijection and round trip over every element) and the
179shim's slots. The table above was measured before this shim and still lists these two as unimplemented; they are served
180now.
175 181
176Only two of these DLLs have a shim in the repository (`xmem.dll` and `d3d12_xs.dll`), and they are not complete: 182Only two of these DLLs have a shim in the repository (`xmem.dll` and `d3d12_xs.dll`), and they are not complete:
177they hold 8 of the 30 unimplemented imports. The other 22 are in five DLLs (`xg_xs.dll`, `XCRDAPI.dll`, `chad.dll`, 183they hold 8 of the 30 unimplemented imports. The other 22 are in five DLLs (`xg_xs.dll`, `XCRDAPI.dll`, `chad.dll`,