diff options
author | Samuel Pitoiset <[email protected]> | 2017-09-22 16:44:08 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-10-04 19:37:08 +0200 |
commit | a2a350a3be1a4f3dec8cc3264a19eb877d606628 (patch) | |
tree | 32d8830a1ba76ef648e3ad2a6333fb9e0eded04f /src/amd/vulkan/radv_pipeline.c | |
parent | 94d800bfa364601faee73826c941015e2f15ae05 (diff) |
radv: dump NIR when a GPU hang is detected
This looks a bit ugly to me, but the existing codepath
is not terribly elegant as well.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_pipeline.c')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 228fdf4ab07..5800f297074 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -139,7 +139,7 @@ radv_pipeline_compile(struct radv_pipeline *pipeline, return NULL; if (!variant) { - variant = radv_shader_variant_create(pipeline->device, nir, + variant = radv_shader_variant_create(pipeline->device, module, nir, layout, key, &code, &code_size); } @@ -163,7 +163,7 @@ radv_pipeline_compile(struct radv_pipeline *pipeline, free(gs_copy_code); } - if (!module->nir) + if (!module->nir && !pipeline->device->trace_bo) ralloc_free(nir); if (variant) @@ -270,7 +270,7 @@ radv_tess_pipeline_compile(struct radv_pipeline *pipeline, nir_lower_tes_patch_vertices(tes_nir, tcs_nir->info.tess.tcs_vertices_out); - tes_variant = radv_shader_variant_create(pipeline->device, tes_nir, + tes_variant = radv_shader_variant_create(pipeline->device, tes_module, tes_nir, layout, &tes_key, &tes_code, &tes_code_size); @@ -282,14 +282,14 @@ radv_tess_pipeline_compile(struct radv_pipeline *pipeline, radv_hash_shader(tcs_sha1, tcs_module, tcs_entrypoint, tcs_spec_info, layout, &tcs_key, 0); - tcs_variant = radv_shader_variant_create(pipeline->device, tcs_nir, + tcs_variant = radv_shader_variant_create(pipeline->device, tcs_module, tcs_nir, layout, &tcs_key, &tcs_code, &tcs_code_size); - if (!tes_module->nir) + if (!tes_module->nir && !pipeline->device->trace_bo) ralloc_free(tes_nir); - if (!tcs_module->nir) + if (!tcs_module->nir && !pipeline->device->trace_bo) ralloc_free(tcs_nir); if (tes_variant) |