Shaders: support cube dimension in descriptor_data #317
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!317
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-317"
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:15 UTC · original
tarcisioads:shader/cube-msaa-descriptor-data→main· +105 −2 · 2 files · 1 commits · openSupport cube (
dim = 3) image dimensions when a shader reads a resource descriptor's metadata words as data (descriptor_dataincrates/victory-shader/src/emit/lower.rs):dim = 3 => 5(TextureCube) indescriptor_data.depth = 6before- 1(yielding5, matching the RDNA2 ISA descriptor table for 6 faces) and add11(SQ_RSRC_IMG_CUBE) to the hardware type table in word 3.cube_descriptor_data_lowersverifyingSFI0RESOURCE_HEAPemission.Verification
cargo test -p victory-shader(119 passed, 0 failed, 1 ignored benchmark on macOS; Windowsdxil.dllvalidation not run)cargo xtask policy(ok)@r4tedx on GitHub · 2026-11-24 03:09 UTC · original
Review note on the MSAA case. For kinds 3 and 8 (MSAA) the level count is set to 1:
so the descriptor's last-level field comes out as 0. The RDNA 2 ISA's image resource table defines that field differently for MSAA:
Code that reads the sample count from the descriptor would get 1 sample. The host view's sample count is available (
getDimensionson aTexture2DMSreturns it), so the field could hold its log2.For the cube case, #109 hardcodes the depth field as 5, which matches the same table ("depth: ... last array slice for a 2D-array or 1D-array or cube-map"); here it is taken from
getDimensionscomponent 2, which aTextureCubedoes not expose, so the two PRs disagree and #109's value is the one the table gives.From the document and reading the diff only; I have no copy of the title.
@tarcisioads on GitHub · 2026-11-24 11:18 UTC · original
Rebased onto
main(ffe310e) and addressed @r4tedx's review notes in8133754:kind = 5)depthto5(6 faces - 1).kind = 3 | 8)last_leveltofirstbitLo(samples)(log2(samples)fromgetDimensionscomponent 3).cube_and_msaa_descriptor_data_lowerfor the newresource::tracksignature;cargo test -p victory-shader(97 passed, 0 failed on macOS).@Yaekai on GitHub · 2026-11-24 16:38 UTC · original
Independent verification on Windows 11 + NVIDIA RTX 3070 (Rust 1.98.1) at head
8133754:cargo test -p victory-shader --lib -- --skip valu_tests --skip waterfall_tests: 103 passed, 0 failed.cargo clippy -p victory-shader -- -D warnings: 0 warnings.1.0.2.1,--console series-s, 19-min world run): no regressions. Ready to merge!@Marvisak on GitHub · 2026-11-25 00:30 UTC · original · edited 2026-11-25 22:29 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main:mainhas moved since the last triage, and the branch now conflicts incrates/victory-shader/src/emit/bitcode.rsandcrates/victory-shader/src/emit/lower.rs. It will be reviewed again once it is rebased onto currentmain.Previous verdict for this head: merge candidate.
Generated by Claude Code
@tarcisioads on GitHub · 2026-11-25 00:34 UTC · original
Addressed the triage feedback:
dim = 3,depth = 5,SQ_RSRC_IMG_CUBE = 11), dropping the unreachable MSAA arms (and thefirstbitLo.i32call) until MSAA image instructions lower.cube_descriptor_data_lowersand verifiedSFI0RESOURCE_HEAPemission.cargo test -p victory-shader(119 passed, 0 failed on macOS).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.