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

Open
opened 2026-11-26 21:20:30 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2229
Author: @Tauwni
Created: 11/26/2026
Status: 🔄 Open

Base: main ← Head: docs/kk-nan-constant-fixtures


📝 Commits (1)

  • 2c8949a docs/testing.md: ps_cndmask_sign_mods, ps_valu16_mad_sel and cs_fmt_all on KosmicKrisp are its (NAN) constant printing

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 docs/testing.md (+1 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2229 **Author:** [@Tauwni](https://github.com/Tauwni) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/kk-nan-constant-fixtures` --- ### 📝 Commits (1) - [`2c8949a`](https://github.com/ubiquitarianism/leonida/commit/2c8949a353e8c889333fa77d2607e7279535f20e) docs/testing.md: ps_cndmask_sign_mods, ps_valu16_mad_sel and cs_fmt_all on KosmicKrisp are its (NAN) constant printing ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+1 -0) </details> ### 📄 Description 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#2233
No description provided.