docs: plan EXEC removal and structurization #2923

Manually merged
github merged 1 commit from github-bot/gh-2923 into gh-pr/2923/base 2026-11-27 05:44:02 +00:00 AGit
Owner

@⁠lambirou on GitHub · 2026-11-26 20:34 UTC · original
lambirou:docs/exe-structurization → main · +223 −0 · 1 files · 1 commits · merged 2026-11-27 05:40 UTC

What changed

This adds docs/experiments/exe-structurization.md, a concrete design for replacing the translator's pattern-by-pattern EXEC handling with a structurization pass.

The note covers:

  • the measured refusal families and counts (3,007 .fail records; 762 src_scc; 526 v_readfirstlane; 331 s_branch inside s_cbranch_execz; 241 mesh skipped-block; 95 s_cbranch_scc0 inside s_cbranch_execz), and why accepting one shape at a time does not converge;
  • the proposed pipeline: decode, CFG/SSA, normalise EXEC/VCC/SCC, per-lane mask booleans (BDD or bitset), structurization without EXEC, path-sensitive guard proof, resource/address tracing, HLSL;
  • the invariants at each stage and the migration mapping to the C++ frontend;
  • five phases with a source-built fixture and negative controls for each;
  • risks (BDD blow-up, irreducible CFG, helper lanes, wave64, resource tracing) and non-goals;
  • a recommended first patch small enough for one PR.

This is a design note, not a translation or a claim that a scene renders.

Checks

python -B tests/docs_links_check.py

Passed: 546 links across the checked Markdown set. No runtime code is changed.

Refs #2125, #2413, #2023, #1723, #1143.

AI-assisted.

**@⁠lambirou** on GitHub · 2026-11-26 20:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2923) `lambirou:docs/exe-structurization` → `main` · +223 −0 · 1 files · 1 commits · merged 2026-11-27 05:40 UTC ## What changed This adds `docs/experiments/exe-structurization.md`, a concrete design for replacing the translator's pattern-by-pattern EXEC handling with a structurization pass. The note covers: - the measured refusal families and counts (3,007 `.fail` records; 762 `src_scc`; 526 `v_readfirstlane`; 331 `s_branch` inside `s_cbranch_execz`; 241 mesh skipped-block; 95 `s_cbranch_scc0` inside `s_cbranch_execz`), and why accepting one shape at a time does not converge; - the proposed pipeline: decode, CFG/SSA, normalise EXEC/VCC/SCC, per-lane mask booleans (BDD or bitset), structurization without EXEC, path-sensitive guard proof, resource/address tracing, HLSL; - the invariants at each stage and the migration mapping to the C++ frontend; - five phases with a source-built fixture and negative controls for each; - risks (BDD blow-up, irreducible CFG, helper lanes, wave64, resource tracing) and non-goals; - a recommended first patch small enough for one PR. This is a design note, not a translation or a claim that a scene renders. ## Checks ```powershell python -B tests/docs_links_check.py ``` Passed: 546 links across the checked Markdown set. No runtime code is changed. Refs #2125, #2413, #2023, #1723, #1143. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:29:08 +00:00
Author
Owner

@⁠KelboLive on GitHub · 2026-11-27 05:28 UTC · original · reviewed

PR #2923 by @⁠lambirou -- docs: plan EXEC removal and structurization

What works

  • Solid foundational work establishing the 0x100 linear layout in gfx10_layout.h with careful derivation from AMD addrlib
  • The linear_mode = 0 constant elegantly extends block_log2() to accept mode 0 without changing the tiled modes switch logic
  • supports() check is correct: mode == linear_mode bypasses the block_log2 >= 12 requirement since linear has no tail
  • Test infrastructure is excellent -- linear_order_control (expected failure with largest mip first), linear_addrlib (338K element addresses), and the unpadded negative control all add strong coverage
  • Documentation accurately restates addrlib's linear mode algorithm in clear, testable terms

Issues

  • supports() currently allows block-compressed formats (BC1-BC7) in linear mode via the fallthrough -- BC formats are block-based and don't have linear row semantics; consider gating them out explicitly like 1D does in #2929
  • The check script in startup_address_console_check.py builds linear backing bytes from addrlib equations. This is correct but the linear path could break if the hardcoded equations drift from addrlib; a comment linking to the Mesa commit that derives these equations would help

Recommendations

  • Good discipline in including the negative control (unpadded rows test) to verify the 256-byte pitch requirement
  • Consider adding a TODO or assert in supports() that blocks linear mode for BC formats until explicitly validated against addrlib

Overall

A well-researched, well-tested implementation. The linear layout extension is cleanly separated from tiled modes. Minor concern about BC format handling in linear mode, but the existing refusal behavior is safe. Ready for merge.

**@⁠KelboLive** on GitHub · 2026-11-27 05:28 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2923#pullrequestreview-6083868501) · **reviewed** PR #2923 by @⁠lambirou -- docs: plan EXEC removal and structurization ## What works - Solid foundational work establishing the 0x100 linear layout in gfx10_layout.h with careful derivation from AMD addrlib - The linear_mode = 0 constant elegantly extends block_log2() to accept mode 0 without changing the tiled modes switch logic - supports() check is correct: mode == linear_mode bypasses the block_log2 >= 12 requirement since linear has no tail - Test infrastructure is excellent -- linear_order_control (expected failure with largest mip first), linear_addrlib (338K element addresses), and the unpadded negative control all add strong coverage - Documentation accurately restates addrlib's linear mode algorithm in clear, testable terms ## Issues - supports() currently allows block-compressed formats (BC1-BC7) in linear mode via the fallthrough -- BC formats are block-based and don't have linear row semantics; consider gating them out explicitly like 1D does in #2929 - The check script in startup_address_console_check.py builds linear backing bytes from addrlib equations. This is correct but the linear path could break if the hardcoded equations drift from addrlib; a comment linking to the Mesa commit that derives these equations would help ## Recommendations - Good discipline in including the negative control (unpadded rows test) to verify the 256-byte pitch requirement - Consider adding a TODO or assert in supports() that blocks linear mode for BC formats until explicitly validated against addrlib ## Overall A well-researched, well-tested implementation. The linear layout extension is cleanly separated from tiled modes. Minor concern about BC format handling in linear mode, but the existing refusal behavior is safe. Ready for merge.
github-bot changed target branch from main to gh-pr/2923/base 2026-11-27 05:44:00 +00:00
github manually merged commit cf45665dfa into gh-pr/2923/base 2026-11-27 05:44:02 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-27 05:40 UTC · original · approved these changes

Reviewed cf45665dfac7d3aa87685f552de0c54bb5ed5705. The document clearly frames the EXEC/SSA pipeline as proposed work and gives a bounded, source-built first fixture with a negative control. The integrated documentation check passed (37 Markdown files and 552 links).

**@⁠R0Y00** on GitHub · 2026-11-27 05:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2923#pullrequestreview-6083939818) · **approved these changes** Reviewed `cf45665dfac7d3aa87685f552de0c54bb5ed5705`. The document clearly frames the EXEC/SSA pipeline as proposed work and gives a bounded, source-built first fixture with a negative control. The integrated documentation check passed (37 Markdown files and 552 links).
This discussion has been locked. Commenting is limited to contributors.
No description provided.