Page MenuHome

Cycles: add more math functions for float4
ClosedPublic

Authored by Andrii Symkin (pembem22) on Jun 29 2022, 11:38 AM.

Details

Summary

This patch adds more math functions for float4 to make them on par with float3 ones. It makes it possible to change the types of float3 variables to float4 without additional work.

Tested on CPU and CUDA.

Diff Detail

Repository
rB Blender
Branch
cycles-add-float4-functions
Build Status
Buildable 22768
Build 22768: arc lint + arc unit

Event Timeline

Andrii Symkin (pembem22) requested review of this revision.Jun 29 2022, 11:38 AM
Andrii Symkin (pembem22) created this revision.
Andrii Symkin (pembem22) added a reviewer: Cycles.
Andrii Symkin (pembem22) edited the summary of this revision. (Show Details)
  • Fix compilation errors with NEON and SSE3
Brecht Van Lommel (brecht) requested changes to this revision.Jun 29 2022, 3:59 PM

For the Metal errors, you can pass by value instead of by reference, makes no difference as this is inlined anyway.

And for extracing a float from _m128 , you can use _mm_cvtss_f32(a) instead of a.x.

This revision now requires changes to proceed.Jun 29 2022, 3:59 PM
  • Fix compilation errors with Metal and SSE
This revision is now accepted and ready to land.Jun 30 2022, 4:22 PM