diff --git a/src/util/util_matrix.h b/src/util/util_matrix.h index 4e386628..98f260f8 100644 --- a/src/util/util_matrix.h +++ b/src/util/util_matrix.h @@ -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); diff --git a/src/util/util_vector.h b/src/util/util_vector.h index 5111a9eb..e7ab5f90 100644 --- a/src/util/util_vector.h +++ b/src/util/util_vector.h @@ -146,6 +146,9 @@ namespace dxvk { using Vector4 = Vector4Base; using Vector4i = Vector4Base; + 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);