mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Return an "error" expression when constructing an arithmetic expression from incompatible types.
This commit is contained in:
committed by
Henri Verbeet
parent
c43e5c8eb5
commit
7e3231c749
Notes:
Henri Verbeet
2024-09-23 15:55:59 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1071
@@ -1756,7 +1756,11 @@ static struct hlsl_ir_node *add_binary_arithmetic_expr(struct hlsl_ctx *ctx, str
|
||||
struct hlsl_ir_node *args[HLSL_MAX_OPERANDS] = {0};
|
||||
struct hlsl_type *common_type;
|
||||
|
||||
common_type = get_common_numeric_type(ctx, arg1, arg2, loc);
|
||||
if (!(common_type = get_common_numeric_type(ctx, arg1, arg2, loc)))
|
||||
{
|
||||
block->value = ctx->error_instr;
|
||||
return block->value;
|
||||
}
|
||||
|
||||
if (!(args[0] = add_implicit_conversion(ctx, block, arg1, common_type, loc)))
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user