Added missing SIMD implementations
This commit is contained in:
parent
316b4befae
commit
a511553d8e
@ -134,6 +134,13 @@ namespace glm
|
|||||||
{
|
{
|
||||||
typedef detail::fmat4x4SIMD simd_mat4;
|
typedef detail::fmat4x4SIMD simd_mat4;
|
||||||
|
|
||||||
|
//! Multiply matrix x by matrix y component-wise, i.e.,
|
||||||
|
//! result[i][j] is the scalar product of x[i][j] and y[i][j].
|
||||||
|
//! (From GLM_GTX_simd_mat4 extension).
|
||||||
|
detail::fmat4x4SIMD simd_matrixCompMult(
|
||||||
|
detail::fmat4x4SIMD const & x,
|
||||||
|
detail::fmat4x4SIMD const & y);
|
||||||
|
|
||||||
//! Returns the transposed matrix of x
|
//! Returns the transposed matrix of x
|
||||||
//! (From GLM_GTX_simd_mat4 extension).
|
//! (From GLM_GTX_simd_mat4 extension).
|
||||||
detail::fmat4x4SIMD simd_transpose(detail::fmat4x4SIMD const & m);
|
detail::fmat4x4SIMD simd_transpose(detail::fmat4x4SIMD const & m);
|
||||||
|
@ -237,13 +237,18 @@ namespace detail
|
|||||||
namespace gtx{
|
namespace gtx{
|
||||||
namespace simd_mat4
|
namespace simd_mat4
|
||||||
{
|
{
|
||||||
inline detail::fmat4x4SIMD matrixCompMult
|
inline detail::fmat4x4SIMD simd_matrixCompMult
|
||||||
(
|
(
|
||||||
detail::fmat4x4SIMD const & x,
|
detail::fmat4x4SIMD const & x,
|
||||||
detail::fmat4x4SIMD const & y
|
detail::fmat4x4SIMD const & y
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//GLM_STATIC_ASSERT(0, "TODO");
|
detail::fmat4x4SIMD result;
|
||||||
|
result[0] = x[0] * y[0];
|
||||||
|
result[1] = x[1] * y[1];
|
||||||
|
result[2] = x[2] * y[2];
|
||||||
|
result[3] = x[3] * y[3];
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline detail::fmat4x4SIMD simd_transpose(detail::fmat4x4SIMD const & m)
|
inline detail::fmat4x4SIMD simd_transpose(detail::fmat4x4SIMD const & m)
|
||||||
@ -255,7 +260,9 @@ namespace simd_mat4
|
|||||||
|
|
||||||
inline float simd_determinant(detail::fmat4x4SIMD const & m)
|
inline float simd_determinant(detail::fmat4x4SIMD const & m)
|
||||||
{
|
{
|
||||||
//GLM_STATIC_ASSERT(0, "TODO");
|
float Result;
|
||||||
|
_mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data));
|
||||||
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline detail::fmat4x4SIMD simd_inverse(detail::fmat4x4SIMD const & m)
|
inline detail::fmat4x4SIMD simd_inverse(detail::fmat4x4SIMD const & m)
|
||||||
|
@ -274,6 +274,8 @@ int main()
|
|||||||
Failed += test_compute_glm();
|
Failed += test_compute_glm();
|
||||||
Failed += test_compute_gtx();
|
Failed += test_compute_gtx();
|
||||||
|
|
||||||
|
float Det = glm::simd_determinant(glm::simd_mat4(1.0));
|
||||||
|
glm::simd_mat4 B = glm::simd_matrixCompMult(glm::simd_mat4(1.0), glm::simd_mat4(1.0));
|
||||||
|
|
||||||
system("pause");
|
system("pause");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user