Fix ARM half conversion in PackTiles - #25
Open
gripeyes wants to merge 1 commit into
Open
Conversation
Signed-off-by: Jakub Svoboda <132791205+rolledhand@users.noreply.github.com>
This was referenced Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compatibility:
patch
Issues/Tickets:
Render AOVs from Hou on Silicon macOS contained NaN without this fix, this fix got it working.
Release notes comment:
Fixed scalar half-float packet conversion in PackTiles on Apple Silicon.
Comments for the reviewer:
The previous ARM/NEON implementation used vector load/store intrinsics with scalar addresses, which could corrupt H16 packet values. This change converts through scalar
__fp16values and usesstd::memcpyto preserve the exact 16-bit representation.This was the low-level packet conversion issue identified during an earlier Apple Silicon native AOV investigation:
OpenMoonRay/hdMoonray@c7bbd30...4234f27
The separate hdMoonray render-buffer allocation change from that investigation is intentionally excluded from this PR. The PackTiles correction is independent and should persist regardless of whether the related hdMoonray change is adopted.
Look or scene setup change:
No scene setup changes are required. On Apple Silicon, render outputs previously affected by corrupted H16 packet conversion may now contain the intended values.
Special notes for production:
The changed code path is limited to ARM/NEON builds. The existing non-ARM conversion path is unchanged.
Attention/Reviewers:
AI Assisted Development:
Assisted-by: OpenAI Codex / GPT-5.6
Checklist:
No documentation, unit-test, or RATS changes are included in this narrowly scoped correction.