Repository navigation
Shaders: lower pixel SV_Coverage input via dx.op.coverage - #1886
n-romanovich wants to merge 1 commit into
Conversation
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f, cargo test -p victory-shader --locked.
145 passed / 0 failed / 2 ignored (+1 new test vs the 144 baseline). Pixel SV_Coverage input lowered via dx.op.coverage — clean addition, suite green.
|
Automated triage for the maintainers. Merge candidate.
Notes:
CI: no check runs on this head. The author reports the new test passing on Windows (RTX 5060 Ti). Generated by Claude Code |
Offline measurement on a retail dumpResult: no count change against I merged head 77329c1 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
Automated triage for the maintainers, second look (a review against current Closing as a duplicate of #1686, which makes the identical change in If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution. |
Fixes #1530
Problem
io::raisealready liftsSPI_PS_INPUT_ADDRbit 14 (sample_coverage) intoInput::SampleCoverage, andiorecognizes semantic kind14, butemit::lower::inputfell through toVal::Missing("a pixel system input"). In addition, console containers can listSV_Coverage(kind == 14) inISG1, whereas DXIL expects pixelSV_Coverageinputs to beNotInSigand read viadx.op.coverage.Fix
crates/victory-shader/src/emit/lower.rs: handleInput::SampleCoverageinLower::inputby emittingdx.op.coverage.i32(opcode91,Attr::ReadNone, no extra arguments) in the entry block.crates/victory-shader/src/emit/mod.rs: strip signature elements withkind == 14from pixelISG1(and the derivedPSV0input signature) inemit.crates/victory-shader/src/emit/mod.rs: addemit::tests::pixel_sample_coverage_input_lowers_and_drops_from_isg1to verify translation andISG1stripping on a synthetic pixel shader readingSPI_PS_INPUT_ADDRbit 14.Verification
cargo test -p victory-shader --locked -- pixel_sample_coverage_input_lowers_and_drops_from_isg1on Windows 11 (NVIDIA RTX 5060 Ti): 1 passed, 0 failed.