Skip to content

Commit

Permalink
mat4: wasm simd128 for glm_mat4_inv
Browse files Browse the repository at this point in the history
The function `glm_mat4_inv_wasm` has been implemented, but not used in `glm_mat4_inv`. This commit adds a conditional macro to add the case of wasm and simd128 case for calling `glm_mat4_inv_wasm`.
  • Loading branch information
myfreeer authored Jul 3, 2024
1 parent be0defb commit 07dc952
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/cglm/mat4.h
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,9 @@ glm_mat4_det(mat4 mat) {
CGLM_INLINE
void
glm_mat4_inv(mat4 mat, mat4 dest) {
#if defined( __SSE__ ) || defined( __SSE2__ )
#if defined(__wasm__) && defined(__wasm_simd128__)
glm_mat4_inv_wasm(mat, dest);
#elif defined( __SSE__ ) || defined( __SSE2__ )
glm_mat4_inv_sse2(mat, dest);
#elif defined(CGLM_NEON_FP)
glm_mat4_inv_neon(mat, dest);
Expand Down

0 comments on commit 07dc952

Please sign in to comment.