radv: Add logic for multisample format descriptions.
[mesa.git] / src / amd / vulkan / radv_debug.c
index c84e3be25bb7beb53380edce35e3de0b2cc826b6..4854b094ba79fbf6528dc0f107004eb8beb77d79 100644 (file)
@@ -63,7 +63,8 @@ radv_init_trace(struct radv_device *device)
        device->trace_bo = ws->buffer_create(ws, TRACE_BO_SIZE, 8,
                                             RADEON_DOMAIN_VRAM,
                                             RADEON_FLAG_CPU_ACCESS|
-                                            RADEON_FLAG_NO_INTERPROCESS_SHARING);
+                                            RADEON_FLAG_NO_INTERPROCESS_SHARING,
+                                            RADV_BO_PRIORITY_UPLOAD_BUFFER);
        if (!device->trace_bo)
                return false;
 
@@ -80,7 +81,7 @@ radv_init_trace(struct radv_device *device)
 }
 
 static void
-radv_dump_trace(struct radv_device *device, struct radeon_winsys_cs *cs)
+radv_dump_trace(struct radv_device *device, struct radeon_cmdbuf *cs)
 {
        const char *filename = getenv("RADV_TRACE_FILE");
        FILE *f = fopen(filename, "w");
@@ -540,12 +541,15 @@ radv_dump_graphics_state(struct radv_pipeline *graphics_pipeline,
 {
        VkShaderStageFlagBits active_stages;
 
-       if (!graphics_pipeline)
-               return;
-
-       active_stages = graphics_pipeline->active_stages;
+       if (graphics_pipeline) {
+               active_stages = graphics_pipeline->active_stages;
+               radv_dump_pipeline_state(graphics_pipeline, active_stages, f);
+       }
 
-       radv_dump_pipeline_state(graphics_pipeline, active_stages, f);
+       if (compute_pipeline) {
+               active_stages = VK_SHADER_STAGE_COMPUTE_BIT;
+               radv_dump_pipeline_state(compute_pipeline, active_stages, f);
+       }
 }
 
 static void
@@ -625,7 +629,7 @@ static void
 radv_dump_device_name(struct radv_device *device, FILE *f)
 {
        struct radeon_info *info = &device->physical_device->rad_info;
-       char llvm_string[32] = {}, kernel_version[128] = {};
+       char kernel_version[128] = {};
        struct utsname uname_data;
        const char *chip_name;
 
@@ -635,14 +639,11 @@ radv_dump_device_name(struct radv_device *device, FILE *f)
                snprintf(kernel_version, sizeof(kernel_version),
                         " / %s", uname_data.release);
 
-       snprintf(llvm_string, sizeof(llvm_string),
-                ", LLVM %i.%i.%i", (HAVE_LLVM >> 8) & 0xff,
-                HAVE_LLVM & 0xff, MESA_LLVM_VERSION_PATCH);
-
-       fprintf(f, "Device name: %s (%s DRM %i.%i.%i%s%s)\n\n",
+       fprintf(f, "Device name: %s (%s DRM %i.%i.%i%s, LLVM "
+               MESA_LLVM_VERSION_STRING ")\n\n",
                chip_name, device->physical_device->name,
                info->drm_major, info->drm_minor, info->drm_patchlevel,
-               kernel_version, llvm_string);
+               kernel_version);
 }
 
 static bool
@@ -657,7 +658,7 @@ radv_gpu_hang_occured(struct radv_queue *queue, enum ring_type ring)
 }
 
 void
-radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_winsys_cs *cs)
+radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
 {
        struct radv_pipeline *graphics_pipeline, *compute_pipeline;
        struct radv_device *device = queue->device;