From: Samuel Pitoiset Date: Wed, 16 May 2018 13:52:37 +0000 (+0200) Subject: radv: allow to print GPU info with RADV_DEBUG=info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d349d4bd24aef5b76d5ebb999f55416a14b039f1;p=mesa.git radv: allow to print GPU info with RADV_DEBUG=info Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 9dda9b6b0c2..b6993cee1c8 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -45,6 +45,7 @@ enum { RADV_DEBUG_PREOPTIR = 0x8000, RADV_DEBUG_NO_DYNAMIC_BOUNDS = 0x10000, RADV_DEBUG_NO_OUT_OF_ORDER = 0x20000, + RADV_DEBUG_INFO = 0x40000, }; enum { diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index e24b8c2a766..778887bd580 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -329,6 +329,9 @@ radv_physical_device_init(struct radv_physical_device *device, goto fail; } + if ((device->instance->debug_flags & RADV_DEBUG_INFO)) + ac_print_gpu_info(&device->rad_info); + return VK_SUCCESS; fail: @@ -391,6 +394,7 @@ static const struct debug_control radv_debug_options[] = { {"preoptir", RADV_DEBUG_PREOPTIR}, {"nodynamicbounds", RADV_DEBUG_NO_DYNAMIC_BOUNDS}, {"nooutoforder", RADV_DEBUG_NO_OUT_OF_ORDER}, + {"info", RADV_DEBUG_INFO}, {NULL, 0} };