Lower gfx1013 add, mul, sqrt, rsq, floor and fract in pixel shader translation #121
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!121
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/121/head"
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?
@PrivacyOnion on GitHub · 2026-11-21 16:36 UTC · original
PrivacyOnion:pixel-aot-alu-ops→main· +58 −15 · 2 files · 1 commits · merged 2026-11-21 17:57 UTCChange
Extends
tools/pixel_aot.pyto lowerv_add_f32,v_mul_f32,v_sqrt_f32,v_rsq_f32,v_floor_f32andv_fract_f32(_e32and_e64, including optionalclamp) intoprecise floatHLSL expressions (+,*,sqrt,rsqrt,floor,frac).tests/pixel_aot_check.pyadds ashaping()program andshaping_case()CPU reference that exercise all six new instructions with bound constant buffer parameters across the 8x8 UNORM ramp, checks LLVM 15exp mrt0comma formatting and arity rejection controls, includesshaping()in thegfx1013binary round-trip check, and verifies D3D12 readback and constant corruption rejection on both hardware and WARP.Verification
Built and verified at
734d09bon Windows 11 with VS Build Tools 2022 17.14 (MSVC 19.44.35228.0), Windows SDK10.0.26100.0, Python3.12, onNVIDIA GeForce RTX 5070(vendor=10de device=2f04, driver32.0.16.1664,debug_layer=enabled) andMicrosoft Basic Render Driver(WARP,vendor=1414 device=008c, driver10.0.26100.9818,debug_layer=enabled):pixel_aot_hardware: passed (pixels=4096 channels=16384 max_absolute_error=0across all 6 draws,debug_errors=0 debug_warnings=0, negative controls rejected).pixel_aot_warp: passed (pixels=4096 channels=16384 max_absolute_error=0across all 6 draws,debug_errors=0 debug_warnings=0, negative controls rejected).Evidence and follow-up
All test inputs are synthetic
gfx1013assembly programs and CPU-computed binary16 round-toward-zero reference cases generated at test time.@R0Y00 on GitHub · 2026-11-21 17:18 UTC · original
The six-instruction fixture looks good. GitHub now reports conflicts with main. Please keep the current select, absolute and dual-texture controls when reconciling pixel_aot_check.py and run the assembled and rendered fixtures. #144 can follow this PR.
@PrivacyOnion on GitHub · 2026-11-21 17:39 UTC · original
Rebased onto
main, keeping theselect,absolute_value, anddual_program(forward,reverse,reuse, swapped bindings, and swapped weights) controls alongsideshapingandshaping_case. Verifiedpixel_aot_hardwareandpixel_aot_warp: