summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_debug.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-11 22:28:42 +0200
committerSamuel Pitoiset <[email protected]>2017-09-14 10:37:57 +0200
commit49c72d84c27b698bca73978869e15cad4414ab7e (patch)
tree7eb3c4eeca166be5b85eb07553187268e313efb5 /src/amd/vulkan/radv_debug.c
parent302e34d24bdac1abf5b14aadf7a3857f033e01b2 (diff)
radv: dump the list of enabled options when a hang occured
Useful to know which debug/perftest options were enabled when a hang report is generated. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_debug.c')
-rw-r--r--src/amd/vulkan/radv_debug.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index ec43366de7d..662e29694f5 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -581,6 +581,30 @@ radv_dump_dmesg(FILE *f)
pclose(p);
}
+static void
+radv_dump_enabled_options(struct radv_device *device, FILE *f)
+{
+ uint64_t mask;
+
+ fprintf(f, "Enabled debug options: ");
+
+ mask = device->debug_flags;
+ while (mask) {
+ int i = u_bit_scan64(&mask);
+ fprintf(f, "%s, ", radv_get_debug_option_name(i));
+ }
+ fprintf(f, "\n");
+
+ 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));
+ }
+ fprintf(f, "\n");
+}
+
static bool
radv_gpu_hang_occured(struct radv_queue *queue, enum ring_type ring)
{
@@ -613,6 +637,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_winsys_cs *cs)
graphics_pipeline = radv_get_saved_graphics_pipeline(device);
compute_pipeline = radv_get_saved_compute_pipeline(device);
+ radv_dump_enabled_options(device, stderr);
radv_dump_dmesg(stderr);
if (vm_fault_occurred) {