Zebediah Figura : d3dcompiler: Fix matrix dimension declaration for matrix<...> syntax.

Alexandre Julliard julliard at winehq.org
Fri Jun 5 14:16:51 CDT 2020


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Jun  3 21:06:53 2020 -0500

d3dcompiler: Fix matrix dimension declaration for matrix<...> syntax.

Addendum to 4952bcfa4cf.

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            | 2 +-
 dlls/d3dcompiler_43/tests/hlsl_d3d9.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index 1797996ddb..820352b046 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -1866,7 +1866,7 @@ type:                     base_type
                                     YYABORT;
                                 }
 
-                                $$ = new_hlsl_type(NULL, HLSL_CLASS_MATRIX, $3->base_type, $5, $7);
+                                $$ = new_hlsl_type(NULL, HLSL_CLASS_MATRIX, $3->base_type, $7, $5);
                             }
 
 base_type:
diff --git a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c
index c8cf86d05c..059f39e4c3 100644
--- a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c
+++ b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c
@@ -897,9 +897,10 @@ static void test_constant_table(void)
         "uniform float2 g[5];\n"
         "uniform matrix_t i;\n"
         "uniform struct matrix_record j;\n"
+        "uniform matrix<float,3,1> k;\n"
         "float4 main(uniform float4 h) : COLOR\n"
         "{\n"
-        "    return a + b + c._31 + d._31 + f.d._22 + g[e].x + h + i._33 + j.a._33;\n"
+        "    return a + b + c._31 + d._31 + f.d._22 + g[e].x + h + i._33 + j.a._33 + k._31;\n"
         "}";
 
     D3DXCONSTANTTABLE_DESC table_desc;
@@ -923,6 +924,7 @@ static void test_constant_table(void)
         {"g", D3DXRS_FLOAT4, 0, 5, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 2, 5, 0, 40},
         {"i", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 3, 1, 0, 36},
         {"j", D3DXRS_FLOAT4, 0, 3, D3DXPC_STRUCT, D3DXPT_VOID, 1, 9, 1, 1, 36},
+        {"k", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12},
     };
 
     static const D3DXCONSTANT_DESC expect_fields_f[] =




More information about the wine-cvs mailing list