turnip: Don't call getenv() directly

I noticed it was using getenv directly when I tried to use 'setprop
mesa.tu.debug ..' on android.  Use os_get_option() instead so we get
sysprop fallback on android.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15289>
This commit is contained in:
Rob Clark 2022-03-08 13:40:14 -08:00 committed by Marge Bot
parent c9d99b7eec
commit 711f0d1df4
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@
#include "util/debug.h"
#include "util/disk_cache.h"
#include "util/driconf.h"
#include "util/os_misc.h"
#include "util/u_atomic.h"
#include "vk_format.h"
#include "vk_util.h"
@ -411,7 +412,7 @@ tu_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
instance->physical_device_count = -1;
instance->debug_flags =
parse_debug_string(getenv("TU_DEBUG"), tu_debug_options);
parse_debug_string(os_get_option("TU_DEBUG"), tu_debug_options);
#ifdef DEBUG
/* Enable startup debugging by default on debug drivers. You almost always