radv: print some information when RADV_TRACE_FILE is set
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 14 Mar 2018 11:02:13 +0000 (12:02 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 15 Mar 2018 16:19:54 +0000 (17:19 +0100)
Just to be sure all options are enabled when trying to generate
a hang report.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_debug.c
src/amd/vulkan/radv_debug.h
src/amd/vulkan/radv_device.c

index f3b79004f6931ec1df014d8fe8df84bb5c85e5c0..ce582312c5e4b0b1ca54d2051d7a7305786ed035 100644 (file)
@@ -593,7 +593,7 @@ radv_dump_dmesg(FILE *f)
        pclose(p);
 }
 
-static void
+void
 radv_dump_enabled_options(struct radv_device *device, FILE *f)
 {
        uint64_t mask;
index 804f620690db1d24f82312c68b62bcb3d8dbd2c6..08877676b5d01816cef97f7754c60099d415f3d4 100644 (file)
@@ -61,4 +61,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_winsys_cs *cs);
 void
 radv_print_spirv(uint32_t *data, uint32_t size, FILE *fp);
 
+void
+radv_dump_enabled_options(struct radv_device *device, FILE *f);
+
 #endif
index 13b2da584e54bf835bc77e09f8b0f9d7b8ab1c35..36ba0c3833d5c49de39a82c45735c411ce443a1f 100644 (file)
@@ -1322,10 +1322,15 @@ VkResult radv_CreateDevice(
                device->physical_device->rad_info.max_se >= 2;
 
        if (getenv("RADV_TRACE_FILE")) {
+               const char *filename = getenv("RADV_TRACE_FILE");
+
                keep_shader_info = true;
 
                if (!radv_init_trace(device))
                        goto fail;
+
+               fprintf(stderr, "Trace file will be dumped to %s\n", filename);
+               radv_dump_enabled_options(device, stderr);
        }
 
        device->keep_shader_info = keep_shader_info;