Cover v_fract_f32_e64 source modifiers in gfx1013 pixel tests #451

Merged
descent81 merged 1 commit from upstream-pr/457 into main 2026-11-22 05:06:39 +00:00
descent81 commented 2026-11-22 04:53:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by descent81 on 2026-11-22T04:53:36Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6538633625 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/457). Originally posted by [descent81](https://github.com/descent81) on 2026-11-22T04:53:36Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:43:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!451
No description provided.