From 4072aa4a4b45faf3e69525e7ee54de34b3b130ad Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Sun, 8 Dec 2024 19:45:39 -0600 Subject: [PATCH] vkd3d-shader/hlsl: Remove the type equality assertions in hlsl_new_ternary_expr(). Similar to d1c2ae3f0eaf0f3b64b0a5f4c50ad402e822a4eb, this is a bit too strict and may prevent e.g. simultaneous use of float and float1 at codegen time. However, in this case the inciting factor is that in the case of allocation failure at codegen time, we would like to allow one or more arguments to have error type. --- libs/vkd3d-shader/hlsl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 41586550..36e0a20c 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -1662,8 +1662,6 @@ struct hlsl_ir_node *hlsl_new_ternary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_ex { struct hlsl_ir_node *operands[HLSL_MAX_OPERANDS] = {arg1, arg2, arg3}; - VKD3D_ASSERT(hlsl_types_are_equal(arg1->data_type, arg2->data_type)); - VKD3D_ASSERT(hlsl_types_are_equal(arg1->data_type, arg3->data_type)); return hlsl_new_expr(ctx, op, operands, arg1->data_type, &arg1->loc); }