Giovanni Mascellani : vkd3d-shader/hlsl: Fix type comparison for column-major matrices.

Alexandre Julliard julliard at winehq.org
Tue Sep 28 16:01:44 CDT 2021


Module: vkd3d
Branch: master
Commit: 859f80930d4f30cb1dc27d80734672134f4b4ffe
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=859f80930d4f30cb1dc27d80734672134f4b4ffe

Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date:   Mon Sep 27 14:50:57 2021 +0200

vkd3d-shader/hlsl: Fix type comparison for column-major matrices.

Previously hlsl_types_are_equal considered two matrices of different
type if one of those had an explicit column-major modifier while the
other didn't have any (in which case the matrix is still considered
column-major by default).

Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d-shader/hlsl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
index 8a2286c..30098ea 100644
--- a/libs/vkd3d-shader/hlsl.c
+++ b/libs/vkd3d-shader/hlsl.c
@@ -327,8 +327,8 @@ bool hlsl_types_are_equal(const struct hlsl_type *t1, const struct hlsl_type *t2
         return false;
     if (t1->base_type == HLSL_TYPE_SAMPLER && t1->sampler_dim != t2->sampler_dim)
         return false;
-    if ((t1->modifiers & HLSL_MODIFIERS_MAJORITY_MASK)
-            != (t2->modifiers & HLSL_MODIFIERS_MAJORITY_MASK))
+    if ((t1->modifiers & HLSL_MODIFIER_ROW_MAJOR)
+            != (t2->modifiers & HLSL_MODIFIER_ROW_MAJOR))
         return false;
     if (t1->dimx != t2->dimx)
         return false;




More information about the wine-cvs mailing list