mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Use cached vector types in more places.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
98cfd7b09f
commit
b8502ed51c
@ -608,7 +608,7 @@ struct hlsl_ir_swizzle *hlsl_new_swizzle(struct hlsl_ctx *ctx, DWORD s, unsigned
|
|||||||
if (!(swizzle = hlsl_alloc(ctx, sizeof(*swizzle))))
|
if (!(swizzle = hlsl_alloc(ctx, sizeof(*swizzle))))
|
||||||
return NULL;
|
return NULL;
|
||||||
init_node(&swizzle->node, HLSL_IR_SWIZZLE,
|
init_node(&swizzle->node, HLSL_IR_SWIZZLE,
|
||||||
hlsl_new_type(ctx, NULL, HLSL_CLASS_VECTOR, val->data_type->base_type, components, 1), *loc);
|
ctx->builtin_types.vector[val->data_type->base_type][components - 1], *loc);
|
||||||
hlsl_src_from_node(&swizzle->val, val);
|
hlsl_src_from_node(&swizzle->val, val);
|
||||||
swizzle->swizzle = s;
|
swizzle->swizzle = s;
|
||||||
return swizzle;
|
return swizzle;
|
||||||
|
@ -2397,7 +2397,7 @@ type:
|
|||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
$$ = hlsl_new_type(ctx, NULL, HLSL_CLASS_VECTOR, $3->base_type, $5, 1);
|
$$ = ctx->builtin_types.vector[$3->base_type][$5 - 1];
|
||||||
}
|
}
|
||||||
| KW_MATRIX '<' type ',' C_INTEGER ',' C_INTEGER '>'
|
| KW_MATRIX '<' type ',' C_INTEGER ',' C_INTEGER '>'
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user