Shaders: zero missing channels on typed buffer loads #1370
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1370
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1370/head"
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?
@fuzeofficlal on GitHub · 2026-11-24 17:38 UTC · original
fuzeofficlal:fix/shader-format-load-zero-pad-1060→main· +390 −15 · 3 files · 1 commits · closed without mergingAddresses the missing-channel padding bug in #1060 (orthogonal to #1112 and #169).
Summary
0(out.resize(channels as usize, self.s.m.i32(0))) instead of(0, 0, 0, 1), matching GFX10buffer_load_format_*/tbuffer_load_format_*hardware behavior for 1-, 2-, and 3-channel formats.snorm16x2expectation indiff_testsaccordingly.Verification
valu_tests::tbuffer_load_format_zero_pads_missing_channelscovering 25tbuffer_load_format_{xy,xyz,xyzw}cases acrossUNORM,SNORM,UINT,SINT,USCALED,SSCALED, andFLOAT1/2/3/4-channel formats:dxil.dllvalidation: passedcargo clippy --workspace --all-targets --all-featuresandcargo xtask policy: passed.@Marvisak on GitHub · 2026-11-25 00:38 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1516. Missing channels of typed buffer loads read 0 instead of (0, 0, 0, 1). The lowering change is line for line the one in #1516, which merges clean. Either one contradicts main's stated rule (lower.rs:4428) and rewrites the console-vs-PC differential case to fit; it rests on the measurement in issue #1060, so decide it on #1516.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
@sinan-cmyk on GitHub · 2026-11-25 01:48 UTC · original
Offline measurement on a retail dump, and the shader tests on Ada
Result: no count change against
main.Offline. I merged head
44d9c2dontomainffe310e(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 21,724 onmain, 21,724 with this PR.No program changes its failure reason either. That is the expected result for a fix whose instructions sit behind the earlier failures on
main. The count shows that the change rejects nothing. It does not show whether the output is right.Tests: with the same merge,
cargo test --locked -p victory-shader --libpassed 121, failed 0. The bitcode benchmark is ignored, as onmain, where 120 pass. The run was on an RTX 4070 SUPER (Ada, 32-lane waves, driver 32.0.16.1088), the default adapter, withVICTORY_WARPunset.No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Pull request closed