Repository navigation
CLI: reject VS+GS graphics pipelines in prebuild - #2592
fuzeofficlal wants to merge 1 commit into
Conversation
Prebuild::prepare_graphics now rejects graphics pack records carrying both VS and GS stages instead of silently dropping GS via vs.or(gs) and writing a bogus VS+PS pipeline into the library. Also keep all non-empty stages (including GS and ES/HS/LS/fetch) in shaders_of diagnostic output while preserving the existing VS+PS and MS+PS formatting, and add unit tests covering VS+PS, MS+PS, and VS+GS handling.
|
Automated triage for the maintainers. Merge candidate. In CI: Generated by Claude Code |
|
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
The #2787 prebuild optimization now composes with this stage check in Please retain the Git authors on pickup. If folding the integration or its test into another commit, use |
Summary
Fixes
apps/victory/src/prebuild.rssilently dropping the geometry shader stage when a shaderpack graphics record carries bothVS(stages[1]) andGS(stages[2]):prepareonly checkedg.stages[3..](ES/HS/LS/fetch) and then usedvs.or(gs). When bothvsandgswere present,vs.or(gs)pickedvsand droppedgs, passing a bogus VS+PS stream without a geometry shader toPrebuild::graphicsand persisting an unreachable PSO under the wrong key (whereas runtimeHostPipeline::newrejects geometry stages).prepare_graphics, explicitly rejectingvs.is_some() && gs.is_some()alongsideg.stages[3..]as"stages other than vertex, mesh and pixel", and usesvs.xor(gs)for the single first stage.shaders_of_graphics/format_stagesso diagnosticVICTORY_PREBUILD_KEYSoutput lists all present stages (preserving the existing[vertex ..., pixel ...]and[mesh ..., pixel ...]formatting while no longer hidingGSbehindVSor labeling standaloneHwStage::Gsasmesh).Verification
prebuild::tests::prepare_rejects_vs_plus_gs_while_allowing_vs_and_ms_pipelines(apps/victory/src/prebuild.rs) coveringVS+PS,MS+PS,VS+GS+PS, and unresolvedVS+GSrecords.cargo test -p victory -- --test-threads=1(11 unit + 2 integration passed)cargo clippy -p victory --all-targets -- -D warnings(default and--features diagnostics)cargo xtask policy