Shaders: cube face and multisampled image loads #1956
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!1956
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1956"
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?
@RaghavVijayanand on GitHub · 2026-11-25 01:45 UTC · original
RaghavVijayanand:shader/image-cube-msaa→main· +919 −62 · 4 files · 2 commits · openThe translator refused image accesses on cube and MSAA dimensions except for sampling ("an image dimension (cube loads or MSAA)"). Two commits.
Cube (dim 3)
image_get_resinfo: the handle is now a 2D array (kind 7). D3D12 has no cube UAVs, so a UAV over a cube is a 2D-array view with the faces as slices, which matches GFX10's (x, y, face) addressing. Before, resinfo used an invalid cube-UAV kind.sampleLevelat the texel's centre on that face, through a new clamped point immediate sampler.cube_load: out-of-range reads clamp instead of returning zero, cube arrays are not handled, and integer formats can't be sampled.MSAA (dims 6 and 7)
image_loadbecomes textureLoad on Texture2DMS (kind 3) or Texture2DMSArray (kind 8), with the sample index as the sample operand. The console's last address is the fragment index, which equals the sample unless FMASK remaps it; this is noted in the code.image_get_resinforeturns width, height and layers.image_msaa_load, MSAA stores, atomics, sampling andimage_load_mip, and the 4th resinfo channel.Tests: the new
emit/image_dim_tests.rs(7 tests) covers:image_atomic_addon a 2D-array UAVEach program is validated with dxil.dll and run on the default hardware adapter and WARP. Swapping the face coordinates, leaving the UAV handle as a cube, or zeroing the sample operand each makes tests fail. The cube mip test uses main's
View::MippedCube; the test host gains only 2D-array UAVs and the multisampled depth view.Not covered: main's newer descriptor-as-data path (
descriptor_datainlower.rs) still refuses cube and MSAA ("an image dimension (cube or MSAA)"). This PR does not touch it.This PR and #1955 (image stores) both touch
image()inemit/lower.rs, so merging both needs a small manual merge.Rebased onto current main (
940d32f). On this machine, 5 tests fail on main itself, with or without this change:descriptor::host::tests::dynamic_slots_are_held_until_released,memory::tests::lists_share_a_table_and_copies_keep_their_views, the twostride_tests::a_heap_buffer_read_*tests, andsynthetic_tests::gathers_at_a_level_match_the_hardware. Everything else passes, and clippy passes with-D warnings, with and without--all-features.@Marvisak on GitHub · 2026-11-25 02:19 UTC · original · edited 2026-11-25 16:03 UTC
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-shader/src/emit/host.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (merge candidate) was for an older state ofmain.Generated by Claude Code
@StExpeditus on GitHub · 2026-11-25 08:59 UTC · original
Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at
2e7466c.cargo test --workspace --locked --no-fail-fast-> 703 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.@sinan-cmyk on GitHub · 2026-11-25 11:01 UTC · original
Offline measurement on a retail dump
Result: no count change against
main.I merged head
2e7466cfontomain940d32f(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: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
2e7466cf71to8d1bdac43d@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 01:45 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@catminou4 on GitHub · 2026-11-25 03:14 UTC · original · approved these changes
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main
940d32f69b,cargo test -p victory-shader --locked.144 passed / 0 failed / 2 ignored. Cube face and multisampled image loads — texture-dimension coverage for cube/MSAA paths.
@RaghavVijayanand on GitHub · 2026-11-26 11:32 UTC · original
Rebased onto
main63bcca4. Two adjustments for whatmaingained since:dispatchtakesmain's WARP lock.root_signature_fortakes the lock as well, and it is not re-entrant, somultisampled_array_loads_read_the_slice_and_sample_asked_forhung on WARP.Each commit builds. On an RTX 5060 Laptop: the cube, multisampled, image store/atomic and
parallel_warp_pipelines_and_drawstests pass (11), on hardware and WARP. Clippy is clean.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.