Cover v_fract_f32_e64 source modifiers in gfx1013 pixel tests #457

Manually merged
github merged 1 commit from gh-pr/457/head into gh-pr/457/base 2026-11-26 21:53:27 +00:00
Owner

@⁠descent81 on GitHub · 2026-11-22 04:53 UTC · original
descent81:shader/coverage-fract-e64 → main · +14 −4 · 2 files · 1 commits · merged 2026-11-22 05:06 UTC

Summary

The existing pixel readback test covers v_fract_f32_e32, including the case where a tiny negative input makes the fractional result round up to 1.0 before clamping. This change keeps that boundary check and uses two other output channels to exercise v_fract_f32_e64 with absolute-value and negate-absolute-value source modifiers.

The binary test assembles the same fixture for gfx1013, disassembles the emitted machine code, and checks that lowering the decoded instructions produces the same HLSL as lowering the source fixture.

What the readback distinguishes

Source operand Register value Value passed to fract Expected output Output if the modifier is ignored
abs(s45) -0.25 0.25 0.25 0.75
-abs(s46) 2.75 -2.75 0.25 0.75

Both expected values are exactly representable. The two e32 channels continue to check the clamp boundary at -2^-30 and a nearby input, -2^-23, whose fractional result stays below the clamp. The existing negative control still requires a pixel mismatch when the reference expects 1.0 at the clamp boundary.

Coverage and validation

  • Compared the gfx1013 forms accepted by the binary fixture suite before and after the change. The count increased from 144 to 145. The only addition was VOP3 / v_fract_f32_e64, and all 144 previously covered forms were retained.
  • Ran the updated fract draw on an NVIDIA GeForce RTX 4060 and on WARP. Each backend checked 4,096 pixels with zero maximum absolute error and detected the deliberately incorrect clamp reference.
  • The full WARP pixel test passed under CTest. The full RTX 4060 pixel test exceeded the local 60-second CTest timeout and passed when rerun directly without that limit.

The coverage count above is scoped to the binary fixture suite. The aggregate dashboard is generated separately by CI.

**@⁠descent81** on GitHub · 2026-11-22 04:53 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/457) `descent81:shader/coverage-fract-e64` → `main` · +14 −4 · 2 files · 1 commits · merged 2026-11-22 05:06 UTC ## Summary The existing pixel readback test covers `v_fract_f32_e32`, including the case where a tiny negative input makes the fractional result round up to 1.0 before clamping. This change keeps that boundary check and uses two other output channels to exercise `v_fract_f32_e64` with absolute-value and negate-absolute-value source modifiers. The binary test assembles the same fixture for gfx1013, disassembles the emitted machine code, and checks that lowering the decoded instructions produces the same HLSL as lowering the source fixture. ## What the readback distinguishes | Source operand | Register value | Value passed to fract | Expected output | Output if the modifier is ignored | | --- | ---: | ---: | ---: | ---: | | `abs(s45)` | -0.25 | 0.25 | 0.25 | 0.75 | | `-abs(s46)` | 2.75 | -2.75 | 0.25 | 0.75 | Both expected values are exactly representable. The two e32 channels continue to check the clamp boundary at `-2^-30` and a nearby input, `-2^-23`, whose fractional result stays below the clamp. The existing negative control still requires a pixel mismatch when the reference expects 1.0 at the clamp boundary. ## Coverage and validation - Compared the gfx1013 forms accepted by the binary fixture suite before and after the change. The count increased from **144 to 145**. The only addition was `VOP3 / v_fract_f32_e64`, and all 144 previously covered forms were retained. - Ran the updated fract draw on an NVIDIA GeForce RTX 4060 and on WARP. Each backend checked 4,096 pixels with zero maximum absolute error and detected the deliberately incorrect clamp reference. - The full WARP pixel test passed under CTest. The full RTX 4060 pixel test exceeded the local 60-second CTest timeout and passed when rerun directly without that limit. The coverage count above is scoped to the binary fixture suite. The aggregate dashboard is generated separately by CI.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:53:27 +00:00
github manually merged commit c4716a9ea7 into gh-pr/457/base 2026-11-26 21:53:27 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.