Zebediah Figura : d3dcompiler: Fix matrix dimension declaration and access.

Alexandre Julliard julliard at winehq.org
Thu Apr 30 15:24:08 CDT 2020


Module: wine
Branch: master
Commit: 4952bcfa4cf698ebdc8a67528098010e0d073a64
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4952bcfa4cf698ebdc8a67528098010e0d073a64

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Apr 29 21:54:39 2020 -0500

d3dcompiler: Fix matrix dimension declaration and access.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dcompiler_43/hlsl.y | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index ccabd6d29f..56acd02c55 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -214,7 +214,7 @@ static void declare_predefined_types(struct hlsl_scope *scope)
         {
             for (x = 1; x <= 4; ++x)
             {
-                sprintf(name, "%s%ux%u", names[bt], x, y);
+                sprintf(name, "%s%ux%u", names[bt], y, x);
                 type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_MATRIX, bt, x, y);
                 add_type_to_scope(scope, type);
 
@@ -427,13 +427,13 @@ static struct hlsl_ir_swizzle *get_swizzle(struct hlsl_ir_node *value, const cha
             {
                 if (swizzle[i + 1] != 'm')
                     return NULL;
-                x = swizzle[i + 2] - '0';
-                y = swizzle[i + 3] - '0';
+                y = swizzle[i + 2] - '0';
+                x = swizzle[i + 3] - '0';
             }
             else
             {
-                x = swizzle[i + 1] - '1';
-                y = swizzle[i + 2] - '1';
+                y = swizzle[i + 1] - '1';
+                x = swizzle[i + 2] - '1';
             }
 
             if (x >= value->data_type->dimx || y >= value->data_type->dimy)




More information about the wine-cvs mailing list