summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-05 15:36:59 +0200
committerSamuel Pitoiset <[email protected]>2017-09-14 10:37:57 +0200
commit6d957a86ff90378be5832feddc880eb10fac1c78 (patch)
tree7fd807ff33b73a5dbdadb2edf50626dc75dfdb45 /src/amd/vulkan
parent80b8d9f7e7b41cb07a4d4727035ed7ec4ca468cc (diff)
radv: dump shader stats when a hang occured
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_debug.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index 45dbe2b08dc..ee4c86e7ed3 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -82,7 +82,8 @@ radv_dump_trace(struct radv_device *device, struct radeon_winsys_cs *cs)
}
static void
-radv_dump_shader(struct radv_shader_variant *shader, gl_shader_stage stage,
+radv_dump_shader(struct radv_pipeline *pipeline,
+ struct radv_shader_variant *shader, gl_shader_stage stage,
FILE *f)
{
if (!shader)
@@ -90,6 +91,8 @@ radv_dump_shader(struct radv_shader_variant *shader, gl_shader_stage stage,
fprintf(f, "%s:\n%s\n\n", radv_get_shader_name(shader, stage),
shader->disasm_string);
+
+ radv_shader_dump_stats(pipeline->device, shader, stage, f);
}
static void
@@ -103,10 +106,10 @@ radv_dump_shaders(struct radv_pipeline *pipeline,
while (mask) {
int stage = u_bit_scan(&mask);
- radv_dump_shader(pipeline->shaders[stage], stage, f);
+ radv_dump_shader(pipeline, pipeline->shaders[stage], stage, f);
}
- radv_dump_shader(compute_shader, MESA_SHADER_COMPUTE, f);
+ radv_dump_shader(pipeline, compute_shader, MESA_SHADER_COMPUTE, f);
}
static void