vtn: Use secure_getenv for shader dumping

Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
(cherry picked from commit 321e2cee53)
This commit is contained in:
Friedrich Vock 2024-01-30 15:51:01 +01:00 committed by Eric Engestrom
parent bbe9e29fd4
commit cad3474793
2 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@
"description": "vtn: Use secure_getenv for shader dumping",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -201,7 +201,7 @@ _vtn_fail(struct vtn_builder *b, const char *file, unsigned line,
file, line, fmt, args);
va_end(args);
const char *dump_path = getenv("MESA_SPIRV_FAIL_DUMP_PATH");
const char *dump_path = secure_getenv("MESA_SPIRV_FAIL_DUMP_PATH");
if (dump_path)
vtn_dump_shader(b, dump_path, "fail");
@ -6929,7 +6929,7 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
return NULL;
}
const char *dump_path = getenv("MESA_SPIRV_DUMP_PATH");
const char *dump_path = secure_getenv("MESA_SPIRV_DUMP_PATH");
if (dump_path)
vtn_dump_shader(b, dump_path, "spirv");