shader: use named register codes in gfx1013_sampled_pixel.cpp #3907
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!3907
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3905"
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 00:53 UTC · original
Leyukaka:quality-item2-s3-sampled-pixel→main· +14 −11 · 1 files · 2 commits · merged 2026-12-03 01:55 UTCProblem
src/gfx1013_sampled_pixel.cppstill writes operands as bare numbers: 128, 192, 193 and 208 for the inline integer bounds, 255 for the literal, 256 for the first VGPR operand and 124 for M0. #3832 addedsrc/gfx1013_registers.hto keep the register code, operand and translator slot meanings apart, and #3903 convertedgfx1013_graphics_wqm.inl.Change
This is the third slice. No behaviour change.
a206c48b9uses the constants fromgfx1013_registers.hinsrc/gfx1013_sampled_pixel.cpp(+14/-11, one file). The substitution is textual and the values and types are unchanged, so the emitted HLSL and the refusal text are unchanged.namespace x2w, so it includes the header and addsnamespace gfx1013 = x2w::gfx1013;inside its anonymous namespace. The uses then readgfx1013::operand::...andgfx1013::reg::m0, as in the earlier slices.240..247and its table indexindex-240. The header'sfloat_lastis 248 (1/(2*pi)), which this translator does not accept, so naming only the lower bound would leave the range half-converted.256as the VGPR file size (the array size and the destination bound) andaddr<255. These are counts, not operand codes.256+addr/257+addrcoordinate pair,192u-index, decode masks, opcodes and HLSL text.tests/cmake/gfx1013_sampled_pixel.cmake(thestring(REPLACE ...)sources) target lines this change does not touch.gfx1013_registers.his header-only and already insrc.Validation
Built on Windows with MSVC, head
a206c48b9onmainb6171650f. The targeted set passed 68/68:gfx1013_sampled_pixel_alland thegfx1013_sampled_pixel_*cases, which pin the generated HLSL and the refusal reasons.*_mut,WILL_FAIL) still fail as expected, so the anchors still apply.native_sampled_replay,native_sampled_pixel_warpandnative_indexed_pixel_texture_warp.native_translator_corpus_dxilandnative_translator_corpus_ir.Translator corpus: the TSV built from
mainb6171650fand 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_sampled_pixel.cpp. The next files in the plan, thegfx1013_direct_*.inlfrontends (graphics, compute, mesh), are each edited by 12 to 15 open PRs, so they will follow once that work lands.@R0Y00 on GitHub · 2026-12-03 01:54 UTC · original · approved these changes
Independently reviewed
e9d9b967. Each named register/operand code matches the previous numeric boundary and the scalar, literal, and VGPR paths keep the old behavior. MSVC Debugctest --preset dev --no-tests=error -j 1 -R '^(gfx1013_sampled_pixel_all|shader_compile_sampled_pixel_cli_check|native_sampled_pixel_(warp|hardware))$'passed 4/4 in two serial selections on Windows 11 build 26300, WARP and RTX 4060 Laptop (616.56). Changing the lower negative bound to exclusive survived the default tests. With the existing dead scalar move changed locally from selector 200 to the first negative selector 193, the head passed and the mutant refused at byte 60. Both local edits were reverted and the original unit suite passed again.