vkd3d-shader/hlsl: Handle error expressions in function calls.

This commit is contained in:
Elizabeth Figura 2024-08-29 12:48:23 -05:00 committed by Henri Verbeet
parent 5d52bef19d
commit d6052bc31b
Notes: Henri Verbeet 2024-10-03 19:34:42 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1110

View File

@ -5141,6 +5141,15 @@ static struct hlsl_block *add_call(struct hlsl_ctx *ctx, const char *name,
struct intrinsic_function *intrinsic; struct intrinsic_function *intrinsic;
struct hlsl_ir_function_decl *decl; struct hlsl_ir_function_decl *decl;
for (unsigned int i = 0; i < args->args_count; ++i)
{
if (args->args[i]->data_type->class == HLSL_CLASS_ERROR)
{
args->instrs->value = ctx->error_instr;
return args->instrs;
}
}
if ((decl = find_function_call(ctx, name, args, false, loc))) if ((decl = find_function_call(ctx, name, args, false, loc)))
{ {
if (!add_user_call(ctx, decl, args, false, loc)) if (!add_user_call(ctx, decl, args, false, loc))