vkd3d-shader/hlsl: Write SM4 semantic declarations.

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:
Zebediah Figura
2021-08-19 18:44:29 -05:00
committed by Alexandre Julliard
parent 5da4949f7c
commit 62456beeda
3 changed files with 118 additions and 5 deletions

View File

@@ -1048,6 +1048,7 @@ static void allocate_semantic_register(struct hlsl_ctx *ctx, struct hlsl_ir_var
else
{
D3D_NAME usage;
bool has_idx;
if (!hlsl_sm4_usage_from_semantic(ctx, &var->semantic, output, &usage))
{
@@ -1055,7 +1056,8 @@ static void allocate_semantic_register(struct hlsl_ctx *ctx, struct hlsl_ir_var
"Invalid semantic '%s'.", var->semantic.name);
return;
}
builtin = hlsl_sm4_register_from_semantic(ctx, &var->semantic, output, &type, &reg);
if ((builtin = hlsl_sm4_register_from_semantic(ctx, &var->semantic, output, &type, &has_idx)))
reg = has_idx ? var->semantic.index : 0;
}
if (builtin)