mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Cache matrix types.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
b8502ed51c
commit
ec8d8e6f73
@@ -1019,7 +1019,7 @@ static struct hlsl_type *expr_common_type(struct hlsl_ctx *ctx, struct hlsl_type
|
||||
return ctx->builtin_types.scalar[base];
|
||||
if (type == HLSL_CLASS_VECTOR)
|
||||
return ctx->builtin_types.vector[base][dimx - 1];
|
||||
return hlsl_new_type(ctx, NULL, type, base, dimx, dimy);
|
||||
return ctx->builtin_types.matrix[base][dimx - 1][dimy - 1];
|
||||
}
|
||||
|
||||
static struct hlsl_ir_expr *add_expr(struct hlsl_ctx *ctx, struct list *instrs, enum hlsl_ir_expr_op op,
|
||||
@@ -2425,7 +2425,7 @@ type:
|
||||
YYABORT;
|
||||
}
|
||||
|
||||
$$ = hlsl_new_type(ctx, NULL, HLSL_CLASS_MATRIX, $3->base_type, $7, $5);
|
||||
$$ = ctx->builtin_types.matrix[$3->base_type][$7 - 1][$5 - 1];
|
||||
}
|
||||
| KW_VOID
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user