summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorIllia Abernikhin <illia.abernikhin@globallogic.com>2022-11-01 05:59:26 +0800
committerMarge Bot <emma+marge@anholt.net>2022-11-02 07:25:39 +0000
commit0e47171abea1afe89c0e368a0a6c8867de69fa68 (patch)
treed6780ec490e55023bf5ac254882dc85d58b8b67e /src/mesa/main/context.c
parentd375a0ff8a5a75b7370d22bad34293cb7bb226a5 (diff)
utils: Move functions from debug.* to u_debug.*
Add unit tests for debug_get_bool_option and debug_get_num_option Merge env_var_as_boolean and debug_get_bool_option and implement env_var_as_boolean with debug_get_bool_option in a stricter side. Merge env_var_as_unsigned and debug_get_num_option and implement env_var_as_unsigned with debug_get_num_option in a stricter side. Move debug_control, parse_debug_string, parse_enable_string, comma_separated_list_contains from debug.* to u_debug.* Main changes: os_get_option() is used instead of getenv() for env_var_as_boolean and env_var_as_unsigned; also debug_get_bool_option() has logic like "true" always if not "false"; env_var_as_boolean() now 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> Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19336>
Diffstat (limited to 'src/mesa/main/context.c')
0 files changed, 0 insertions, 0 deletions