From f30f92f193770a4d1bdf84222d281afb58c48aa3 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Tue, 16 Nov 2021 19:55:00 +0100 Subject: [PATCH] vkd3d-shader/hlsl: Parse matrix and vector types without parameters. Signed-off-by: Giovanni Mascellani Signed-off-by: Zebediah Figura Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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 2120b26f..b7e0409d 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;