mirror of
https://github.com/recp/cglm.git
synced 2025-12-25 12:55:04 +00:00
helper fn for duplicating matrix4
This commit is contained in:
@@ -20,6 +20,22 @@
|
||||
|
||||
#define GLM_MAT4_IDENTITY (mat4)GLM_MAT4_IDENTITY_INIT
|
||||
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_mat4_dup(mat4 mat, mat4 dest) {
|
||||
#ifdef __AVX__
|
||||
_mm256_store_ps(dest[0], _mm256_load_ps(mat[0]));
|
||||
_mm256_store_ps(dest[2], _mm256_load_ps(mat[2]));
|
||||
#elif defined( __SSE__ ) || defined( __SSE2__ )
|
||||
_mm_store_ps(dest[0], _mm_load_ps(mat[0]));
|
||||
_mm_store_ps(dest[1], _mm_load_ps(mat[1]));
|
||||
_mm_store_ps(dest[2], _mm_load_ps(mat[2]));
|
||||
_mm_store_ps(dest[3], _mm_load_ps(mat[3]));
|
||||
#else
|
||||
glm__memcpy(float, dest, mat, sizeof(mat4));
|
||||
#endif
|
||||
}
|
||||
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_mat4_mul(mat4 l, mat4 r, mat4 d) {
|
||||
|
||||
Reference in New Issue
Block a user