From: Zebediah Figura zfigura@codeweavers.com
Native does not always do this. For example, functions whose parameters are float and float1 always result in an "ambiguous function call" error.
This does not fix any tests, because the relevant tests previously (incorrectly) succeeded, and now fail with:
E5017: Aborting due to not yet implemented feature: Prioritize between multiple compatible function overloads.
when they should simply fail. --- libs/vkd3d-shader/hlsl.y | 18 ------------------ 1 file changed, 18 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index ec79fea94..4c2a1f051 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2325,21 +2325,6 @@ static struct hlsl_block *initialize_vars(struct hlsl_ctx *ctx, struct list *var return initializers; }
-static bool func_is_exact_match(const struct hlsl_ir_function_decl *decl, const struct parse_initializer *args) -{ - unsigned int i; - - if (decl->parameters.count != args->args_count) - return false; - - for (i = 0; i < decl->parameters.count; ++i) - { - if (!hlsl_types_are_equal(decl->parameters.vars[i]->data_type, args->args[i]->data_type)) - return false; - } - return true; -} - static bool func_is_compatible_match(struct hlsl_ctx *ctx, const struct hlsl_ir_function_decl *decl, const struct parse_initializer *args) { @@ -2370,9 +2355,6 @@ static struct hlsl_ir_function_decl *find_function_call(struct hlsl_ctx *ctx,
LIST_FOR_EACH_ENTRY(decl, &func->overloads, struct hlsl_ir_function_decl, entry) { - if (func_is_exact_match(decl, args)) - return decl; - if (func_is_compatible_match(ctx, decl, args)) { if (compatible_match)