GFX10 has two rings, so UMR want to know which one to halt.
Select the first one by default.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
}
/* Return wave information. "waves" should be a large enough array. */
-unsigned ac_get_wave_info(struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP])
+unsigned ac_get_wave_info(enum chip_class chip_class,
+ struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP])
{
- char line[2000];
+ char line[2000], cmd[128];
unsigned num_waves = 0;
- FILE *p = popen("umr -O halt_waves -wa", "r");
+ sprintf(cmd, "umr -O halt_waves -wa %s", chip_class >= GFX10 ? "gfx_0.0.0" : "gfx");
+
+ FILE *p = popen(cmd, "r");
if (!p)
return 0;
bool ac_vm_fault_occured(enum chip_class chip_class,
uint64_t *old_dmesg_timestamp, uint64_t *out_addr);
-unsigned ac_get_wave_info(struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP]);
+unsigned ac_get_wave_info(enum chip_class chip_class,
+ struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP]);
#endif
VkShaderStageFlagBits active_stages, FILE *f)
{
struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP];
- unsigned num_waves = ac_get_wave_info(waves);
+ enum chip_class chip_class = pipeline->device->physical_device->rad_info.chip_class;
+ unsigned num_waves = ac_get_wave_info(chip_class, waves);
fprintf(f, COLOR_CYAN "The number of active waves = %u" COLOR_RESET
"\n\n", num_waves);
static void si_dump_annotated_shaders(struct si_context *sctx, FILE *f)
{
struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP];
- unsigned num_waves = ac_get_wave_info(waves);
+ unsigned num_waves = ac_get_wave_info(sctx->chip_class, waves);
fprintf(f, COLOR_CYAN "The number of active waves = %u" COLOR_RESET
"\n\n", num_waves);