From: Samuel Pitoiset Date: Fri, 26 Jun 2020 10:12:18 +0000 (+0200) Subject: radv: print warnings for famous RADV_PERFTEST options that no longer exist X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c569e22d1d038f651d5b5aa3cc46e7a5c6e152f;p=mesa.git radv: print warnings for famous RADV_PERFTEST options that no longer exist RADV_PERFTEST=aco no longer exists, ACO is the default compiler. RADV_PERFTEST=llvm is deprecated, use RADV_DEBUG=llvm instead. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index a237a1a19bb..c52fbad8f68 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -667,8 +667,26 @@ VkResult radv_CreateInstance( instance->debug_flags = parse_debug_string(getenv("RADV_DEBUG"), radv_debug_options); - instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"), - radv_perftest_options); + const char *radv_perftest_str = getenv("RADV_PERFTEST"); + instance->perftest_flags = parse_debug_string(radv_perftest_str, + radv_perftest_options); + + if (radv_perftest_str) { + /* Output warnings for famous RADV_PERFTEST options that no + * longer exist or are deprecated. + */ + if (strstr(radv_perftest_str, "aco")) { + fprintf(stderr, "*******************************************************************************\n"); + fprintf(stderr, "* WARNING: Unknown option RADV_PERFTEST='aco'. ACO is enabled by default now. *\n"); + fprintf(stderr, "*******************************************************************************\n"); + } + if (strstr(radv_perftest_str, "llvm")) { + fprintf(stderr, "*********************************************************************************\n"); + fprintf(stderr, "* WARNING: Unknown option 'RADV_PERFTEST=llvm'. Did you mean 'RADV_DEBUG=llvm'? *\n"); + fprintf(stderr, "*********************************************************************************\n"); + abort(); + } + } if (instance->debug_flags & RADV_DEBUG_STARTUP) radv_logi("Created an instance");