shader: name gfx10 register codes in gfx1013_graphics_wqm.inl #3901
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3901"
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 R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T23:38:13Z.
Problem
src/gfx1013_graphics_wqm.inlstill writes scalar registers as bare numbers: 126/127 for EXEC, 106/107 for VCC, 105 for the last general SGPR, 256 for the first VGPR operand and 128 for the SCC slot of the scalar state. #3830 addedsrc/gfx1013_registers.hto keep the register code, operand and translator slot meanings apart, and convertedgfx1013_compute_native.cpp.Change
This is the second slice. No behaviour change.
8b70c6773uses the constants fromgfx1013_registers.hinsrc/gfx1013_graphics_wqm.inl(+53/-37, one file). The substitution is textual and the values and types are unchanged.write(128)becomesreg::scc_slot: it is the SCC slot of the scalar state, not operand 128 (the constant 0).104, the bound for an aligned 64-bit register pair. The header has no constant for it, and #3830 left it as is too.512 +, the key offset of the saved-coverage tags ingraphics_registers. It is a translator map key, not a register code or an operand, andgfx1013_direct_graphics.inluses the same offset.0x1890, an export target mask, along with branch opcodes and IR text. None of them are register codes.gfx1013_compute_native.cpp, which already includes the header, and it is already a native shader revision input.Validation
Built on Windows with MSVC, head
8b70c6773onmainc42b7ce3f.native_graphics_wqm_ir,native_pixel_alpha_kill_controls,native_pixel_cmpx_discard_warp,native_pixel_compare_mask_ir,native_pixel_saveexec_masks_controls,native_pixel_cmpx_scalar_tail_controls,native_translator_corpus_dxilandnative_translator_corpus_irpass.tests/translator_corpus_hash.py): the TSV built frommainc42b7ce3fand the TSV built from this branch have the same SHA-256, so they are byte-identical. The corpus is a general regression check; the WQM paths are covered by the targeted tests above.Other open PRs
#3847 (draft) also edits
gfx1013_graphics_wqm.inl, but only adds a block at the head of the file, above the lines changed here, so there is no overlap. If this lands first and a rebase is needed, I am glad to help.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T23:50:46Z.
Review: APPROVED
Reviewed
8b70c677. I checked all seven referenced register constants againstgfx1013_registers.h. Substituting their original numeric spellings leaves the same WQM source after whitespace normalization, including the original wave64 alignment bound. The trial merge withmain1c4601ffis clean. At this head the Windows, Linux Python and gfx1013 fixture checks are green.