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

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Giovanni Mascellani 2021-11-16 19:55:00 +01:00 committed by Alexandre Julliard
parent 0f16b8ec78
commit f30f92f193

View File

@ -2529,6 +2529,10 @@ type:
$$ = hlsl_get_vector_type(ctx, $3->base_type, $5); $$ = 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 '>' | KW_MATRIX '<' type ',' C_INTEGER ',' C_INTEGER '>'
{ {
if ($3->type != HLSL_CLASS_SCALAR) if ($3->type != HLSL_CLASS_SCALAR)
@ -2557,6 +2561,10 @@ type:
$$ = hlsl_get_matrix_type(ctx, $3->base_type, $7, $5); $$ = hlsl_get_matrix_type(ctx, $3->base_type, $7, $5);
} }
| KW_MATRIX
{
$$ = hlsl_get_matrix_type(ctx, HLSL_TYPE_FLOAT, 4, 4);
}
| KW_VOID | KW_VOID
{ {
$$ = ctx->builtin_types.Void; $$ = ctx->builtin_types.Void;