Skip to content

docs/design.md: exp mrtz carries Z only when x is on and not compr - #3849

Open
HQasper wants to merge 1 commit into
ItsNotRexed:mainfrom
HQasper:docs/mrtz-depth-rule
Open

HQasper wants to merge 1 commit into
ItsNotRexed:mainfrom
HQasper:docs/mrtz-depth-rule

Conversation

@HQasper

@HQasper HQasper commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Found while checking what the PROC-106 dedupe in #2063 kept (finding #3796 (comment)).

docs/design.md's Inputs and outputs row says exp mrtz x → FragDepth with no qualifier. It had one until 51d954a2 ("Merge pull request #436") replaced the row 31 s before #2063 merged, so #2063's dedupe and the re-dedupe after it (15f5b2fb) could not carry it.

This restates the rule in one sentence: depth only when x is on in an uncompressed export; the 16-bit compr form holds stencil and sample mask and never Z; and an export without Z must not declare DepthReplacing. That is exactly what tests/test_translate.py:205 (test_mrtz_depth_only_from_an_enabled_x) enforces for Z, Z+stencil, stencil-only, sample-mask-only and the compr form.

Docs only: one line of docs/design.md. No game data, no code, no GPU.

Depends on: #1482 — its docs/design.md hunk touches the same Inputs and outputs row (and models stencil and sample mask on top), so whichever lands second has to rebase that row; expect a conflict there.

Tests, all run on this branch: tests/test_docs_design_rows.py (2 tests), tests/test_docs_links.py (6), tests/test_docs_list_items.py (2), tests/test_docs_repo_paths.py (2), tests/test_i18n_index.py (5) — all OK; compileall docs exit 0.

AI-assisted.

The Inputs and outputs row lost the qualifier when ItsNotRexed#436 merged
(51d954a), 31 s before ItsNotRexed#2063 landed. Restate the rule the translator and
tests/test_translate.py::test_mrtz_depth_only_from_an_enabled_x enforce,
including that an export without Z must not declare DepthReplacing.

AI-assisted
@shdann

shdann commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Read 673523c against the code and checked the behaviour (documentation-only change; Windows, CPython 3.14.7, no GPU): the sentence matches.

  • tools/rdna2spirv.py:11606-11614 returns without a depth export when the export has compr or x is off.
  • Translating hand-written pixel shaders: exp mrtz v1, off, off, off and exp mrtz v1, v2, off, off declare BuiltIn FragDepth, store it and declare DepthReplacing; exp mrtz off, v2, off, off, exp mrtz off, off, v3, off and both compr forms declare neither.
  • tests/test_docs_design_rows.py, test_docs_links.py: OK.

No contradiction found. AI-assisted.

@sds-228 sds-228 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review of 673523c: no issues found. The single table-row edit matches the contract table and the referenced test behaviour, with no formatting damage.

AI-assisted (OpenCode).

@memorypressure

Copy link
Copy Markdown

Reviewed on Linux: docs-only; the added mrtz/compr wording fits the row's style and does not contradict neighboring rows, and the depth/statement "must not declare DepthReplacing" is consistent with the exp-pos path documented above. The Mesa emit_ps_mrtz claim stands on the cited source. AI-assisted: yes.

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.

4 participants