1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[util] static assert size of Vector4 and Matrix4

This commit is contained in:
Georg Lehmann 2021-04-03 17:21:32 +02:00 committed by Joshie
parent 5d3b130ec8
commit d682ab0402
2 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,8 @@ namespace dxvk {
};
static_assert(sizeof(Matrix4) == sizeof(Vector4) * 4);
inline Matrix4 operator*(float scalar, const Matrix4& m) { return m * scalar; }
Matrix4 transpose(const Matrix4& m);

View File

@ -146,6 +146,9 @@ namespace dxvk {
using Vector4 = Vector4Base<float>;
using Vector4i = Vector4Base<int>;
static_assert(sizeof(Vector4) == sizeof(float) * 4);
static_assert(sizeof(Vector4i) == sizeof(int) * 4);
inline Vector4 replaceNaN(Vector4 a) {
Vector4 result;
__m128 value = _mm_load_ps(a.data);