vkd3d-shader/hlsl: Remove the type equality assertions in hlsl_new_ternary_expr().

Similar to d1c2ae3f0e, 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.
This commit is contained in:
Elizabeth Figura
2024-12-08 19:45:39 -06:00
committed by Henri Verbeet
parent ba868ed4a6
commit 4072aa4a4b
Notes: Henri Verbeet 2025-02-20 16:07:11 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Francisco Casas (@fcasas)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1370

View File

@@ -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);
}