radv: dump the VS prolog disassembly to the hang report
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13376>
This commit is contained in:
parent
d659c2ef9c
commit
14622b8bcc
|
@ -488,6 +488,26 @@ radv_dump_vertex_descriptors(struct radv_pipeline *pipeline, FILE *f)
|
|||
}
|
||||
}
|
||||
|
||||
static struct radv_shader_prolog *
|
||||
radv_get_saved_vs_prolog(struct radv_device *device)
|
||||
{
|
||||
uint64_t *ptr = (uint64_t *)device->trace_id_ptr;
|
||||
return *(struct radv_shader_prolog **)(ptr + 4);
|
||||
}
|
||||
|
||||
static void
|
||||
radv_dump_vs_prolog(struct radv_pipeline *pipeline, FILE *f)
|
||||
{
|
||||
struct radv_shader_prolog *vs_prolog = radv_get_saved_vs_prolog(pipeline->device);
|
||||
struct radv_shader *vs_shader = radv_get_shader(pipeline, MESA_SHADER_VERTEX);
|
||||
|
||||
if (!vs_prolog || !vs_shader || !vs_shader->info.vs.has_prolog)
|
||||
return;
|
||||
|
||||
fprintf(f, "Vertex prolog:\n\n");
|
||||
fprintf(f, "DISASM:\n%s\n", vs_prolog->disasm_string);
|
||||
}
|
||||
|
||||
static struct radv_pipeline *
|
||||
radv_get_saved_pipeline(struct radv_device *device, enum ring_type ring)
|
||||
{
|
||||
|
@ -507,6 +527,7 @@ radv_dump_queue_state(struct radv_queue *queue, const char *dump_dir, FILE *f)
|
|||
|
||||
pipeline = radv_get_saved_pipeline(queue->device, ring);
|
||||
if (pipeline) {
|
||||
radv_dump_vs_prolog(pipeline, f);
|
||||
radv_dump_shaders(pipeline, pipeline->active_stages, dump_dir, f);
|
||||
if (!(queue->device->instance->debug_flags & RADV_DEBUG_NO_UMR))
|
||||
radv_dump_annotated_shaders(pipeline, pipeline->active_stages, f);
|
||||
|
|
Loading…
Reference in New Issue