shader: complete gfx1013 floating-point comparison predicate coverage #157

Merged
descent81 merged 1 commit from upstream-pr/158 into main 2026-11-21 17:48:10 +00:00
descent81 commented 2026-11-21 17:46:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by descent81 on 2026-11-21T17:46:05Z.


The pixel translator already handled 14 FP32 comparison predicates. This adds the always-false and always-true forms and checks all 16 against an independent four-bit truth table.

Four source-built shaders export four predicate results each. Inputs cover less, signed-zero equality, greater, and a quiet NaN on either side. Changing the NaN operand to an equal finite value while keeping the unordered reference produces the expected pixel mismatch.

Validation on base 50b0c81: all four fixtures round-tripped through the LLVM 15 gfx1013 assembler and disassembler. Both pixel_aot_hardware (RTX 4060) and pixel_aot_warp passed. Windows build 26300.9974, NVIDIA 610.88.

Reproduce after a dev build:

ctest --preset dev --no-tests=error -R '^pixel_aot_(warp|hardware)$' -V
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6532301425 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/158). Originally posted by [descent81](https://github.com/descent81) on 2026-11-21T17:46:05Z. --- The pixel translator already handled 14 FP32 comparison predicates. This adds the always-false and always-true forms and checks all 16 against an independent four-bit truth table. Four source-built shaders export four predicate results each. Inputs cover less, signed-zero equality, greater, and a quiet NaN on either side. Changing the NaN operand to an equal finite value while keeping the unordered reference produces the expected pixel mismatch. Validation on base `50b0c81`: all four fixtures round-tripped through the LLVM 15 gfx1013 assembler and disassembler. Both `pixel_aot_hardware` (RTX 4060) and `pixel_aot_warp` passed. Windows build 26300.9974, NVIDIA 610.88. Reproduce after a dev build: ```powershell ctest --preset dev --no-tests=error -R '^pixel_aot_(warp|hardware)$' -V ```
upstream-sync closed this pull request 2026-11-24 06:41:36 +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!157
No description provided.