Module: Mesa
Branch: master
Commit: f5576732374b9e964394bd0c88fc3130f6453f15
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5576732374b9e964394bd0c88fc3130f6453f15

Author: Alex Smith <[email protected]>
Date:   Wed Oct 18 15:08:20 2017 +0100

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]>

---

 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 0b95d008c0..c93871bfbc 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]);
        }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to