shader: use named register codes in gfx1013_compute_clear.cpp #3915
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3915
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3913"
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?
@Leyukaka on GitHub · 2026-12-03 07:03 UTC · original
Leyukaka:quality-item2-s5-compute-clear→main· +9 −6 · 1 files · 1 commits · merged 2026-12-03 07:15 UTCProblem
src/gfx1013_compute_clear.cppstill writes registers and operands as bare numbers: 128 for the SGPR count and for the constant 0 operand, and 256 for the first VGPR operand. #3832 addedsrc/gfx1013_registers.hto keep the register code, operand and translator slot meanings apart. #3903, #3907 and #3912 convertedgfx1013_graphics_wqm.inl,gfx1013_sampled_pixel.cppandgfx1013_vertex_id.cpp.Change
This is the fifth slice. No behaviour change.
ea94df004uses the constants fromgfx1013_registers.hinsrc/gfx1013_compute_clear.cpp(+9/-6, one file). The substitution is textual and the values and types are unchanged, so the replayed clear and the refusals are unchanged.reg::sgpr_countfor 128 as the size of the scalar state array (std::array<Value,128>) and as thesource<128bound that makes thev_mbcnt_losource a scalar register.operand::zerofor 128 as the constant 0 source ofs_mov_b32(three uses).operand::vgpr_basefor 256 as the first VGPR operand in thev_mbcnt_hisource check and its index.replay_group_clearis defined asx2w::replay_group_clear, sogfx1013::resolves insidex2w.requireexpressions that became longer than the file's existing lines are wrapped. Their operands and evaluation order are unchanged.102, the guest SGPR bound this replay accepts. It is not a register code, and the header has no constant for it.256as the VGPR state size (std::array<Value,256>) anddst<255. These are counts, not operand codes.(operands&0xfffc01ff)==193, a match on a whole masked VOP3 operand word, not a single operand field.string(REPLACE ...)intests/cmake/gfx1013_compute_clear.cmake) target lines this change does not touch.gfx1013_registers.his header-only and already insrc.Validation
Built on Windows with MSVC, head
ea94df004onmain8a2f84d1b. The targeted set passed:gfx1013_compute_clear_alland thegfx1013_compute_clear_*cases, which cover the accepted clears and the refusals.*_mut,WILL_FAIL) still fail as expected, so the anchors still apply.native_translator_corpus_dxilandnative_translator_corpus_ir.Translator corpus: the TSV built from
main8a2f84d1band the TSV built from this branch have the same SHA-256, so they are byte-identical.Each replaced site was also read a second time against the header to confirm the same value, type and meaning.
Other open PRs
No open PR edits
gfx1013_compute_clear.cpp. Thegfx1013_direct_*.inlfrontends are still edited by many open PRs, so they will follow once that work lands.@R0Y00 on GitHub · 2026-12-03 07:09 UTC · original · approved these changes
Independently reviewed
ea94df00. The symbols resolve to the original operand values and preserve the scalar and vector bounds, short-circuit checks, and vector index. On Windows 11 with MSVC Debug, built all six gfx1013_compute_clear targets and ran ctest --preset dev --no-tests=error -j 1 -R '^gfx1013_compute_clear_': 44/44 passed, including all five mutation targets. This source-built replay fixture does not require a GPU.