Repository navigation
docs: design.md v_fma_mix* rows match the SHADER-135 measurements (PROC-96) - #1838
Conversation
…OC-96)
- "f16 inline constants": the translator matches the hardware on the
float constants and on the integer constants as f16 halves, not on
`1`/`64` as f32 operands (f32 denormals gfx1036 flushes and the
translator keeps; difference 4 in docs/shader_validation.md).
- "Known approximations": nearest-mode v_fma_mix{lo,hi}_f16 rounding is
no longer unmeasured: gfx1036 rounds once on all seven probe ties,
the translator still rounds twice (one f16 ulp off on those ties).
Docs only; no game files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed on The new caveat in the "f16 inline constants" row is right. One wording suggestion: difference 4 names three such operands — The "Known approximations" rewrite also checks out. The same section's " Docs only (+2/-2, one file), no translator rule touched, so no fixture or contract-table entry is due here. This PR does not touch the duplicated rows at |
PROC-96 (found by @PedroNunes11 in #1745). Docs only: two rows of the contract table in
docs/design.mdcontradicteddocs/shader_validation.mdafter #1722.Line 251, "f16 inline constants". The row said the translator gives the same words as the hardware for
v_fma_mix*constants, with integer constants included.docs/shader_validation.md("f16 output modifiers, clamp andv_fma_mix*operands on RDNA2") limits that agreement to the float constants and to the integer constants as f16 halves. Its difference 4 says the opposite for1and64as f32 operands: they are f32 denormals, which gfx1036 flushes to a zero of their sign withdenorm_mode_32 = 0, while the translator keeps them. The row now gives that scope and cites difference 4.Line 368, "Known approximations". The row said nearest-mode
v_fma_mix*rounding was "unmeasured". #1722 measured it: on gfx1036,tools/fma_mix_probe.py --oracle hwgave the single-rounded word for all 7 ties. The sentence now says the hardware rounds once, the translator still rounds twice, and the translator is one f16 ulp off on exactly those ties. It points to the section indocs/shader_validation.mdand to SHADER-296 for the fix.Depends on: #1774. The two PRs overlap only on that one sentence of line 368, and either merge order works. #1774 (SHADER-296, @shadshuvo) makes the translator round once and deletes the sentence. If it lands first, the line-368 hunk here goes away and the line-251 fix stays. If this lands first, #1774's rebase drops the rewritten sentence.
No translator, test or tool changes. No game files and no GPU needed.
Tested (Windows 11, Python 3.12):
python -m compileall -q make_game.py tools tests: OKpython -I tests/test_docs_links.py: 5 tests OKpython -I tests/test_fma_mix_probe.py: 18 tests OKdocs/shader_validation.mdonmainat003e7812.AI-assisted (Claude Code).
🤖 Generated with Claude Code