Shaders: ignore missing prior values on v_fma_mixlo_f16 and v_fma_mixhi_f16 #56
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/56"
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 Zettrox/ztrx. Originally posted by IAmTheSween on 2026-11-25T06:39:33Z.
Fixes all 8 deferred pixel shaders failing in
emitwith"the first half of an interpolation"(including38bf0814e721a1b3and78f3f2fc53a69531named in #38).Cause
When a
v_interp_p1ll_f16/v_interp_p2_f16pair uses loaded barycentrics, the first half evaluates as aVal::Missing("the first half of an interpolation")placeholder becausev_interp_p2_f16lowers the interpolation directly and writes the interpolated value to its own destination. In the deferred pixel shaders, the register allocator then reuses the first half's dead register as the destination ofv_fma_mixlo_f16(0x290in38bf0814e721a1b3). Unlikewrite_halfandlow_half, thev_fma_mixlo_f16/v_fma_mixhi_f16path propagatedself.i32_of(o)?on the prior register contents when merging the untouched half, carrying the placeholder forward to color exportmrt1.What is in it
crates/victory-shader/src/emit/lower.rs: extractsLower::place_half(merging the written 16-bit half with the prior register contents, or0if unlowered/unpreserved) and uses it inv_fma_mixlo_f16/v_fma_mixhi_f16,write_half, andlow_half.crates/victory-shader/src/emit/mod.rs: adds regression testmixed_f16_write_over_interp_first_half_lowers_and_validatescovering bothv_fma_mixlo_f16andv_fma_mixhi_f16overwriting deadv_interp_p1ll_f16destination registers, validated againstdxil.dll.Shader pack check
Checked all 8
"the first half of an interpolation"pixel shaders in the title's shader pack (victory.exe translate --validate --list):dxil.dllvalidation (10.0.26100.0) with 0 remaining"the first half of an interpolation"failures (5ddcaa08d4a51215,464ea474374b8ecd,38bf0814e721a1b3,007bb29b393d08c5,8445dcb2b63aa197,288c43f50bc7abee,78f3f2fc53a69531,15547db9d31b056b).38bf0814e721a1b3(1 emitted, 1 validated, 1 pipelines).Tested
dxil.dll10.0.26100.0.cargo clippy --workspace --all-targets --locked -- -D warnings: passed (0 warnings).cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed (0 warnings).cargo test --workspace --locked -- --test-threads=1: all suites passed with 0 failures (victory1,victory_core11,victory_formats24 / 4 ignored,victory_game2,victory_gpu110 / 1 ignored,victory_hle95 +no_dll_planting1,victory_loader24 +load_probe2 +title_dlls1,victory_pe7,victory_pipeline4,victory_shader211 / 2 ignored,xtask4). Single-threaded execution was used for the full workspace run due to pre-existing WARP device contention whenvictory_gpuGPU tests run concurrently (valu_tests.rs:198).AI use
Written with Antigravity.
Imported from Zettrox/ztrx. Originally posted by carlosmegino on 2026-11-25T10:19:42Z.
Independent local validation of commit
9fe511eb77fa1220bacf05c20e1854fe1dc8861con Windows 11 x64, i7-8700K, RTX 5070 Ti, driver 621.01, Rust 1.98.1, Windows SDK 10.0.26100.0 (dxil.dll1.9.2602.17).Unsupported: the first half of an interpolation. With the complete original patch, the regression passes.--validate --pipelines --list --jobs 2andVICTORY_HOST_MAX_WAVE=32. The exact preserved90b529f878a470fec9bf07b7be316bc769a12232diagnostic executable emitted 0/8 (all eight failed at the interpolation check). The patched build emitted 8/8, validated 8/8 and created 8/8 test pipelines on the default hardware D3D12 device; WARP was not enabled.cargo test -p victory-shader --all-features --locked -- --test-threads=1: 211 passed, 0 failed, 2 ignored.cargo test --workspace --locked -- --test-threads=1: 497 passed, 0 failed, 7 ignored.The tested local stack also contains opt-in telemetry and a diagnostics input helper; neither changes shader lowering or graphics defaults. The original patch was cherry-picked with its author and source commit retained. Logs, shader bytes and game-derived material remain local.
These are translator/validator/test-pipeline results. The pipeline harness uses generated companion stages/default state; actual title PSOs, rendered correctness and gameplay FPS still require runtime validation. The translation CLI exits zero even for individual shader failures, so the comparison checks its counters rather than only its exit code.
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.