mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #1212] rdna2spirv: keep NaN-pattern constants out of float-typed selects in image_bvh (OLD-9868) #1244
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1244
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1212
Author: @ambroseautomation
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:carry/old-9868-bvh-nan-select📝 Commits (4)
d01324crdna2spirv: keep NaN-pattern constants out of float-typed selects in image_bvh (#6623)d243053test_image_bvh_tri: a NaN vertex with a payload returns the canonical NaN words (#6623)fc1fadbtest_image_bvh_tri: one blank line between methods82fde44test_image_bvh_tri: no select pairs the NaN or miss constant with a computed word📊 Changes
2 files changed (+52 additions, -3 deletions)
View changed files
📝
tests/semantic/test_image_bvh_tri.py(+31 -1)📝
tools/rdna2spirv.py(+21 -2)📄 Description
Claimed in the coordination issue as: OLD-9868 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143233478)
What and why
Carries forward
old-pr/9868(draft #137, originally authored byConrage, all 4 original commits preserved; indexed in #17), rebased cleanly onto currentmain.Keeps NaN-pattern integer constants (
0xFFFFFFFFbox-miss and0xFFC00000canonical NaN) out of float-typedOpSelectinstructions inimage_bvh*_intersect_raylowering (tools/rdna2spirv.py):(x & keep) | (k & pick)(usel_k) wherekeep/pickselect between two integer constants, preventing drivers like KosmicKrisp (Mesa 26.3.1) from typing the select as float and emitting(NAN)(0x7FC00000) instead of0xFFFFFFFF/0xFFC00000.tests/semantic/test_image_bvh_tri.pyverifying canonical NaN payload handling and asserting that noOpSelectpairs the NaN/miss constants with a computed word.Tested
python -m unittest discover -s tests/semantic -p test_image_bvh_tri.py -v: 9 tests, OK.python -I scripts/run_semantic_tests.py tests/semantic: 470 files, 6,170 tests, 0 files failed.python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_image_bvh_tri.py: exit 0 (no game data).GPUs tested: n/a (CPU SPIR-V interpreter semantic suite on Windows 11 Pro 64-bit, Python 3.12.10)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a — preserves identical integer words for existingimage_bvhlowering)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.