v3d: Dump the VIR after register spilling if we were forced to.

Spilling is unusual, but one often has to debug it when it happens, so
dump it.
This commit is contained in:
Eric Anholt 2019-02-25 16:27:41 -08:00
parent 2786d2161a
commit e0fada983d

View file

@ -2670,5 +2670,15 @@ v3d_nir_to_vir(struct v3d_compile *c)
vir_remove_thrsw(c);
}
if (c->spill_size &&
(V3D_DEBUG & (V3D_DEBUG_VIR |
v3d_debug_flag_for_shader_stage(c->s->info.stage)))) {
fprintf(stderr, "%s prog %d/%d spilled VIR:\n",
vir_get_stage_name(c),
c->program_id, c->variant_id);
vir_dump(c);
fprintf(stderr, "\n");
}
v3d_vir_to_qpu(c, temp_registers);
}