Shaders: heap handles are reused only for the same resource properties #1953
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!1953
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1953"
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-atomics-64→main· +70 −6 · 2 files · 1 commits · openLowering caches one annotated heap handle per block, descriptor load, first dword and sampler flag, but keyed it on the first dword of the resource properties only (kind and UAV bit). Two uses of one descriptor in the same block that differ in the second dword, such as an
image_load(four F32) and an image atomic (one U32) on the same texture UAV, shared whichever handle was annotated first. The later access then ran with the other's component type. The key now holds both dwords.This PR was opened as "64-bit image atomics". Upstream landed its own in
0b35b7fin the meantime, so that part is dropped and only this fix remains, rebased on current main.Test:
valu_tests::a_load_and_an_atomic_of_one_texture_have_their_own_handleslowers animage_loadand 32-bit image atomics of one texture in one block, in both orders. It then checks, in the moduledxc -dumpbinprints, that both a{4098, 1033}and a{4098, 261}handle exist.On this machine, 5 tests fail on current main itself, with or without this change:
descriptor::host::tests::dynamic_slots_are_held_until_releasedmemory::tests::lists_share_a_table_and_copies_keep_their_viewsstride_tests::a_heap_buffer_read_by_element_takes_the_views_stridestride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zerossynthetic_tests::gathers_at_a_level_match_the_hardwareEverything else passes, and clippy passes with
-D warnings, with and without--all-features.@upipibi on GitHub · 2026-11-25 01:51 UTC · original
Overlap note, from reading, not a run: this branch is based on
ffe310e, which predates0b35b7fonmain. That commit already lowers 64-bit image atomics: theR32G32_UINTview with the low dword in R, i64 data,flags::INT64 | ATOMIC64_TYPED | ATOMIC64_HEAP, and theimage_atomics_of_64_bitstest. GitHub reports this PR as conflicting. #1899 was the same case. If something here isn't inmainyet, rebasing it down to that part would keep it reviewable.AI-assisted (Claude Code).
@Headache3318 on GitHub · 2026-11-25 02:01 UTC · original
Tested on Linux (Arch, kernel 7.3.5, 3× RTX 4090 driver 620.73.04), Rust 1.98.1 (pinned). PR head
7d9a51bapplied cleanly onto currentmainccfb029.cargo test -p victory-shader --locked: 96 passed, 0 failed, 1 ignored. All tests pass. The new 64-bit image atomic tests are GPU-specific (require dxil.dll/WARP) and are skipped on Linux.cargo clippy -p victory-shader --all-targets -- -D warnings: 2 errors (vs 4 on main). The PR net-reduces clippy errors by fixing unused imports.Not tested: Windows MSVC build, the title itself. AI-assisted.
@Marvisak on GitHub · 2026-11-25 02:18 UTC · original · edited 2026-11-25 16:02 UTC
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-shader/src/emit/lower.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 09:02 UTC · original
Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at
de72d84.cargo test --workspace --locked --no-fail-fast-> 697 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:05 UTC · original
Offline measurement on a retail dump
Result: no count change against
main.I merged head
de72d84eontomain940d32f(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).
de72d84eactod6a30c63bc@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. 64-bit image atomics — overlaps with #1899 (64-bit atomics, mixed gpu+shader, staticked earlier); whichever lands second must reconcile the DXIL i64 path.
@RaghavVijayanand on GitHub · 2026-11-26 10:29 UTC · original
Rebased onto
main63bcca4. The handle key now holds both property dwords in the entry-block and join-block handle cachesmainadded since, too: the same mixup could happen there. On the overlap note: this PR is no longer about 64-bit image atomics (mainhas those). It only fixes the cache key.valu_tests::a_load_and_an_atomic_of_one_texture_have_their_own_handlesand all lower/valu tests pass on an RTX 5060 Laptop; clippy 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.