shader: lower one-source binary32 math in the depth mask translator #1295
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1302"
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 tedin7 on 2026-11-24T07:21:16Z.
Change
tools/depth_mask_aot.pynow lowersv_rcp_f32_e32,v_rsq_f32_e32,v_sqrt_f32_e32,v_floor_f32_e32,v_trunc_f32_e32andv_rndne_f32_e32(to1.0f / x,rsqrt,sqrt,floor,trunc,round). Source modifiers, clamp, output modifiers, a second source and the e64 encodings still reject translation.v_fract_f32_e32is unchanged (already NaN-safe). Precision of rcp/rsq/sqrt is not claimed; NaN, infinity, denormals, signed zero and zero or negative operands of rsq/sqrt are not exercised. Twin of the mesh entry change (#1202). AI-assisted.Verification
python3 -B tests/depth_mask_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so.1: passes with this change; on origin/main the same new test fails withUnsupported depth instruction: v_rcp_f32_e32. LLVM 15 was not available locally.depth_mask_unary_draw_*(unarymode) is a WARP readback against an independent Python reference: the approximate forms get inputs with integer exact results, through a runtime zero, rounded before use; floor/trunc/rndne are compared exactly. Every other form's reference must fail on exactly the differing pixels. Not run on Linux; it is outside--preset pr:ctest --preset dev -R "^depth_mask_unary_draw_".Evidence and follow-up
Fixtures are synthetic. No WARP readback has been run yet.
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:25:35Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207, D3D12 WARP) at
1c3dd0ad:--preset dev):ctest --preset dev -R "^depth_mask_.*_warp$"— 4/4 PASS (2.82s, includingdepth_mask_unary_draw_warp2.69s)/O2(--preset release):ctest --preset release -R "^depth_mask_.*_warp$"— 4/4 PASS (2.71s, build0.96s, includingdepth_mask_unary_draw_warp2.63s)Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T07:25:42Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
1c3dd0aℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.