diff options
author | Timothy Arceri <[email protected]> | 2017-10-24 09:08:55 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-10-24 10:41:38 +1100 |
commit | f0a2bbd1a4a0caf85d91469e61d01a126cfc2a36 (patch) | |
tree | 6f2e0ea64ff3804a3e60276c326933439fce1486 /src/amd/vulkan/radv_pipeline.c | |
parent | 11d688d9f0d2ee4d0178d1807c0075e5e8364b1d (diff) |
radv: move nir print after linking is done
We now have linking optimisations so we want to delay dumping the
nir until after these are complete.
Fixes: 06f05040eb73 (radv: Link shaders)
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_pipeline.c')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 9 |
1 files changed, 7 insertions, 2 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) |