shader: cover four v_mad_legacy_f32 and literal multiply-add lowerings #654
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/660"
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 R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-22T18:16:40Z.
Change
This closes four coverage gaps in the
v_mad_legacy_f32and literal multiply-add lowering oftools/pixel_aot.py. Each was a one-line mutation of the translator that passed every WARP test onmain. Onlytests/pixel_aot_check.pychanges (19 added, 4 removed lines); the translator does not.check_legacy_multiply_add_drawsfirst draws one edge program, withs44..s47=-0.0, +inf, NaN, -1.0:v_mad_legacy_f32 v12, s44, s45, 1.0(-0.0 * +inf + 1.0)v_mad_legacy_f32 v13, s46, 1.0, 1.0(NaN * 1.0 + 1.0)v_madak_f32 v14, s44, v19, 0x3f400000v_mad_legacy_f32 v15, 1.0, |v19|, 0.0withv19 = -1.0|src1|loses its abs modifierThen the original program is translated and compiled again, and the existing draws run unchanged. The inner case writer is renamed to
write_legacy_case, so the module-levelwrite_case(which takesnan_mask) is reachable from this function.Verification
On
efd2ea0(branch on7009a7e), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14, WARP:All 293 tests pass.
Each mutation was applied to
tools/pixel_aot.pyone at a time, and all WARP tests were run. Onmain, all of them passed for each mutation. A control that subtracted the addend inmad_legacywas caught bypixel_aot_predicate_rounding_warp, so the run does detect a broken translator. On this branch, each of the four mutations failspixel_aot_predicate_rounding_warp.Checklist
AI-assisted.