shader: map inline binary16 float constants in v_floor/ceil/trunc/rndne_f16 #3320

Closed
opened 2026-11-28 09:39:26 +00:00 by github-bot · 0 comments
Owner

@⁠R0D4X on GitHub · 2026-11-28 09:28 UTC · original

Refs #2935.

Fix inline float constant handling (src0 in 240..248) in v_floor_f16, v_ceil_f16, v_trunc_f16, and v_rndne_f16 in src/gfx1013_direct_compute.inl by mapping through inline_half_words[r - 240] instead of taking the low 16 bits of the f32 pattern (which read 0.5, 1.0, 2.0, 4.0, and their negatives as 0x0000), add if (graphics_input) return false;, tighten the CMake target guard, and add inline-constant hardware and control tests to tests/native_round_f16_check.py.

I am taking this slice.

**@⁠R0D4X** on GitHub · 2026-11-28 09:28 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3318) Refs #2935. Fix inline float constant handling (`src0` in `240..248`) in `v_floor_f16`, `v_ceil_f16`, `v_trunc_f16`, and `v_rndne_f16` in `src/gfx1013_direct_compute.inl` by mapping through `inline_half_words[r - 240]` instead of taking the low 16 bits of the f32 pattern (which read `0.5`, `1.0`, `2.0`, `4.0`, and their negatives as `0x0000`), add `if (graphics_input) return false;`, tighten the CMake target guard, and add inline-constant hardware and control tests to `tests/native_round_f16_check.py`. I am taking this slice.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 09:39:26 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3320
No description provided.