docs/testing.md: three more KosmicKrisp failures from its (NAN) constant printing #2229

Open
github-bot wants to merge 2 commits from github-bot/gh-2229 into main AGit
Owner

@⁠Tauwni on GitHub · 2026-11-26 08:27 UTC · original
Tauwni:docs/kk-nan-constant-fixtures → main · +1 −0 · 1 files · 2 commits · draft

Three fixtures fail on a Mac with KosmicKrisp and pass with MoltenVK 1.4.2 and llvmpipe on the same machine: ps_cndmask_sign_mods, ps_valu16_mad_sel and cs_fmt_all (word 293). I reported them in #1608 without a cause. This PR adds a row to the Known problems table in docs/testing.md, docs only.

The cause is the (NAN) constant printing that the cs_bvh and RGBA32F rows already describe, and it is still in Mesa main. emit_src_component in src/kosmickrisp/compiler/msl_type_inference.c writes every float-typed NaN constant as (NAN), so its payload and sign are lost. MESA_KK_DEBUG=msl on an Apple M3 (macOS 26.5.1, Mesa 26.3.1, main a73a57e13) shows where each one comes from:

Fixture What KosmicKrisp emits Read back Expected
ps_cndmask_sign_mods NIR folds the export to float4((NAN), (NAN), float(-1.40129846432481707e-45), (NAN)) 0x7fc00000 0x7fc00000 0x80000001 0x7fc00000 0xff800001 0x7f800001 0x80000001 0x7f800001
ps_valu16_mad_sel the export folds to float4(..., (NAN), float(-0.0)) channel 2 0x7fc00000 0xffffffff
cs_fmt_all as_type<uint>(float((NAN))) for the input 0x7f800001 of a 16-bit float store word 293 0x80007e00 0x80007c01

The row says the failures are expected with KosmicKrisp and that the expected words should not be weakened, as the cs_bvh row does. The translator is not changed.

AI-assisted (Claude Code). No game data.

🤖 Generated with Claude Code

**@⁠Tauwni** on GitHub · 2026-11-26 08:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2229) `Tauwni:docs/kk-nan-constant-fixtures` → `main` · +1 −0 · 1 files · 2 commits · draft Three fixtures fail on a Mac with KosmicKrisp and pass with MoltenVK 1.4.2 and llvmpipe on the same machine: `ps_cndmask_sign_mods`, `ps_valu16_mad_sel` and `cs_fmt_all` (word 293). I reported them in #1608 without a cause. This PR adds a row to the Known problems table in `docs/testing.md`, docs only. The cause is the `(NAN)` constant printing that the `cs_bvh` and RGBA32F rows already describe, and it is still in Mesa `main`. `emit_src_component` in `src/kosmickrisp/compiler/msl_type_inference.c` writes every `float`-typed NaN constant as `(NAN)`, so its payload and sign are lost. `MESA_KK_DEBUG=msl` on an Apple M3 (macOS 26.5.1, Mesa 26.3.1, `main` `a73a57e13`) shows where each one comes from: | Fixture | What KosmicKrisp emits | Read back | Expected | |---|---|---|---| | `ps_cndmask_sign_mods` | NIR folds the export to `float4((NAN), (NAN), float(-1.40129846432481707e-45), (NAN))` | `0x7fc00000 0x7fc00000 0x80000001 0x7fc00000` | `0xff800001 0x7f800001 0x80000001 0x7f800001` | | `ps_valu16_mad_sel` | the export folds to `float4(..., (NAN), float(-0.0))` | channel 2 `0x7fc00000` | `0xffffffff` | | `cs_fmt_all` | `as_type<uint>(float((NAN)))` for the input `0x7f800001` of a 16-bit float store | word 293 `0x80007e00` | `0x80007c01` | The row says the failures are expected with KosmicKrisp and that the expected words should not be weakened, as the `cs_bvh` row does. The translator is not changed. AI-assisted (Claude Code). No game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:22:58 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2229/head:github-bot/gh-2229'
git switch 'github-bot/gh-2229'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2229'
git switch 'github-bot/gh-2229'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2229'
git switch 'github-bot/gh-2229'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2229'
git switch 'main'
git merge --squash 'github-bot/gh-2229'
git switch 'main'
git merge --ff-only 'github-bot/gh-2229'
git switch 'main'
git merge 'github-bot/gh-2229'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.