@@ -66,6 +66,7 @@ impl EnableExtension {
66
66
const F16 : & ' static str = "f16" ;
67
67
const CLIP_DISTANCES : & ' static str = "clip_distances" ;
68
68
const DUAL_SOURCE_BLENDING : & ' static str = "dual_source_blending" ;
69
+ const SUBGROUPS : & ' static str = "subgroups" ;
69
70
70
71
/// Convert from a sentinel word in WGSL into its associated [`EnableExtension`], if possible.
71
72
pub ( crate ) fn from_ident ( word : & str , span : Span ) -> Result < Self > {
@@ -77,6 +78,7 @@ impl EnableExtension {
77
78
Self :: DUAL_SOURCE_BLENDING => {
78
79
Self :: Implemented ( ImplementedEnableExtension :: DualSourceBlending )
79
80
}
81
+ Self :: SUBGROUPS => Self :: Unimplemented ( UnimplementedEnableExtension :: Subgroups ) ,
80
82
_ => return Err ( Box :: new ( Error :: UnknownEnableExtension ( span, word) ) ) ,
81
83
} )
82
84
}
@@ -90,6 +92,7 @@ impl EnableExtension {
90
92
} ,
91
93
Self :: Unimplemented ( kind) => match kind {
92
94
UnimplementedEnableExtension :: ClipDistances => Self :: CLIP_DISTANCES ,
95
+ UnimplementedEnableExtension :: Subgroups => Self :: SUBGROUPS ,
93
96
} ,
94
97
}
95
98
}
@@ -121,12 +124,19 @@ pub enum UnimplementedEnableExtension {
121
124
///
122
125
/// [`enable clip_distances;`]: https://www.w3.org/TR/WGSL/#extension-clip_distances
123
126
ClipDistances ,
127
+ /// Enables subgroup built-ins in all languages.
128
+ ///
129
+ /// In the WGSL standard, this corresponds to [`enable subgroups;`].
130
+ ///
131
+ /// [`enable subgroups;`]: https://www.w3.org/TR/WGSL/#extension-subgroups
132
+ Subgroups ,
124
133
}
125
134
126
135
impl UnimplementedEnableExtension {
127
136
pub ( crate ) const fn tracking_issue_num ( self ) -> u16 {
128
137
match self {
129
138
Self :: ClipDistances => 6236 ,
139
+ Self :: Subgroups => 5555 ,
130
140
}
131
141
}
132
142
}
0 commit comments