GPU: preserve pixel masks when linking oversized mesh shaders #1904
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1904
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1904"
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?
@73N1X on GitHub · 2026-11-29 02:09 UTC · original
skAInet-labs:nv06/mesh-link-pixel-mask→main· +199 −18 · 3 files · 1 commits · merged 2026-11-29 08:16 UTCProblem
Oversized mesh shader output linking reconstructs the paired
pixel shader. The existing implementation loses the pixel
shader's masked translation state during that reconstruction.
Consequently, mesh linking and console sample-mask emulation
do not compose correctly.
Changes
Validation
Windows x64, synthetic shaders and DXIL validation.
The existing failure in both shader suites is
emit::tests::a_pixel_mask_draws_only_its_pixels_of_each_quad.Scope
This change addresses the interaction between mesh signature
linking and pixel-mask emulation.
It does not implement mesh shader fallback, change dispatch
dimensions or modify the console wave translation.
Native mesh rendering on NVIDIA hardware and gameplay have
not been tested. No FPS improvements are claimed.
No game assets are included.
Validated base:
0338ec6ceb@Dukestar69 on GitHub · 2026-11-29 03:36 UTC · original · approved these changes
Tested locally merged onto
main(568c5e5).pipeline/host.rs,shader_cache.rs, andvictory-shader/src/native.rs.cargo test -p victory-gpu --lib pipeline::passed (32 passed; 0 failed).cargo test -p victory-gpu --lib shader_cache::passed.cargo test -p victory-shader --lib native::passed.Clean preservation of pixel masks when linking oversized mesh shaders. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@upipibi on GitHub · 2026-11-29 04:10 UTC · original
Test report for #1904 (head
64c07418), merged--no-ffonto main568c5e5d, on RTX 30. Synthetic tests only: notitle run, no game files.
Setup: RTX 3070, driver 616.56, Windows 11 (10.0.26100), rustc 1.98.1. Every run logged the GPU and driver from
nvidia-smibefore it started.Both new tests pass, 3/3 runs:
shader_cache::tests::nv06_linked_pixel_mask_cache_identity(victory-gpu). I also ran it three times withVICTORY_D3D12_WARP=1 --features diagnostics, with the same result.native::tests::nv06_linked_pixel_preserves_mask_metadata(victory-shader). The DXIL validator loaded and passedall four variants in every run (
NV06_DXIL_VALIDATOR_PASS).Neither test makes a D3D12 device. They check translation output and cache keys only, so they don't depend on the
GPU.
Negative controls
native.rstest added: it passes.native.rsgains only thetest, so it pins down shader-side behaviour main already has (linking keeps the mask metadata). It is not a check
of this PR's fix.
variant_maskedignoring the linked pixel shader's mask flag: the cache-identity test fails atshader_cache.rs:527(variant_masked(Some(&linked_masked), false)). So it catches a masked linked pixel shaderlosing its mask in the cache key.
pipeline/host.rsundone (MeshLink::Pixel { masked: false }): both tests still pass.Neither test goes through
HostPipeline, so the line that hands the pixel shader's mask flag to the link isn'tcovered. A test that builds a mesh pipeline with a masked pixel shader and checks the linked shader's
USER_PIXEL_MASKwould cover it.cargo test --lib --locked568c5e5dvictory-gpu, defaultvictory-gpu,--features diagnosticsvictory-shaderThe extra test in each crate is the PR's own.
emit::tests::a_pixel_mask_draws_only_its_pixels_of_each_quadfails in both suites in the description, but itpassed here on both the PR and main.
Not tested: native mesh rendering, and the effect in a title.
Tested with the help of Claude Code (Claude Opus 5.5).