Skip to content

Fix ARM half conversion in RenderOutputWriter - #36

Open
gripeyes wants to merge 1 commit into
OpenMoonRay:mainfrom
gripeyes:fix/arm-half-render-output
Open

Fix ARM half conversion in RenderOutputWriter#36
gripeyes wants to merge 1 commit into
OpenMoonRay:mainfrom
gripeyes:fix/arm-half-render-output

Conversation

@gripeyes

Copy link
Copy Markdown

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 conversion in RenderOutputWriter on Apple Silicon.

Comments for the reviewer:

The previous ARM/NEON implementation used vector load/store intrinsics with scalar addresses. This change converts through scalar __fp16 values and uses std::memcpy to preserve the exact 16-bit representation.

This is one part of 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. This PR retains only the independent low-level Apple Silicon half-conversion correction.

Look or scene setup change:

No scene setup changes are required. On Apple Silicon, outputs previously affected by incorrect half-float 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:

  • Documentation has been updated.
  • Includes new unit tests.
  • Includes new RATS tests.

No documentation, unit-test, or RATS changes are included in this narrowly scoped correction.

Signed-off-by: Jakub Svoboda <132791205+rolledhand@users.noreply.github.com>
@gripeyes

Copy link
Copy Markdown
Author

Also mentioning this one since they're both related:
OpenMoonRay/scene_rdl2#25

Please let me know if this makes sense and if PRs like this are expected/ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant