struct brw_tcs_prog_data *tcs_prog_data = brw_tcs_prog_data(prog_data);
struct brw_vue_prog_data *vue_prog_data = &tcs_prog_data->base;
+ const bool dg2_plus =
+ devinfo->ver > 12 || intel_device_info_is_dg2(devinfo);
const unsigned instance_id_mask =
- devinfo->ver >= 11 ? INTEL_MASK(22, 16) : INTEL_MASK(23, 17);
+ dg2_plus ? INTEL_MASK(7, 0) :
+ (devinfo->ver >= 11) ? INTEL_MASK(22, 16) : INTEL_MASK(23, 17);
const unsigned instance_id_shift =
- devinfo->ver >= 11 ? 16 : 17;
+ dg2_plus ? 0 : (devinfo->ver >= 11) ? 16 : 17;
- /* Get instance number from g0.2 bits 22:16 or 23:17 */
+ /* Get instance number from g0.2 bits:
+ * * 7:0 on DG2+
+ * * 22:16 on gfx11+
+ * * 23:17 otherwise
+ */
fs_reg t = bld.vgrf(BRW_REGISTER_TYPE_UD);
bld.AND(t, fs_reg(retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_UD)),
brw_imm_ud(instance_id_mask));