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: 9b9ccee4d6
("radv: take LDS into account for compute shader occupancy stats")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user