summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-07-18 10:44:10 +1000
committerDave Airlie <[email protected]>2019-07-19 11:00:25 +1000
commit2ac2b987801c60e5e141354ee1759b63ca85bf4c (patch)
tree7ce99827ddb2ea07921c7d1203dad9c0b06a5292 /src/amd/vulkan/radv_shader.c
parent80c2c17e1e5d93bef83fa711fab9d24c8de5bc36 (diff)
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 <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index ffbef6857b9..17ce6d3ef54 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -1234,7 +1234,7 @@ generate_shader_stats(struct radv_device *device,
lds_increment);
} else if (stage == MESA_SHADER_COMPUTE) {
unsigned max_workgroup_size =
- radv_nir_get_max_workgroup_size(chip_class, variant->nir);
+ radv_nir_get_max_workgroup_size(chip_class, stage, variant->nir);
lds_per_wave = (conf->lds_size * lds_increment) /
DIV_ROUND_UP(max_workgroup_size, 64);
}