From: Samuel Pitoiset Date: Wed, 14 Mar 2018 11:01:49 +0000 (+0100) Subject: radv: only display options that are enabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5be2757c3506004d9913ad2ea3ad4fbe6af70dce;p=mesa.git radv: only display options that are enabled Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index c8794d06ea8..f3b79004f69 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -598,23 +598,27 @@ radv_dump_enabled_options(struct radv_device *device, FILE *f) { uint64_t mask; - fprintf(f, "Enabled debug options: "); + if (device->instance->debug_flags) { + fprintf(f, "Enabled debug options: "); - mask = device->instance->debug_flags; - while (mask) { - int i = u_bit_scan64(&mask); - fprintf(f, "%s, ", radv_get_debug_option_name(i)); + mask = device->instance->debug_flags; + while (mask) { + int i = u_bit_scan64(&mask); + fprintf(f, "%s, ", radv_get_debug_option_name(i)); + } + fprintf(f, "\n"); } - fprintf(f, "\n"); - fprintf(f, "Enabled perftest options: "); + if (device->instance->perftest_flags) { + fprintf(f, "Enabled perftest options: "); - mask = device->instance->perftest_flags; - while (mask) { - int i = u_bit_scan64(&mask); - fprintf(f, "%s, ", radv_get_perftest_option_name(i)); + mask = device->instance->perftest_flags; + while (mask) { + int i = u_bit_scan64(&mask); + fprintf(f, "%s, ", radv_get_perftest_option_name(i)); + } + fprintf(f, "\n"); } - fprintf(f, "\n"); } static void