Mesa (main): turnip: Don't call getenv() directly
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Mar 9 01:12:09 UTC 2022
Module: Mesa
Branch: main
Commit: 711f0d1df4f81e0701974b4471929f095b2ba940
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=711f0d1df4f81e0701974b4471929f095b2ba940
Author: Rob Clark <robdclark at chromium.org>
Date: Tue Mar 8 13:40:14 2022 -0800
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 at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15289>
---
src/freedreno/vulkan/tu_device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 89c27245fed..fb0e920dd4d 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -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
More information about the mesa-commit
mailing list