[PATCH vkd3d v2 3/4] vkd3d-shader/hlsl: Parse matrix and vector types without parameters.
Giovanni Mascellani
gmascellani at codeweavers.com
Tue Nov 16 04:18:44 CST 2021
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
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;
--
2.33.1
More information about the wine-devel
mailing list