intel/compiler: Add swsb_stall debug option
When enabled, on gfx12 plus, we will add the sync nop instruction after each instruction to make sure that current instruction depends on the previous instruction explicitly. This option will help us to get a hint if something is missing or broken in software scoreboard pass. Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21797>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "brw_eu.h"
|
||||
#include "brw_fs.h"
|
||||
#include "brw_cfg.h"
|
||||
#include "dev/intel_debug.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "util/half_float.h"
|
||||
|
||||
@@ -2387,6 +2388,14 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width,
|
||||
brw_inst_set_no_dd_check(p->devinfo, last, inst->no_dd_check);
|
||||
}
|
||||
}
|
||||
|
||||
/* When enabled, insert sync NOP after every instruction and make sure
|
||||
* that current instruction depends on the previous instruction.
|
||||
*/
|
||||
if (INTEL_DEBUG(DEBUG_SWSB_STALL) && devinfo->ver >= 12) {
|
||||
brw_set_default_swsb(p, tgl_swsb_regdist(1));
|
||||
brw_SYNC(p, TGL_SYNC_NOP);
|
||||
}
|
||||
}
|
||||
|
||||
brw_set_uip_jip(p, start_offset);
|
||||
|
Reference in New Issue
Block a user