Repository navigation
Shaders: seed uninitialized mesh SGPRs above user_sgprs as zero - #2049
fuzeofficlal wants to merge 1 commit into
Conversation
|
Triage verdict — Keep the mesh ABI support, align the live-in rule with #1261 ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
Decode the mesh stage's user SGPR count from MS_INFO byte 6 (E+0x44e) into MeshIo::user_sgprs and wire MeshIo::initialized_sgprs (8 merged-stage system SGPRs plus user_sgprs) into Io::initialized_sgprs (Marvisak#815). Narrow Lower::inputs so an unmapped SGPR at or above initialized_sgprs reads as zero only when at least one instruction in the program writes that register, refusing registers no instruction writes as unknown inputs (matching Marvisak#1261). Make the multi-adapter SM 6.6 mesh draw test enumerate UMA/software adapters directly and assert at least one adapter executes.
4f3c6a1 to
71e4bd2
Compare
|
Thanks @jeremygold02 — pushed
|
|
Automated triage for the maintainers. This PR extends the compute "uninitialized SGPRs read zero" rule to mesh programs:
What would change the verdict: evidence for the CI: passing ( Generated by Claude Code |
Offline measurement on a retail dumpResult: no count change against I merged head 71e4bd2 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
Closing this PR: deferring |
Summary
user_sgprsfromMS_INFO[6]intoMeshIo::user_sgprsand exposeMeshIo::initialized_sgprs()(8 + user_sgprs, covering the 8 merged-stage system SGPRss0..=s7plus the user SGPR ranges8..).StageIo::Ms(ms) => Some(ms.initialized_sgprs())inio::raisealongside compute and pixel stages so reads of uninitialized SGPRs above8 + user_sgprslower to0instead of failing with"a hardware SGPR input", while keeping unimplemented hardware SGPRs (s0..=s7other thans3MergedWaveInfo) and unmapped user SGPRs (s8..s[8 + user_sgprs - 1]) strictly refused.Addresses #815
Testing
cargo test -p victory-shader --locked -- mesh_uninitialized_sgprs(verified withdxil.dlland executed on NVIDIA RTX 5090, AMD Radeon Graphics, and D3D12 WARP)cargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo xtask policy