Giovanni Mascellani : vkd3d-shader/hlsl: Parse matrix and vector types without parameters.

Alexandre Julliard julliard at winehq.org
Fri Nov 19 15:39:45 CST 2021


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

Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date:   Tue Nov 16 19:55:00 2021 +0100

vkd3d-shader/hlsl: Parse matrix and vector types without parameters.

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

---

 libs/vkd3d-shader/hlsl.y | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index 2120b26..b7e0409 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -2529,6 +2529,10 @@ type:
 
             $$ = hlsl_get_vector_type(ctx, $3->base_type, $5);
         }
+    | KW_VECTOR
+        {
+            $$ = hlsl_get_vector_type(ctx, HLSL_TYPE_FLOAT, 4);
+        }
     | KW_MATRIX '<' type ',' C_INTEGER ',' C_INTEGER '>'
         {
             if ($3->type != HLSL_CLASS_SCALAR)
@@ -2557,6 +2561,10 @@ type:
 
             $$ = hlsl_get_matrix_type(ctx, $3->base_type, $7, $5);
         }
+    | KW_MATRIX
+        {
+            $$ = hlsl_get_matrix_type(ctx, HLSL_TYPE_FLOAT, 4, 4);
+        }
     | KW_VOID
         {
             $$ = ctx->builtin_types.Void;




More information about the wine-cvs mailing list