spirv: deduplicate default debug log level

`level` is already set to WARNING by default, so return it normally
instead of hard-coding WARNING again in the other code path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28799>
This commit is contained in:
Eric Engestrom 2024-04-18 10:37:27 +02:00 committed by Marge Bot
parent 378bed6fa6
commit 71fd7836f6

View file

@ -63,7 +63,7 @@ vtn_default_log_level(void)
const char *str = getenv("MESA_SPIRV_LOG_LEVEL");
if (str == NULL)
return NIR_SPIRV_DEBUG_LEVEL_WARNING;
return level;
for (int i = 0; i < ARRAY_SIZE(vtn_log_level_strings); i++) {
if (strcasecmp(str, vtn_log_level_strings[i]) == 0) {