return nir_intrinsic_load_subgroup_le_mask;
case SYSTEM_VALUE_SUBGROUP_LT_MASK:
return nir_intrinsic_load_subgroup_lt_mask;
+ case SYSTEM_VALUE_NUM_SUBGROUPS:
+ return nir_intrinsic_load_num_subgroups;
+ case SYSTEM_VALUE_SUBGROUP_ID:
+ return nir_intrinsic_load_subgroup_id;
case SYSTEM_VALUE_LOCAL_GROUP_SIZE:
return nir_intrinsic_load_local_group_size;
default:
return SYSTEM_VALUE_SUBGROUP_LE_MASK;
case nir_intrinsic_load_subgroup_lt_mask:
return SYSTEM_VALUE_SUBGROUP_LT_MASK;
+ case nir_intrinsic_load_num_subgroups:
+ return SYSTEM_VALUE_NUM_SUBGROUPS;
+ case nir_intrinsic_load_subgroup_id:
+ return SYSTEM_VALUE_SUBGROUP_ID;
case nir_intrinsic_load_local_group_size:
return SYSTEM_VALUE_LOCAL_GROUP_SIZE;
default:
SYSTEM_VALUE(subgroup_gt_mask, 0, 0, xx, xx, xx)
SYSTEM_VALUE(subgroup_le_mask, 0, 0, xx, xx, xx)
SYSTEM_VALUE(subgroup_lt_mask, 0, 0, xx, xx, xx)
+SYSTEM_VALUE(num_subgroups, 1, 0, xx, xx, xx)
SYSTEM_VALUE(subgroup_id, 1, 0, xx, xx, xx)
SYSTEM_VALUE(local_group_size, 3, 0, xx, xx, xx)
ENUM(SYSTEM_VALUE_SUBGROUP_GT_MASK),
ENUM(SYSTEM_VALUE_SUBGROUP_LE_MASK),
ENUM(SYSTEM_VALUE_SUBGROUP_LT_MASK),
+ ENUM(SYSTEM_VALUE_NUM_SUBGROUPS),
+ ENUM(SYSTEM_VALUE_SUBGROUP_ID),
ENUM(SYSTEM_VALUE_VERTEX_ID),
ENUM(SYSTEM_VALUE_INSTANCE_ID),
ENUM(SYSTEM_VALUE_INSTANCE_INDEX),
SYSTEM_VALUE_SUBGROUP_LT_MASK,
/*@}*/
+ /**
+ * Builtin variables added by VK_KHR_subgroups
+ */
+ /*@{*/
+ SYSTEM_VALUE_NUM_SUBGROUPS,
+ SYSTEM_VALUE_SUBGROUP_ID,
+ /*@}*/
+
/*@}*/
/**