[Mesa-dev] [PATCH] radv: Don't free NIR shaders if tracing
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Oct 18 14:18:43 UTC 2017
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
On 10/18/2017 04:08 PM, Alex Smith wrote:
> Fixes a crash while generating a hang report.
>
> Fixes: 7d45d22fdd2e ("radv: switch to using radv_create_shaders()")
> Signed-off-by: Alex Smith <asmith at feralinteractive.com>
> ---
> src/amd/vulkan/radv_pipeline.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
> index a3d8660eda..b27b08f6aa 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -1696,7 +1696,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]);
> }
>
>
More information about the mesa-dev
mailing list