From cad3474793a7102eea09f098357c9b2975d89fcd Mon Sep 17 00:00:00 2001 From: Friedrich Vock Date: Tue, 30 Jan 2024 15:51:01 +0100 Subject: [PATCH] vtn: Use secure_getenv for shader dumping Reviewed-by: Eric Engestrom Cc: mesa-stable Part-of: (cherry picked from commit 321e2cee5315e94c050f8659a8cd55e0e7cd9076) --- .pick_status.json | 2 +- src/compiler/spirv/spirv_to_nir.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index cff00af402b..66615ed0923 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 522532f06ee..ed2a003d722 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -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");