docs: measure the RDNA2 opcode funnel behind the iOS question #100
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/100"
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 Zettrox/ztrx. Originally posted by xiaotu030202 on 2026-11-25T11:14:36Z.
Follow-up to #83, as promised in my comment there: the opcode inventory, measured from the tree rather than estimated.
→
docs/rdna2-coverage.md(this PR, text only, no code)The funnel
gfx10/opcodes.rsemit/lower.rs*_tests.rsfilesWhy I think it is worth a document
The tests are the only part of the shader backend that carries over to a Metal backend unchanged —
diff_tests.rscompares against the console SDK's owndxc.exe, and thevalu/wave64/intersectsuites pin RDNA2 results a second backend would have to reproduce. If 89 opcodes are pinned and 333 are lowered, then a second backend can be validated on roughly a quarter of the surface it has to cover, and the remaining 244 have to be right by construction.That is what makes the estimate "replace the back half of
lower.rs" rather than "add an emitter": you cannot lean on the tests for the rest.Both counts are upper bounds, and the document says so
Naming an opcode in
lower.rsis not the same as handling it — many arematcharms passing through a shared helper, and a few appear only in atracingmessage. A test can name one in a comment. So the doc bounds the funnel and states what would make it exact:over the 26,503-shader corpus, which needs game files. I do not have them; a tester or you do. The document's step 2 is to turn that into an opcode-frequency table, because the top of it is very likely far below 244 — game shaders use a small subset heavily.
What this PR is not
Not a claim that iOS is feasible or infeasible. It is the one part of the #83 decision that can be settled from the repository alone, plus an explicit list of what cannot (the MSL leg needs a Mac; the x64-without-JIT problem needs an AOT recompiler, which is a different project).
Verification
cargo test --workspaceon this tree is green on my machine — 0 failures, so nothing here fixes a bug. Windows 11, RTX 5070 Ti, Rust 1.98.1 pinned, MSVC 14.44.35207, Windows SDK 10.0.26100.0.The document is a single new file under
docs/; no existing file is touched, and the asset-policy check is unaffected (text,.md).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.