From: Alex Smith Date: Wed, 18 Oct 2017 14:08:20 +0000 (+0100) Subject: radv: Don't free NIR shaders if tracing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5576732374b9e964394bd0c88fc3130f6453f15;p=mesa.git radv: Don't free NIR shaders if tracing Fixes a crash while generating a hang report. Fixes: 7d45d22fdd2e ("radv: switch to using radv_create_shaders()") Signed-off-by: Alex Smith Reviewed-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 0b95d008c07..c93871bfbcf 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1691,7 +1691,7 @@ void radv_create_shaders(struct radv_pipeline *pipeline, for (int i = 0; i < MESA_SHADER_STAGES; ++i) { free(codes[i]); - if (modules[i] && !modules[i]->nir) + if (modules[i] && !modules[i]->nir && !pipeline->device->trace_bo) ralloc_free(nir[i]); }