vkd3d-shader: Rename hlsl_type_compare() to hlsl_types_are_equal().

hlsl_type_compare() implies a stable comparison function, as if to be passed to
qsort().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-03-18 00:22:19 -05:00
committed by Alexandre Julliard
parent 588d3e5a57
commit 3ac20487f8
4 changed files with 13 additions and 13 deletions

View File

@@ -73,7 +73,7 @@ static bool fold_redundant_casts(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
if (expr->op != HLSL_IR_UNOP_CAST)
return false;
if (hlsl_type_compare(src_type, dst_type)
if (hlsl_types_are_equal(src_type, dst_type)
|| (src_type->base_type == dst_type->base_type && is_vec1(src_type) && is_vec1(dst_type)))
{
replace_node(&expr->node, expr->operands[0].node);