Shaders: lower MSAA image_load and image_get_resinfo #328
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!328
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-328"
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?
@tarcisioads on GitHub · 2026-11-24 02:20 UTC · original
tarcisioads:shader/msaa-image-load→main· +82 −4 · 1 files · 1 commits · openSupport
2DMS(dim = 6) and2DMSArray(dim = 7) image dimensions forimage_loadandimage_get_resinfoincrates/victory-shader/src/emit/lower.rs:dim = 6 => (3, 2)anddim = 7 => (8, 3)inimage()forimage_loadandimage_get_resinfo.image_get_resinfo(op 72), passundefas themipargument ofdx.op.getDimensionsfor MSAA (kind3 | 8) and treat2DMS(kind = 3) as[true, true, false, true](width, height, -, sample count).image_load(op 66), forwardsample_index(addr_val(self, coords)) into themipLevelOrSampleparameter ofdx.op.textureLoad.msaa_image_load_and_get_resinfo_lowercoveringimage_loadandimage_get_resinfofor bothdim = 6anddim = 7.Verification
cargo test -p victory-shader(57/57 passed on macOS; Windowsdxil.dllvalidation not run)rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower.rs(ok)cargo xtask policy(ok)@jeremygold02 on GitHub · 2026-11-24 04:21 UTC · original
Tested PR #328 at head
6d7602daf690bd5ec6d3b7ecac653a2e3bf7b9f0(state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at6d7602daf690bd5ec6d3b7ecac653a2e3bf7b9f0.cargo test --locked -p victory-shader msaa_image_load_and_get_resinfo_lower— passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 69 filtered out; finished in 0.00s ); cases: emit::lower::tests::msaa_image_load_and_get_resinfo_lower.Behavior covered: Checks MSAA image_load and image_get_resinfo lowering in the shader emitter.
Code: crates/victory-shader/src/emit/lower.rs
@tarcisioads on GitHub · 2026-11-24 11:18 UTC · original
Rebased onto
main(ffe310e) in91e7742and updatedmsaa_image_load_and_get_resinfo_lowerfor the newresource::tracksignature.cargo test -p victory-shader(97 passed, 0 failed on macOS).@Marvisak on GitHub · 2026-11-25 00:28 UTC · original · edited 2026-11-25 22:15 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflict incrates/victory-shader/src/emit/lower.rs). It will be reviewed again once it is rebased.From the earlier needs-work note, still open: a source for channel w = 1 of MSAA
image_get_resinfo, a comment that says what the code does, and a test that asserts the emittedtextureLoad/getDimensionsarguments.Generated by Claude Code
@tarcisioads on GitHub · 2026-11-25 00:40 UTC · original
Addressed the triage feedback:
image_get_resinfo(op 72), MSAA (kind = 3 | 8) now returns1in channelw(matching RDNA2IMAGE_GET_RESINFOmip count, rather than passing through DXIL's sample count).// shortcut:onimage_loadMSAA (forwarding fragment index as sample index, assuming no FMASK remapping).msaa_image_load_and_get_resinfo_lowerto match the encoded words and added an assertion on the emittedSFI0RESOURCE_HEAPfeature bit.cargo test -p victory-shader(119 passed, 0 failed on macOS;dxil.dllvalidation still needs Windows).@Dathinel on GitHub · 2026-11-25 05:58 UTC · original
Windows SDK validation of the four MSAA cases is complete. There is one fixture update needed when refreshing this branch onto main.
940d32f6,cargo test --frozen -p victory-shader --lib --no-runbuilds. Merging62baee73cleanly onto it produces tree287c3390, where the test target fails to compile: E0063, missingview_marksin the newPartsinitializer inmsaa_image_load_and_get_resinfo_lower.view_marks: false,locally to that initializer, matching the neighboring fixtures. The regression test then passed. I also passed a copy of each emitted DXIL container to the repo's validator wrapper with the x64 Windows SDK 10.0.26100.0dxil.dllexplicitly loaded. All four returned success: dimensions 6 and 7, each withimage_loadandimage_get_resinfo.This checks DXIL validation. Sample selection and returned dimensions were not measured on a GPU. AI-assisted; the fixture adjustment and validator call were local only.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.