g-truc / glm

OpenGL Mathematics (GLM)
https://glm.g-truc.net
Other
9.35k stars 2.14k forks source link

Fix build error with GLM_FORCE_INTRINSICS and NEON #1311

Open alusch opened 2 months ago

alusch commented 2 months ago

We have a project using GLM_FORCE_INTRINSICS that builds on Apple ARM-based platforms. When attempting to update GLM, I saw some build breaks because the NEON compute_vec_nequal implementation was missing a template parameter on its call to compute_vec_equal.

I didn't see a test exercising GLM_FORCE_INTRINSICS, so I added core_force_intrinsics that's currently just a copy of core_force_pure but with a different define. I wasn't sure what a good scope for that test would be, so I'm happy to cut it down or otherwise alter it if that's preferred (or refactor to share code between them).

The test did indeed reproduce the build failure, as well as a warning promoted to an error about an unused variable. With these changes, all tests now build and pass on my M1 Mac.

kevinpruvost commented 1 month ago

much needed !