mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Handle error expressions in return statements.
This commit is contained in:
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
@ -941,6 +941,9 @@ static bool add_return(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||
{
|
||||
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)))
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user