Skip to content

PROC-143: document the fixed-function state indices in SGD5 passes - #3071

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
jeremygold02:docs/sgd5-pass-state-indices
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
jeremygold02:docs/sgd5-pass-state-indices

Conversation

@jeremygold02

Copy link
Copy Markdown
Contributor

PROC-143. Coordination claim

Depends on: #2519 and #3036 for the effect and technique lookup that this measurement starts from.

The new note identifies which bytes of a stored SGD5 pass select the rasterizer, depth/stencil and blend rows. These affect culling, depth tests and blending when reconstructing the recorded draw state. The documentation index links to the note.

I tested every whole-byte candidate at offsets 6 through 23 against each effect's state table. Across 28,798 passes, bytes 6, 7 and 8, respectively, are the unique positions that always stay in bounds and exercise every available row in every multi-row effect with passes. The three tables have 64, 124 and 398 stored rows across the archive. The reproduction procedure also handles an empty table, where a stored zero has no row to read. Runtime defaults and overrides remain open.

AI-assisted. Measured on Windows against the local Xbox 1.0.2.1 package on CPU. An independent technique-table search agreed on the boundaries used in the count. python -I tests/test_docs_links.py -v passed all five tests. This PR contains an indexed Markdown note with aggregate measurements and the validation method.

Record the effect-local fixed-function table mapping and the full-corpus discriminator used for PROC-143.

Refs: ItsNotRexed#2519, ItsNotRexed#3036, ItsNotRexed#3047
@kotorvr

kotorvr commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Read b6f97b8 on Windows 11 (Python 3.13.7): pass for the layout statements checked against #3036 and #2519; the counts are not verified (needs the game)

A test merge into current main (f847748) is clean. docs/sgd5_render_states.md against the two open PRs it depends on (nothing on main describes SGD5 yet, so those are the only references):

AI-assisted check (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants