radv: fix crash in shader tracing.
authorDave Airlie <airlied@redhat.com>
Thu, 18 Jul 2019 00:44:10 +0000 (10:44 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 19 Jul 2019 01:00:25 +0000 (11:00 +1000)
commit2ac2b987801c60e5e141354ee1759b63ca85bf4c
tree7ce99827ddb2ea07921c7d1203dad9c0b06a5292
parent80c2c17e1e5d93bef83fa711fab9d24c8de5bc36
radv: fix crash in shader tracing.

Enabling tracing, and then having a vmfault, can leads to a segfault
before we print out the traces, as if a meta shader is executing
and we don't have the NIR for it.

Just pass the stage and give back a default.

Fixes: 9b9ccee4d64 ("radv: take LDS into account for compute shader occupancy stats")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_nir_to_llvm.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_shader.c