summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.h
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-22 16:44:08 +0200
committerSamuel Pitoiset <[email protected]>2017-10-04 19:37:08 +0200
commita2a350a3be1a4f3dec8cc3264a19eb877d606628 (patch)
tree32d8830a1ba76ef648e3ad2a6333fb9e0eded04f /src/amd/vulkan/radv_shader.h
parent94d800bfa364601faee73826c941015e2f15ae05 (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_shader.h')
-rw-r--r--src/amd/vulkan/radv_shader.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h
index 467557e5fc3..7ad38bf5792 100644
--- a/src/amd/vulkan/radv_shader.h
+++ b/src/amd/vulkan/radv_shader.h
@@ -49,7 +49,10 @@ struct radv_shader_variant {
struct ac_shader_variant_info info;
unsigned rsrc1;
unsigned rsrc2;
- char *disasm_string; /* debug only */
+
+ /* debug only */
+ struct nir_shader *nir;
+ char *disasm_string;
struct list_head slab_list;
};
@@ -78,6 +81,7 @@ radv_destroy_shader_slabs(struct radv_device *device);
struct radv_shader_variant *
radv_shader_variant_create(struct radv_device *device,
+ struct radv_shader_module *module,
struct nir_shader *shader,
struct radv_pipeline_layout *layout,
const struct ac_shader_variant_key *key,