GTA VI mesh shaders: the root signature is inside FSSM (no RTS0 needed), format + validation #54
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from omonkeyz/xbox-emulator. Originally posted by bymsec on 2026-11-21T21:36:15Z.
Your notes say the 8,765 GTA VI mesh programs stop at the first resource load because there is no RTS0 chunk, so the user-SGPR resources (s16+) cannot be bound. We hit the same wall in a separate GTA VI tooling project and found that the root-signature layout is embedded in the FSSM blob itself. Sharing it in case it unblocks you.
All offsets are in the FSSM blob (the zlib stream inside XDAT/XBCH, starting with "FSSM"), measured on the Xbox Series 1.0.2.1 build.
Header fields
0xD6(u8): user SGPR count. It is fixed per root signature, not per shader; even a resource-free PS has 17.0xF8(u32): number of root-signature entriesn.0xF0: points 4 bytes into the LAST entry, so the first entry starts at[0xF0] - 4 - 20*(n-1).0xE8=0xDEADBEEFwhen there is no table.0xD4bit 5: wave32 (1) / wave64 (0).Entry = 5 dwords:
kind, offset (in dwords), count, register, loc, withloc = (rootParam << 8) | userSgpr.countdwords)[lo, hi | 0x10000, 0xFFFFFFFF, 0x11014FAC]table + offset*4Bindless images are read as
heap[index << 5](32-byte stride).Merged/NGG stages (mesh, geometry, some VS): user data starts at s8; s0–s7 are system. So "s16 and up" in a mesh shader is root parameter data at user SGPR index 8+.
Validation
End-to-end check
Happy to share code or answer questions. In return: if anyone finds anything about the BCPack bitstream (TTPF pool chunk codec 1–7 = BC1–BC7, 8 = zlib), we would love to hear it.
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-22T13:35:46Z.
Thanks for sharing this! Title-specific formats like GTA VI's FSSM layout are out of scope for this repo, so I'm closing this.