aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Smith <[email protected]>2017-10-18 15:08:20 +0100
committerBas Nieuwenhuizen <[email protected]>2017-10-18 20:37:10 +0200
commitf5576732374b9e964394bd0c88fc3130f6453f15 (patch)
tree30d7bff59571eb0442c0755aea3176d4c8b5214b /src
parent84f3afc2e122cb418573f1e9c61716520f9859c1 (diff)
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 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_pipeline.c2
1 files changed, 1 insertions, 1 deletions
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]);
}