radv: allow to print GPU info with RADV_DEBUG=info
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 16 May 2018 13:52:37 +0000 (15:52 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 17 May 2018 12:14:17 +0000 (14:14 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_debug.h
src/amd/vulkan/radv_device.c

index 9dda9b6b0c2403b28e6b5886b96bf16fc886e5f6..b6993cee1c84a24fba1e427b4de146b144b11d3c 100644 (file)
@@ -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 {
index e24b8c2a7662e5b02d799a00c198818cc6f5c2d8..778887bd580e995a05bf243252a41dfb418f0df2 100644 (file)
@@ -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}
 };