radv: fix assertion on gpu hang detection

fixes assert in RADV_DECL_PIPELINE_DOWNCAST when bound pipline is a compute
pipeline

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20276>
This commit is contained in:
Mikhail Korolev
2022-12-12 09:02:43 +01:00
committed by Marge Bot
parent e9efd05af5
commit c147a35644

View File

@@ -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);
}
}