shader: lower gfx1013 floating-point ceiling #266
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/270"
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 lambirou on 2026-11-21T19:52:57Z.
Change
Lower
v_ceil_f32to HLSLceilfor the gfx1013 straight-line pixel path. The e32 and e64 encodings use the existing floating-point operand and output handling. A ceiling write into a pending texture sample destination is rejected beforevmcnt(0).Related work in #258 covers
v_trunc_f32. Both patches touch the floating-point ALU dispatch intools/pixel_aot.pyand can be reviewed independently.Verification
Tested commit
275043a92b144d00663ad041c1c5b68c8d2e5ff3on7233cecc0efea32e0dba55c3d2e66227b09b8a86using Windows 11 build 26300.10075, MSVC 14.44.35207 and Windows SDK DXC 10.0.26100.0.bvh_wave64_warpandwave_shuffle_warp). Both Python checks passed.git diff --check origin/main HEADpassed.Evidence and follow-up
The original MIT-licensed fixture uses synthetic shader source and constants and checks the four rendered channels against a Python reference. It covers negative and positive fractions, integral inputs, signed zero and e64 absolute value, negation and clamp. Before the lowering change, the fixture stopped at
Unsupported instruction 20: v_ceil_f32_e32 v12, s44. The ceiling-to-floor control reportspixel_mismatch, and the early destination write is rejected. The experiment and its reproduction commands are indocs/experiments.md. AMD RDNA 2 ISA referenceChecklist
This contribution was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T20:28:18Z.
275043aconflicts intests/pixel_aot_check.pyandtools/pixel_aot.py. #273 now supplies the pending-sample destination guard for the whole arithmetic path. Please retain that guard andfract32while addingceil, then rerun the pixel and LLVM checks.