device-select: use debug_get_bool_option for FORCE_DEFAULT_DEVICE

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36717>
This commit is contained in:
Rhys Perry
2025-08-08 16:39:37 +01:00
committed by Marge Bot
parent 1ff868adcf
commit 7302e839ea
@@ -155,8 +155,8 @@ device_select_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
debug_get_bool_option("DRI_PRIME_DEBUG", false);
info->selection = getenv("MESA_VK_DEVICE_SELECT");
info->dri_prime = getenv("DRI_PRIME");
const char *force_default_device = getenv("MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE");
info->force_default_device = force_default_device && !strcmp(force_default_device, "1");
info->force_default_device =
debug_get_bool_option("MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE", false);
info->selection = info->selection ? strdup(info->selection) : NULL;
info->dri_prime = info->dri_prime ? strdup(info->dri_prime) : NULL;