SYSTEM_VALUE(user_clip_plane, 4, 1, UCP_ID, xx, xx)
SYSTEM_VALUE(num_work_groups, 3, 0, xx, xx, xx)
SYSTEM_VALUE(helper_invocation, 1, 0, xx, xx, xx)
+SYSTEM_VALUE(channel_num, 1, 0, xx, xx, xx)
/*
* Load operations pull data from some piece of GPU memory. All load
break;
}
+ case nir_intrinsic_load_channel_num: {
+ fs_reg tmp = bld.vgrf(BRW_REGISTER_TYPE_UW);
+ dest = retype(dest, BRW_REGISTER_TYPE_UD);
+ const fs_builder allbld8 = bld.group(8, 0).exec_all();
+ allbld8.MOV(tmp, brw_imm_v(0x76543210));
+ if (dispatch_width > 8)
+ allbld8.ADD(byte_offset(tmp, 16), tmp, brw_imm_uw(8u));
+ if (dispatch_width > 16) {
+ const fs_builder allbld16 = bld.group(16, 0).exec_all();
+ allbld16.ADD(byte_offset(tmp, 32), tmp, brw_imm_uw(16u));
+ }
+ bld.MOV(dest, tmp);
+ break;
+ }
+
default:
unreachable("unknown intrinsic");
}