diff options
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 9 | ||||
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 30a90ac9608..d6b33a5327e 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1870,8 +1870,13 @@ void radv_create_shaders(struct radv_pipeline *pipeline, for (int i = 0; i < MESA_SHADER_STAGES; ++i) { free(codes[i]); - if (modules[i] && !pipeline->device->trace_bo) - ralloc_free(nir[i]); + if (modules[i]) { + if (device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS) + nir_print_shader(nir[i], stderr); + + if (!pipeline->device->trace_bo) + ralloc_free(nir[i]); + } } if (fs_m.nir) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 6176a2e590d..59039170687 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -291,9 +291,6 @@ radv_shader_compile_to_nir(struct radv_device *device, nir_remove_dead_variables(nir, nir_var_local); radv_optimize_nir(nir); - if (device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS) - nir_print_shader(nir, stderr); - return nir; } |