shader: gather opaque coverage as unsigned bits for stencil SRVs #1519
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1519"
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 fxceless/victory-fork. Originally posted by faycalbaklouti on 2026-11-28T17:54:57Z.
Problem
The 80x45 opaque tile classifier gathers a green-channel coverage quad from a stencil-plane SRV (guest format
120-> hostDXGI_FORMAT_X24_TYPELESS_G8_UINT) and tests its integer stencil bits. Previouslyview_stride_and_kind()returned(None, 0)for all non-buffer views, solower.rsalways emittedtextureGather.f32instead oftextureGather.i32for unsigned integer stencil SRVs.Solution
crates/victory-gpu/src/descriptor/host.rs, teachview_stride_and_kind()to propagateVIEW_INTEGERfor stencil-plane texture SRVs (pc_format(format)in22 | 47, i.e.,X24_TYPELESS_G8_UINT/X32_TYPELESS_G8X24_UINT), with unit teststencil_view_kind_follows_the_view_not_the_depth_resource.crates/victory-shader/src/emit/lower.rs, branch on the runtime view kind (integer_view) for theimage_gather4_lzopaque coverage gather so stencil SRVs executetextureGather.i32(uint4handle) while float views retaintextureGather.f32.Verification
cargo test -p victory-shader --libandcargo test -p victory-gpu --lib(0 failures).595.112.07) and Blackwell (620.70.06) against initializedD24S8stencil fixtures and live dorm/walk-around/cafeteria scenes.About our fork & censorship-resistant preservation effort:
This fix comes from our open-source Linux (GE-Proton) + NVIDIA porting effort (
gta6-vi-port) and censorship-resistant peer-to-peer Radicle archival hub (234+ community porting repos mirrored & seeded on P2P Radicle so community research survives takedowns):Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-28T19:43:51Z.
I independently checked the descriptor metadata on
368967f8and this PR atf6da9fc8, using Rust 1.98.1 in a Windows MSVC build under GE-Proton11-14 on Bazzite.A local synthetic fixture checks 2D and 2D-array stencil SRVs for the two native stencil formats and the guest format that maps to X24/G8. It covers object and placed views and verifies the packed table word. The fixture failed on main and passed on this PR. The existing integer typed-buffer fixture passed on both. Float and depth-only views kept their original metadata on the patched run.
This verifies the descriptor half of the change. GPU gather execution and title rendering are still unmeasured here.
Assisted by Codex (GPT-6.2-Sol High).
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.