• Home
  • Raw
  • Download

Lines Matching +full:enum +full:- +full:conversion

29 typedef enum {
32 PARAMETER_LIST_INEXACT_MATCH /*< Match requires implicit conversion. */
46 const exec_node *node_a = list_a->get_head_raw(); in parameter_lists_match()
47 const exec_node *node_b = list_b->get_head_raw(); in parameter_lists_match()
50 * conversion. */ in parameter_lists_match()
54 ; !node_a->is_tail_sentinel() in parameter_lists_match()
55 ; node_a = node_a->next, node_b = node_b->next) { in parameter_lists_match()
60 if (node_b->is_tail_sentinel()) in parameter_lists_match()
67 if (param->type == actual->type) in parameter_lists_match()
70 /* Try to find an implicit conversion from actual to param. */ in parameter_lists_match()
72 switch ((enum ir_variable_mode)(param->data.mode)) { in parameter_lists_match()
86 if (param->data.implicit_conversion_prohibited || in parameter_lists_match()
87 !actual->type->can_implicitly_convert_to(param->type, state)) in parameter_lists_match()
92 if (!param->type->can_implicitly_convert_to(actual->type, state)) in parameter_lists_match()
97 /* Since there are no bi-directional automatic conversions (e.g., in parameter_lists_match()
98 * there is int -> float but no float -> int), inout parameters must in parameter_lists_match()
113 if (!node_b->is_tail_sentinel()) in parameter_lists_match()
126 typedef enum {
142 if (param->data.mode == ir_var_function_out) { in get_parameter_match_type()
143 from_type = param->type; in get_parameter_match_type()
144 to_type = actual->type; in get_parameter_match_type()
146 from_type = actual->type; in get_parameter_match_type()
147 to_type = param->type; in get_parameter_match_type()
153 if (to_type->is_double()) { in get_parameter_match_type()
154 if (from_type->is_float()) in get_parameter_match_type()
159 if (to_type->is_float()) in get_parameter_match_type()
162 /* int -> uint and any other oddball conversions */ in get_parameter_match_type()
174 * conversion. in is_better_parameter_match()
176 * 2. A match involving an implicit conversion from float to double in is_better_parameter_match()
177 * is better than match involving any other implicit conversion. in is_better_parameter_match()
180 * 3. A match involving an implicit conversion from either int or uint in is_better_parameter_match()
181 * to float is better than a match involving an implicit conversion in is_better_parameter_match()
185 * neither conversion is considered better than the other. in is_better_parameter_match()
187 * -- in is_better_parameter_match()
189 * Notably, the int->uint conversion is *not* considered to be better in is_better_parameter_match()
190 * or worse than int/uint->float or int/uint->double. in is_better_parameter_match()
211 * * for at least one function argument, the conversion for that argument in is_best_inexact_overload()
212 * in A is better than the corresponding conversion in B; and in is_best_inexact_overload()
214 * * there is no function argument for which the conversion in B is better in is_best_inexact_overload()
215 * than the corresponding conversion in A. in is_best_inexact_overload()
226 const exec_node *node_a = sig->parameters.get_head_raw(); in is_best_inexact_overload()
227 const exec_node *node_b = (*other)->parameters.get_head_raw(); in is_best_inexact_overload()
228 const exec_node *node_p = actual_parameters->get_head_raw(); in is_best_inexact_overload()
233 ; !node_a->is_tail_sentinel() in is_best_inexact_overload()
234 ; node_a = node_a->next, in is_best_inexact_overload()
235 node_b = node_b->next, in is_best_inexact_overload()
236 node_p = node_p->next) { in is_best_inexact_overload()
277 if (!state || state->is_version(400, 0) || state->ARB_gpu_shader5_enable || in choose_best_inexact_overload()
278 state->MESA_shader_integer_functions_enable || in choose_best_inexact_overload()
279 state->EXT_shader_implicit_conversions_enable) { in choose_best_inexact_overload()
321 foreach_in_list(ir_function_signature, sig, &this->signatures) { in matching_signature()
322 /* Skip over any built-ins that aren't available in this shader. */ in matching_signature()
323 if (sig->is_builtin() && (!allow_builtins || in matching_signature()
324 !sig->is_builtin_available(state))) in matching_signature()
327 switch (parameter_lists_match(state, & sig->parameters, actual_parameters)) { in matching_signature()
334 if (this->is_subroutine) in matching_signature()
376 const exec_node *node_a = list_a->get_head_raw(); in parameter_lists_match_exact()
377 const exec_node *node_b = list_b->get_head_raw(); in parameter_lists_match_exact()
380 ; !node_a->is_tail_sentinel() && !node_b->is_tail_sentinel() in parameter_lists_match_exact()
381 ; node_a = node_a->next, node_b = node_b->next) { in parameter_lists_match_exact()
388 if (a->type != b->type) in parameter_lists_match_exact()
395 return (node_a->is_tail_sentinel() == node_b->is_tail_sentinel()); in parameter_lists_match_exact()
402 foreach_in_list(ir_function_signature, sig, &this->signatures) { in exact_matching_signature()
403 /* Skip over any built-ins that aren't available in this shader. */ in exact_matching_signature()
404 if (sig->is_builtin() && !sig->is_builtin_available(state)) in exact_matching_signature()
407 if (parameter_lists_match_exact(&sig->parameters, actual_parameters)) in exact_matching_signature()