fix(shader,gpu): add CBV size guards, bit-exact typed views, dot-product lowering, and POPS ROVs #3546
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3546"
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?
Imported from Marvisak/VIctory. Originally posted by legayclightning22 on 2026-11-27T16:42:02Z.
Summary
Adds CBV size clamping (
<= 65,536bytes) and zero-size CBV safety, bit-exact typed buffer format mapping, packed GFX10 dot-product lowering (emit/dot.rs), and POPS ordered-RW (ROV) detection (8fb4c08c,+699/-70).Verification
cargo test --locked -p victory-shader --libandcargo test --locked -p victory-gpu --libcargo clippy --locked -p victory-shader -p victory-gpu --all-targets --all-features -- -D warningscargo xtask policyImported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-27T17:59:21Z.
Review: COMMENTED
AMD check, head
26923a0: Windows 11, Radeon 780M (RDNA3 iGPU), toolchain 1.98.1.Since dot products are where an AMD driver issue already bit (#1782, constant multiplicands zero-extended), I ran them on hardware:
dottests: 5 passed, including main'sfspx_programs_run_with_the_hardwares_dot_productsandbyte_dot_products_match_the_hardware(hardware + WARP).semantics_tests: 481 probes, 0 model mismatches and 0 hardware/WARP differences.cargo test -p victory-shaderon the 780M: 305 passed, 0 failed.So the new
dot.rskeeps RDNA3 bit-exact and doesn't reintroduce #1782.AI-assisted (Claude).
Imported from Marvisak/VIctory. Originally posted by Jishnuraj07 on 2026-11-27T18:19:16Z.
Tested on an NVIDIA RTX 5060 8 GB, driver 32.0.16.2112, Windows 11 Pro 10.0.26200, rustc 1.98.1 (MSVC), base
main63bcca4.At the previous head
8fb4c00,host_constant_views_clamp_and_zerofailed (constant_view_size(0)returned 0, expected 256). At the current head26923a0(size.max(256)) it passes:main63bcca48fb4c0026923a0-p victory-gpu -p victory-shader --all-targets -D warningsvictory-gpu --libvictory-shader --lib -- --test-threads=1 --skip heap_direct_texture_reads_mark_their_heap_indexThe two
victory-gpufailures left are the capped-heap pairmainalso fails on this card (#3445). The threevictory-shaderfailures are the same three as onmainhere, with the same output (#3445). The skipped test crashes the test binary onmaintoo. For26923a0I re-ran onlyvictory-gpu, since the change is indescriptor.rsalone.One small thing is still there: the doc comment above
constant_view_sizeindescriptor.rs("Device method. A nulldescwrites a null CBV…") describescreate_cbv, not this function.Imported from Marvisak/VIctory. Originally posted by oddmaniv on 2026-11-27T18:22:44Z.
Independent verification of the PR author's shader-package parser tests at
26923a02d3bd981fa9c26d31ba596430fbb04732.cargo test --locked -p victory-game --lib shaderpack::tests -- --nocaptureMain baseline pin:
63bcca43c6a00a758510398fa43096ce7e4f7df0.Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits.
This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed.
AI-assisted verification.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.