diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index d46a2cd591b..c65aae745f7 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -452,7 +452,7 @@ radv_dump_shader(struct radv_pipeline *pipeline, struct radv_shader *shader, shader->ir_string); fprintf(f, "DISASM:\n%s\n", shader->disasm_string); - radv_dump_shader_stats(pipeline->device, pipeline, stage, f); + radv_dump_shader_stats(pipeline->device, pipeline, shader, stage, f); } static void diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 64b4a6f970b..207d8c2c766 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3552,7 +3552,7 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline, free(binaries[i]); if (stages[i].nir) { if (radv_can_dump_shader_stats(device, stages[i].nir) && pipeline->base.shaders[i]) { - radv_dump_shader_stats(device, &pipeline->base, i, stderr); + radv_dump_shader_stats(device, &pipeline->base, pipeline->base.shaders[i], i, stderr); } ralloc_free(stages[i].nir); @@ -5412,7 +5412,8 @@ radv_compute_pipeline_compile(struct radv_compute_pipeline *pipeline, free(binaries[MESA_SHADER_COMPUTE]); if (radv_can_dump_shader_stats(device, cs_stage.nir)) { - radv_dump_shader_stats(device, &pipeline->base, MESA_SHADER_COMPUTE, stderr); + radv_dump_shader_stats(device, &pipeline->base, pipeline->base.shaders[MESA_SHADER_COMPUTE], + MESA_SHADER_COMPUTE, stderr); } ralloc_free(cs_stage.nir); diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index 9a3dcc7fc1e..89267c842de 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -311,7 +311,8 @@ radv_rt_pipeline_compile(struct radv_pipeline *pipeline, free(binaries[rt_stage.stage]); if (radv_can_dump_shader_stats(device, rt_stage.nir)) { - radv_dump_shader_stats(device, pipeline, rt_stage.stage, stderr); + radv_dump_shader_stats(device, pipeline, pipeline->shaders[rt_stage.stage], rt_stage.stage, + stderr); } ralloc_free(rt_stage.nir); diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 0da4fe66420..5f855206c5e 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -3230,9 +3230,8 @@ radv_compute_spi_ps_input(const struct radv_pipeline_key *pipeline_key, VkResult radv_dump_shader_stats(struct radv_device *device, struct radv_pipeline *pipeline, - gl_shader_stage stage, FILE *output) + struct radv_shader *shader, gl_shader_stage stage, FILE *output) { - struct radv_shader *shader = pipeline->shaders[stage]; VkPipelineExecutablePropertiesKHR *props = NULL; uint32_t prop_count = 0; VkResult result; diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 1380e2a2897..46ac486f5a0 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -650,7 +650,7 @@ bool radv_can_dump_shader(struct radv_device *device, nir_shader *nir, bool meta bool radv_can_dump_shader_stats(struct radv_device *device, nir_shader *nir); VkResult radv_dump_shader_stats(struct radv_device *device, struct radv_pipeline *pipeline, - gl_shader_stage stage, FILE *output); + struct radv_shader *shader, gl_shader_stage stage, FILE *output); static inline struct radv_shader * radv_shader_ref(struct radv_shader *shader)