Module: vkd3d Branch: master Commit: 0654d88edd53b0721e071084004eb42619cbd6fa URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/0654d88edd53b0721e071084004eb4...
Author: Zebediah Figura zfigura@codeweavers.com Date: Fri Feb 24 13:11:06 2023 -0600
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.
---
libs/vkd3d-shader/hlsl_codegen.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index c8130a3f..adaf8201 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -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, ®); + 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, ®); } else {