[PR #1018] docs(d3d12_vulkan): the title already supports the linear tile path (XG-SWIZZLE-LINEAR-PATH) #1056

Open
opened 2026-11-26 20:19:56 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1018
Author: @robot00f
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: docs/agent5


📝 Commits (1)

  • cad4cee docs(d3d12_vulkan): the title already supports the linear tile path

📊 Changes

1 file changed (+43 additions, -0 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+43 -0)

📄 Description

Item: XG-SWIZZLE-LINEAR-PATH (claimed in #14).

What

Adds a short, anchored note to docs/d3d12_vulkan.md (end of section 4.2, before 4.3) recording that the title already has a linear tile path, measured statically from the shipped executable:

  • XGSuggestSwizzleMode is the xg_xs.dll IAT thunk at 0x145F3FF50. Its two call sites (0x140C4B030 at 0x140C4B3CE, 0x144ECC940 at 0x144ECCCA2) load the description's tile-class byte [desc+8], compare it with 0xFF, and only then call with RDX = 0 and R8 = desc+0x2C, i.e. XGSuggestSwizzleMode(desc, NULL, &desc->tileMode).
  • Both helpers zero the block at +0x28 first, so the mode field is 0 unless a class is known; known classes write 0x100 | class (with 0x102/0x10A special cases) and never 0.
  • The four consumers branch on CMP x,0x100 / BT x,9 and take the linear arithmetic on 0: 0x14555E9E0 (0x14555EA2C → 0x14555EA45), 0x14193DE10 (0x14193DE73 → 0x14193DE9E, which calls 0x1416F7100 at 0x14193DF4B), 0x1404F4210 (0x1404F448A → 0x1404F44E4), and 0x145121690's non-0x980 path.
  • Notes the shim consequence (write 0, return S_OK; the computer can be an identity that passes offsets through and reports the linear row span), the 0x145121980 cache key, and what remains unmeasured (whether 0x102/0x10A are meant to be tiled).

Why

The current xg_xs shim returns E_NOTIMPL and models no layout, so two XGCreateTextureComputer callers fail cleanly and textures are never laid out. The title's own linear path means a shim does not need a tiled layout at all to make progress: returning 0 is a mode the game already understands, and the texture computer only has to be an identity.

Tested

  • python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md → exit 0.
  • python -m compileall -q make_game.py tools tests → exit 0.
  • Decompilation/disassembly read from a local Ghidra project of the retail executable; nothing executed.

GPUs tested: n/a

AI-assisted: yes (OpenCode)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1018 **Author:** [@robot00f](https://github.com/robot00f) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/agent5` --- ### 📝 Commits (1) - [`cad4cee`](https://github.com/ubiquitarianism/leonida/commit/cad4ceecfabde9cc219a63373677ab1c8df0d277) docs(d3d12_vulkan): the title already supports the linear tile path ### 📊 Changes **1 file changed** (+43 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+43 -0) </details> ### 📄 Description Item: **XG-SWIZZLE-LINEAR-PATH** (claimed in #14). ## What Adds a short, anchored note to `docs/d3d12_vulkan.md` (end of section 4.2, before 4.3) recording that the title already has a linear tile path, measured statically from the shipped executable: - `XGSuggestSwizzleMode` is the `xg_xs.dll` IAT thunk at `0x145F3FF50`. Its two call sites (`0x140C4B030` at `0x140C4B3CE`, `0x144ECC940` at `0x144ECCCA2`) load the description's tile-class byte `[desc+8]`, compare it with `0xFF`, and only then call with `RDX = 0` and `R8 = desc+0x2C`, i.e. `XGSuggestSwizzleMode(desc, NULL, &desc->tileMode)`. - Both helpers zero the block at `+0x28` first, so the mode field is 0 unless a class is known; known classes write `0x100 | class` (with `0x102`/`0x10A` special cases) and never 0. - The four consumers branch on `CMP x,0x100` / `BT x,9` and take the linear arithmetic on 0: `0x14555E9E0` (`0x14555EA2C` → `0x14555EA45`), `0x14193DE10` (`0x14193DE73` → `0x14193DE9E`, which calls `0x1416F7100` at `0x14193DF4B`), `0x1404F4210` (`0x1404F448A` → `0x1404F44E4`), and `0x145121690`'s non-`0x980` path. - Notes the shim consequence (write 0, return `S_OK`; the computer can be an identity that passes offsets through and reports the linear row span), the `0x145121980` cache key, and what remains unmeasured (whether `0x102`/`0x10A` are meant to be tiled). ## Why The current `xg_xs` shim returns `E_NOTIMPL` and models no layout, so two `XGCreateTextureComputer` callers fail cleanly and textures are never laid out. The title's own linear path means a shim does not need a tiled layout at all to make progress: returning 0 is a mode the game already understands, and the texture computer only has to be an identity. ## Tested - `python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md` → exit 0. - `python -m compileall -q make_game.py tools tests` → exit 0. - Decompilation/disassembly read from a local Ghidra project of the retail executable; nothing executed. GPUs tested: n/a AI-assisted: yes (OpenCode) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1056
No description provided.