From c147a356446aa7e96abc5e45d70820a2f84b4781 Mon Sep 17 00:00:00 2001 From: Mikhail Korolev Date: Mon, 12 Dec 2022 09:02:43 +0100 Subject: [PATCH] radv: fix assertion on gpu hang detection fixes assert in RADV_DECL_PIPELINE_DOWNCAST when bound pipline is a compute pipeline Part-of: --- src/amd/vulkan/radv_debug.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index 5dd6d8e..a8a0a1c 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -533,20 +533,26 @@ radv_dump_queue_state(struct radv_queue *queue, const char *dump_dir, FILE *f) pipeline = radv_get_saved_pipeline(queue->device, ring); if (pipeline) { - struct radv_graphics_pipeline *graphics_pipeline = radv_pipeline_to_graphics(pipeline); VkShaderStageFlags active_stages; if (pipeline->type == RADV_PIPELINE_GRAPHICS) { + struct radv_graphics_pipeline *graphics_pipeline = + radv_pipeline_to_graphics(pipeline); active_stages = graphics_pipeline->active_stages; + radv_dump_vs_prolog(pipeline, f); } else { active_stages = VK_SHADER_STAGE_COMPUTE_BIT; } - radv_dump_vs_prolog(pipeline, f); radv_dump_shaders(pipeline, active_stages, dump_dir, f); if (!(queue->device->instance->debug_flags & RADV_DEBUG_NO_UMR)) radv_dump_annotated_shaders(pipeline, active_stages, f); - radv_dump_vertex_descriptors(graphics_pipeline, f); + + if (pipeline->type == RADV_PIPELINE_GRAPHICS) { + struct radv_graphics_pipeline *graphics_pipeline = + radv_pipeline_to_graphics(pipeline); + radv_dump_vertex_descriptors(graphics_pipeline, f); + } radv_dump_descriptors(queue->device, f); } } -- 2.7.4