Cover gfx1013 VOP3 reciprocal and reciprocal square root in pixel readback #476

Merged
descent81 merged 1 commit from upstream-pr/482 into main 2026-11-22 06:42:22 +00:00
descent81 commented 2026-11-22 06:33:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by descent81 on 2026-11-22T06:33:03Z.


What the fixture checks

The pixel translator already accepts reciprocal and reciprocal square root. This fixture exercises their e64 encodings with scalar inputs. The same four instructions go through the gfx1013 assemble/disassemble test and the DXC pixel draw.

Operation Input after source modifiers Expected pixel channel
Reciprocal of abs(-4) 4 0.25
Reciprocal of -abs(8) -8 -0.125
Reciprocal square root of abs(-16) 16 0.25
Clamped reciprocal square root of abs(-0.25) 0.25 1.0

The last lane produces 2 before saturation. All expected outputs are exactly representable. As a negative control the test compiles a second shader with the third instruction changed from reciprocal square root to reciprocal. That channel then computes 1/16 instead of 1/4, and the renderer must report a pixel mismatch against the original reference.

Verification

  • Compared the full binary fixture suite on main at e193712 and on this branch with the same LLVM tools and gfx1013 reference. Coverage within that suite increased from 145 to 147 forms, adding v_rcp_f32_e64 and v_rsq_f32_e64 and retaining every previously covered form.
  • Ran the new draw on NVIDIA GeForce RTX 4060 (32.0.16.1088) and Microsoft WARP (10.0.26100.9818). Both matched all 16,384 channels across 4,096 pixels with zero maximum absolute error. Both rejected the mutated shader.
  • Local verification covered the full binary fixture suite and the new draw on both backends. The aggregate dashboard is computed separately by CI.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6539356742 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/482). Originally posted by [descent81](https://github.com/descent81) on 2026-11-22T06:33:03Z. --- ## What the fixture checks The pixel translator already accepts reciprocal and reciprocal square root. This fixture exercises their e64 encodings with scalar inputs. The same four instructions go through the gfx1013 assemble/disassemble test and the DXC pixel draw. | Operation | Input after source modifiers | Expected pixel channel | | --- | ---: | ---: | | Reciprocal of abs(-4) | 4 | 0.25 | | Reciprocal of -abs(8) | -8 | -0.125 | | Reciprocal square root of abs(-16) | 16 | 0.25 | | Clamped reciprocal square root of abs(-0.25) | 0.25 | 1.0 | The last lane produces 2 before saturation. All expected outputs are exactly representable. As a negative control the test compiles a second shader with the third instruction changed from reciprocal square root to reciprocal. That channel then computes 1/16 instead of 1/4, and the renderer must report a pixel mismatch against the original reference. ## Verification - Compared the full binary fixture suite on main at `e193712` and on this branch with the same LLVM tools and gfx1013 reference. Coverage within that suite increased from 145 to 147 forms, adding `v_rcp_f32_e64` and `v_rsq_f32_e64` and retaining every previously covered form. - Ran the new draw on NVIDIA GeForce RTX 4060 (32.0.16.1088) and Microsoft WARP (10.0.26100.9818). Both matched all 16,384 channels across 4,096 pixels with zero maximum absolute error. Both rejected the mutated shader. - Local verification covered the full binary fixture suite and the new draw on both backends. The aggregate dashboard is computed separately by CI.
upstream-sync closed this pull request 2026-11-24 06:43:16 +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!476
No description provided.