vkd3d-shader/hlsl: Handle error expressions in return statements.

This commit is contained in:
Elizabeth Figura 2024-08-29 12:48:23 -05:00 committed by Henri Verbeet
parent 94cf432035
commit 8b98e483ac
Notes: Henri Verbeet 2024-10-28 18:10:10 +01:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1214

View File

@ -941,6 +941,9 @@ static bool add_return(struct hlsl_ctx *ctx, struct hlsl_block *block,
{ {
struct hlsl_ir_node *store; struct hlsl_ir_node *store;
if (return_value->data_type->class == HLSL_CLASS_ERROR)
return true;
if (!(return_value = add_implicit_conversion(ctx, block, return_value, return_type, loc))) if (!(return_value = add_implicit_conversion(ctx, block, return_value, return_type, loc)))
return false; return false;