vkd3d-shader/hlsl: Allow VPOS and VFACE to be specified in sm3 pixel shaders.

We were previously (accidentally) rejecting them because they didn't have a
usage.
This commit is contained in:
Zebediah Figura 2023-02-24 13:11:06 -06:00 committed by Alexandre Julliard
parent b19105eaeb
commit 0654d88edd
Notes: Alexandre Julliard 2023-04-18 22:34:49 +02:00
Approved-by: Matteo Bruni (@Mystral)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/152

View File

@ -2921,7 +2921,8 @@ static void allocate_semantic_register(struct hlsl_ctx *ctx, struct hlsl_ir_var
D3DDECLUSAGE usage;
uint32_t usage_idx;
if (!hlsl_sm1_usage_from_semantic(&var->semantic, &usage, &usage_idx))
builtin = hlsl_sm1_register_from_semantic(ctx, &var->semantic, output, &type, &reg);
if (!builtin && !hlsl_sm1_usage_from_semantic(&var->semantic, &usage, &usage_idx))
{
hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_SEMANTIC,
"Invalid semantic '%s'.", var->semantic.name);
@ -2930,8 +2931,6 @@ static void allocate_semantic_register(struct hlsl_ctx *ctx, struct hlsl_ir_var
if ((!output && !var->last_read) || (output && !var->first_write))
return;
builtin = hlsl_sm1_register_from_semantic(ctx, &var->semantic, output, &type, &reg);
}
else
{