radv: drop the module reference in radv_can_dump_shader()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15766>
This commit is contained in:
Samuel Pitoiset
2022-04-06 12:23:40 +02:00
parent e11712a0a3
commit a434097453
3 changed files with 12 additions and 11 deletions

View File

@@ -4410,8 +4410,10 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_pipeline_layout
}
for (int i = 0; i < MESA_VULKAN_SHADER_STAGES; ++i) {
if (radv_can_dump_shader(device, modules[i], false))
nir_print_shader(nir[i], stderr);
if (nir[i]) {
if (radv_can_dump_shader(device, nir[i], false))
nir_print_shader(nir[i], stderr);
}
}
if (modules[MESA_SHADER_GEOMETRY] && !pipeline_has_ngg) {