Skip to content

utils: merge the functionals in util/debug.h with util/u_debug.h

Illia Abernikhin requested to merge GL/mesa:merge_util_debug_functionality into main

some methods have the same purpose, it seems redundant

parse_debug_string() moved from util/debug.h to util/u_debug.h parse_debug_string() moved from util/debug.h to util/u_debug.h comma_separated_list_contains() moved from util/debug.h to util/u_debug.h env_var_as_unsigned() -> debug_get_num_option(), because duplicate env_var_as_bool() -> debug_get_bool_option(), because duplicate

env_var_as_unsigned() and env_var_as_bool() are merged with debug_get_num_option() and debug_get_bool_option() in a stricter side.

Main changes: os_get_option() is used instead of get_env(), also debug_get_bool_option() has logic like "true" always if not "false", env_var_as_bool() uses different logic: if env variable is neither "true" nor "false" returns the default value. We left the second one, but if you want the behavior to be the same as in the old version of debug_get_bool_option() use dfault=true

Signed-off-by: Illia Abernikhin illia.abernikhin@globallogic.com Closes: #7177 (closed)

Merge request reports