Shaders: gather stencil coverage as unsigned texels #3918
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3918"
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 faycalbaklouti on 2026-11-30T23:02:42Z.
What
Mark 2D and 2D-array stencil SRVs as unsigned without assigning a buffer stride. A full-width green level-zero gather dispatches on the bound view’s kind and returns unsigned coverage bits for stencil, while ordinary float views retain the float gather. The raw-buffer guard masks off view-kind bits before checking stride. The regressions cover shader and placed descriptors, non-stencil controls, and synthetic shader lowering.
How it was tested
Windows MSVC target under Wine:
cargo xwin test --locked --target x86_64-pc-windows-msvc -p <package> --lib --no-fail-fastfor each suite, adding-- --exact <name> --nocapture --test-threads=1for the regressions. Compared45dc09fd79with clean base63bcca43c6.The same 88 shader tests failed by name and diagnostic on head and base: the CPU-only Wine runner has no D3D12 Shader Model 6.6 device or WARP fallback. The exact green-gather test passed, and a Wine loader trace shows native
dxil.dllloaded during the test. The test does not execute the shader on a GPU. Zero matches on the clean base are expected for newly added tests. With only the test hunks applied to base, the regression assertions failed as expected.Both workspace Clippy modes (default and all features, with
-D warnings) exited 0 on head and base. The Windows-target workspace test under Wine exited 101 on both, stopping invictory-hle:modules::net::tests::only_loopback_is_reachablehit a missingWSAConnectByListexport on the isolated runner, andmodules::xgamesave::tests::a_kept_blob_past_the_link_limit_is_copieddid not observe the expected NTFS hard-link limit. Native Windows CI remains the final gate.Radicle project hub (open-source porting and preservation history): https://radicle.network/nodes/rosa.radicle.network/rad:z3rqQw7796wMbgj8RszExtWR4wMSE
Live development stream: https://vdo.ninja/?view=gta6rtx4090live1080p60
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-12-01T12:24:00Z.
Verification of this PR (AI-assisted: Hy4 flash), source only, no game data.
Windows / rustc 1.100.0 / MSVC. Worktree at head
45dc09fd, dedicated per-worktree CARGO_TARGET_DIR (D:\Victory-Contrib\target-3918), nothing shared.Negative control on base
63bcca43:git grep -F stencil_texture_metadata_has_kind_but_no_buffer_stride 63bcca43 -- .-> exit 1 (new)git grep -F green_gather_requests_view_metadata 63bcca43 -- .-> exit 1 (new)Whitespace:
git diff --check 63bcca43..45dc09fd-> exit 0, clean.->
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out, exit 0.->
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 305 filtered out, exit 0.Both are synthetic: the gpu test runs the descriptor metadata path with a made-up view, and the shader test checks the emitted gather kind; neither opens a D3D12 device.
GPU/driver: N/A.
Verdict: PASS for both new tests on this host.
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T12:32:52Z.
Executed the translated shader on RTX 4090 Laptop and WARP at
45dc09fdand its parent. The two stencil formats were tested as actual stencil-plane SRVs, both 2D and array slice 1, alongside a float control. All 32 lanes returned four ordered values matching the oracle for all five bindings on both revisions. The emitted DXIL on the PR contained both i32 and f32 gather paths where the parent contained only f32; the production descriptor metadata check failed on the parent and passed on the PR. Neither revision produced a GPU-based validation error on the 4090. These devices showed the metadata and DXIL change with identical correct pixel data.Imported from Marvisak/VIctory. Originally posted by faycalbaklouti on 2026-12-01T15:13:32Z.
Thanks to @cloph-dsp for the independent source and test check, and to @passerbyyhx for the independent RTX 4090 Laptop and WARP runs on #3918.
Project hub README on Radicle
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.