Lines Matching +full:enum +full:- +full:conversion
30 typedef enum {
33 PARAMETER_LIST_INEXACT_MATCH /*< Match requires implicit conversion. */
39 const ir_variable *var = inst->as_variable(); in get_param_type()
41 return var->type; in get_param_type()
43 const ir_rvalue *rvalue = inst->as_rvalue(); in get_param_type()
45 return rvalue->type; in get_param_type()
60 const exec_node *node_a = list_a->get_head_raw(); in parameter_lists_match()
61 const exec_node *node_b = list_b->get_head_raw(); in parameter_lists_match()
64 * conversion. */ in parameter_lists_match()
68 ; !node_a->is_tail_sentinel() in parameter_lists_match()
69 ; node_a = node_a->next, node_b = node_b->next) { in parameter_lists_match()
74 if (node_b->is_tail_sentinel()) in parameter_lists_match()
80 const ir_variable *const param = inst_a->as_variable(); in parameter_lists_match()
84 if (param->type == actual_type) in parameter_lists_match()
87 /* Try to find an implicit conversion from actual to param. */ in parameter_lists_match()
89 switch ((enum ir_variable_mode)(param->data.mode)) { in parameter_lists_match()
103 if (param->data.implicit_conversion_prohibited || in parameter_lists_match()
104 !_mesa_glsl_can_implicitly_convert(actual_type, param->type, in parameter_lists_match()
111 if (!_mesa_glsl_can_implicitly_convert(param->type, actual_type, in parameter_lists_match()
118 /* Since there are no bi-directional automatic conversions (e.g., in parameter_lists_match()
119 * there is int -> float but no float -> int), inout parameters must in parameter_lists_match()
134 if (!node_b->is_tail_sentinel()) in parameter_lists_match()
147 typedef enum {
163 if (param->data.mode == ir_var_function_out) { in get_parameter_match_type()
164 from_type = param->type; in get_parameter_match_type()
165 to_type = actual->type; in get_parameter_match_type()
167 from_type = actual->type; in get_parameter_match_type()
168 to_type = param->type; in get_parameter_match_type()
183 /* int -> uint and any other oddball conversions */ in get_parameter_match_type()
195 * conversion. in is_better_parameter_match()
197 * 2. A match involving an implicit conversion from float to double in is_better_parameter_match()
198 * is better than match involving any other implicit conversion. in is_better_parameter_match()
201 * 3. A match involving an implicit conversion from either int or uint in is_better_parameter_match()
202 * to float is better than a match involving an implicit conversion in is_better_parameter_match()
206 * neither conversion is considered better than the other. in is_better_parameter_match()
208 * -- in is_better_parameter_match()
210 * Notably, the int->uint conversion is *not* considered to be better in is_better_parameter_match()
211 * or worse than int/uint->float or int/uint->double. in is_better_parameter_match()
232 * * for at least one function argument, the conversion for that argument in is_best_inexact_overload()
233 * in A is better than the corresponding conversion in B; and in is_best_inexact_overload()
235 * * there is no function argument for which the conversion in B is better in is_best_inexact_overload()
236 * than the corresponding conversion in A. in is_best_inexact_overload()
247 const exec_node *node_a = sig->parameters.get_head_raw(); in is_best_inexact_overload()
248 const exec_node *node_b = (*other)->parameters.get_head_raw(); in is_best_inexact_overload()
249 const exec_node *node_p = actual_parameters->get_head_raw(); in is_best_inexact_overload()
254 ; !node_a->is_tail_sentinel() in is_best_inexact_overload()
255 ; node_a = node_a->next, in is_best_inexact_overload()
256 node_b = node_b->next, in is_best_inexact_overload()
257 node_p = node_p->next) { in is_best_inexact_overload()
340 foreach_in_list(ir_function_signature, sig, &this->signatures) { in matching_signature()
341 /* Skip over any built-ins that aren't available in this shader. */ in matching_signature()
342 if (sig->is_builtin() && (!allow_builtins || in matching_signature()
343 !sig->is_builtin_available(state))) in matching_signature()
348 &sig->parameters, actual_parameters)) { in matching_signature()
355 if (this->is_subroutine) in matching_signature()
398 const exec_node *node_a = list_a->get_head_raw(); in parameter_lists_match_exact()
399 const exec_node *node_b = list_b->get_head_raw(); in parameter_lists_match_exact()
402 ; !node_a->is_tail_sentinel() && !node_b->is_tail_sentinel() in parameter_lists_match_exact()
403 ; node_a = node_a->next, node_b = node_b->next) { in parameter_lists_match_exact()
417 return (node_a->is_tail_sentinel() == node_b->is_tail_sentinel()); in parameter_lists_match_exact()
424 foreach_in_list(ir_function_signature, sig, &this->signatures) { in exact_matching_signature()
425 /* Skip over any built-ins that aren't available in this shader. */ in exact_matching_signature()
426 if (sig->is_builtin() && !sig->is_builtin_available(state)) in exact_matching_signature()
429 if (parameter_lists_match_exact(&sig->parameters, actual_parameters)) in exact_matching_signature()