Open JesseRMeyer opened 1 year ago
AMD/Intel can compute abs
in several ways.
https://stackoverflow.com/questions/32408665/fastest-way-to-compute-absolute-value-using-sse
ARM has a SIMD operation for it for floats, apparently. https://developer.arm.com/documentation/ddi0596/2021-12/SIMD-FP-Instructions/ABS--Absolute-value--vector--
The proposed builtin would leverage SIMD to compute the abs(). This would allow translating more shaders to Odin to 'just work', and operate more optimally.
If this feature request is accepted and implemented, I envision a wider set of built-ins that act similarly, designed specifically to aid shader-like (for a lack of a better description) Odin.
(credit: @Kelimion for the idea)