GPU: mesh pipelines without a pixel shader get an empty one on WARP #3049
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3051"
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 redNSF on 2026-11-26T05:29:13Z.
The software adapter (WARP) loses the device at the first draw of a mesh pipeline that has no pixel shader, as depth-only passes do. A trivial mesh shader drawing one triangle shows it, drawn directly and through ExecuteIndirect; with a pixel shader that reads and writes nothing bound, the same draws run and write the same depth.
In diagnostics builds with VICTORY_D3D12_WARP, the host now gives such pipelines that empty pixel shader. Hardware adapters are not affected.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T05:36:28Z.
Review: APPROVED
Reviewed head
844e6f61and verified locally on Windows 11 (NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, Windows SDK 10.0.26100dxil.dll):victory-shader:emit::empty::tests::the_empty_pixel_shader_validatespassed with systemdxil.dllvalidation.victory-gpu(--features diagnostics):pipeline::tests (26/26) passed on both RTX 5090 andVICTORY_D3D12_WARP=1.cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warnings(default and--features diagnostics) andcargo xtask policy(192 files ok) passed.Confirmed
empty_ps()is only substituted whenmesh.is_some(),code(1).pShaderBytecode.is_null(), andcrate::host::software()is true, and the substituted bytes are hashed intolibrary::nameso WARP and hardware pipeline-library entries cannot collide.Note on the red CI run (
checkjob139713665040): the sole failure is the unrelateddescriptor::host::tests::views_bound_while_another_slot_gets_its_texture_do_not_wait(both made) timing flake; everything touched here is clean. Minor non-blocking nit:host::create()can reuse the newsoftware()helper on line 188.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T06:00:31Z.
Review: APPROVED
Verified: the substitution is scoped exactly right — mesh pipeline + null PS + software adapter only (
host::software()is diagnostics-gated, so hardware paths are untouched), andnamehashes the substituted bytecode so the cache key matches the compiled pipeline.empty_psemits through the project's own Shader builder (real DXIL, system-validator-checked), and the OnceLock keepspShaderBytecodevalid for every pipeline using it. The documented failure mode (WARP device loss on depth-only mesh draws) is plausible and consistent with #2949-era WARP issues.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T06:18:01Z.
Automated triage for the maintainers.
Verdict: needs work. The change is narrow and gated. In
crates/victory-gpu/src/pipeline/host.rs,HostPipelinesubstitutesvictory_shader::emit::empty_psfor a missing pixel shader only on mesh pipelines, and only whenhost::software()is true (a diagnostics build withVICTORY_D3D12_WARP). The pipeline-library name includes the substituted shader, so cached pipelines stay distinct. A null pixel shader is valid D3D12, though, so this works around a WARP fault. The only evidence is the description. To make it reviewable:d3d10warp.dllversion, or the redistributable package version. Behaviour has differed between them in earlier reports on this repo.checkis failing. The failure is indescriptor::host::tests::views_bound_while_another_slot_gets_its_texture_do_not_wait("both made"), which this PR does not touch, so it looks unrelated. A re-run or a rebase should confirm that.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-26T10:16:18Z.
Independent Windows WARP verification of
844e6f61against its exact parent, currentmain(63bcca43). Coordination claim: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7184310773. I confirmed Microsoft Basic Render Driver (DXGI software adapter,d3d10warp.dll10.0.26100.9818 loaded) withVICTORY_D3D12_WARP=1and diagnostics enabled. The adapter reported mesh shader tier 1 and Shader Model 6.6, so neither mesh draw path was skipped. No physical GPU was used.SV_Positiononly, built with the SDKdxc) in a local WARP probe test (not part of the PR), with no pixel shader supplied.DXGI_ERROR_DEVICE_REMOVED,0x887A0005) at the depth readback map.[0.25, 0.5, 0.25, 0.5].[0.25, 0.5, 0.25, 0.5].victory-gpupipeline::tests (diagnostics feature): 27 passed, 0 failed.victory-shaderemit::empty::tests::the_empty_pixel_shader_validatespassed, using the SDKdxil.dll(VICTORY_DXIL) for validation.AI-assisted with Claude Code (claude-sonnet-5-5), continuing a session started with Codex (gpt-6.2-sol). Synthetic data only.
Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T16:35:57Z.
Your red check is the same descriptor flake that hit #3192, not this change.
descriptor::host::tests::views_bound_while_another_slot_gets_its_texture_do_not_wait—panicked at descriptor/host.rs:2011: both made(230 passed, 1 failed).WHILE_PREPARINGhook, which any test'spreparecan take or overwrite in a parallel suite; claimed in #1633 by @fyernald as a test-only per-thread hook, no PR yet.63bcca4here passescargo test -p victory-gpu --lib8 of 8 runs, so it is load dependent.A re-run will likely go green. AI-assisted.
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.