1#![doc = r" SPIR-V enums"]
2#![doc = r""]
3#![doc = r" This file is auto-generated, do not modify manually."]
4use crate::{core::*, module::*, op::*, stream::*};
5use core::fmt::{self, Display};
6use core::ops::{BitAnd, BitOr};
7struct BitFmt(u32);
8impl BitFmt {
9 pub fn fmt(&mut self, value: u32, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10 if self.0 != 0 {
11 write!(f, "|")?;
12 }
13 self.0 |= value;
14 Ok(())
15 }
16}
17#[derive(Clone, Copy, PartialEq, Eq, Debug)]
18pub struct ImageOperands(pub(crate) u32);
19impl ImageOperands {
20 pub const NONE: Self = Self(0x0000);
21 pub const BIAS: Self = Self(0x0001);
22 pub const LOD: Self = Self(0x0002);
23 pub const GRAD: Self = Self(0x0004);
24 pub const CONST_OFFSET: Self = Self(0x0008);
25 pub const OFFSET: Self = Self(0x0010);
26 pub const CONST_OFFSETS: Self = Self(0x0020);
27 pub const SAMPLE: Self = Self(0x0040);
28 pub const MIN_LOD: Self = Self(0x0080);
29 pub const MAKE_TEXEL_AVAILABLE: Self = Self(0x0100);
30 pub const MAKE_TEXEL_VISIBLE: Self = Self(0x0200);
31 pub const NON_PRIVATE_TEXEL: Self = Self(0x0400);
32 pub const VOLATILE_TEXEL: Self = Self(0x0800);
33 pub const SIGN_EXTEND: Self = Self(0x1000);
34 pub const ZERO_EXTEND: Self = Self(0x2000);
35 pub const NONTEMPORAL: Self = Self(0x4000);
36 pub const OFFSETS: Self = Self(0x10000);
37}
38impl Word for ImageOperands {
39 #[inline]
40 fn from_word(word: u32) -> Self {
41 Self(word)
42 }
43}
44impl BitAnd for ImageOperands {
45 type Output = Self;
46 #[inline]
47 fn bitand(self, rhs: Self) -> Self {
48 Self(self.0 & rhs.0)
49 }
50}
51impl BitOr for ImageOperands {
52 type Output = Self;
53 #[inline]
54 fn bitor(self, rhs: Self) -> Self {
55 Self(self.0 | rhs.0)
56 }
57}
58impl Display for ImageOperands {
59 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
60 if self.0 == 0 {
61 return write!(f, "None");
62 }
63 let mut bitfmt = BitFmt(0);
64 if *self & Self::BIAS == Self::BIAS {
65 bitfmt.fmt(Self::BIAS.0, f)?;
66 write!(f, "Bias")?;
67 }
68 if *self & Self::LOD == Self::LOD {
69 bitfmt.fmt(Self::LOD.0, f)?;
70 write!(f, "Lod")?;
71 }
72 if *self & Self::GRAD == Self::GRAD {
73 bitfmt.fmt(Self::GRAD.0, f)?;
74 write!(f, "Grad")?;
75 }
76 if *self & Self::CONST_OFFSET == Self::CONST_OFFSET {
77 bitfmt.fmt(Self::CONST_OFFSET.0, f)?;
78 write!(f, "ConstOffset")?;
79 }
80 if *self & Self::OFFSET == Self::OFFSET {
81 bitfmt.fmt(Self::OFFSET.0, f)?;
82 write!(f, "Offset")?;
83 }
84 if *self & Self::CONST_OFFSETS == Self::CONST_OFFSETS {
85 bitfmt.fmt(Self::CONST_OFFSETS.0, f)?;
86 write!(f, "ConstOffsets")?;
87 }
88 if *self & Self::SAMPLE == Self::SAMPLE {
89 bitfmt.fmt(Self::SAMPLE.0, f)?;
90 write!(f, "Sample")?;
91 }
92 if *self & Self::MIN_LOD == Self::MIN_LOD {
93 bitfmt.fmt(Self::MIN_LOD.0, f)?;
94 write!(f, "MinLod")?;
95 }
96 if *self & Self::MAKE_TEXEL_AVAILABLE == Self::MAKE_TEXEL_AVAILABLE {
97 bitfmt.fmt(Self::MAKE_TEXEL_AVAILABLE.0, f)?;
98 write!(f, "MakeTexelAvailable")?;
99 }
100 if *self & Self::MAKE_TEXEL_VISIBLE == Self::MAKE_TEXEL_VISIBLE {
101 bitfmt.fmt(Self::MAKE_TEXEL_VISIBLE.0, f)?;
102 write!(f, "MakeTexelVisible")?;
103 }
104 if *self & Self::NON_PRIVATE_TEXEL == Self::NON_PRIVATE_TEXEL {
105 bitfmt.fmt(Self::NON_PRIVATE_TEXEL.0, f)?;
106 write!(f, "NonPrivateTexel")?;
107 }
108 if *self & Self::VOLATILE_TEXEL == Self::VOLATILE_TEXEL {
109 bitfmt.fmt(Self::VOLATILE_TEXEL.0, f)?;
110 write!(f, "VolatileTexel")?;
111 }
112 if *self & Self::SIGN_EXTEND == Self::SIGN_EXTEND {
113 bitfmt.fmt(Self::SIGN_EXTEND.0, f)?;
114 write!(f, "SignExtend")?;
115 }
116 if *self & Self::ZERO_EXTEND == Self::ZERO_EXTEND {
117 bitfmt.fmt(Self::ZERO_EXTEND.0, f)?;
118 write!(f, "ZeroExtend")?;
119 }
120 if *self & Self::NONTEMPORAL == Self::NONTEMPORAL {
121 bitfmt.fmt(Self::NONTEMPORAL.0, f)?;
122 write!(f, "Nontemporal")?;
123 }
124 if *self & Self::OFFSETS == Self::OFFSETS {
125 bitfmt.fmt(Self::OFFSETS.0, f)?;
126 write!(f, "Offsets")?;
127 }
128 Ok(())
129 }
130}
131#[derive(Clone, Copy, PartialEq, Eq, Debug)]
132pub struct FPFastMathMode(pub(crate) u32);
133impl FPFastMathMode {
134 pub const NONE: Self = Self(0x0000);
135 pub const NOT_NA_N: Self = Self(0x0001);
136 pub const NOT_INF: Self = Self(0x0002);
137 pub const NSZ: Self = Self(0x0004);
138 pub const ALLOW_RECIP: Self = Self(0x0008);
139 pub const FAST: Self = Self(0x0010);
140 pub const ALLOW_CONTRACT: Self = Self(0x10000);
141 pub const ALLOW_REASSOC: Self = Self(0x20000);
142 pub const ALLOW_TRANSFORM: Self = Self(0x40000);
143}
144impl Word for FPFastMathMode {
145 #[inline]
146 fn from_word(word: u32) -> Self {
147 Self(word)
148 }
149}
150impl BitAnd for FPFastMathMode {
151 type Output = Self;
152 #[inline]
153 fn bitand(self, rhs: Self) -> Self {
154 Self(self.0 & rhs.0)
155 }
156}
157impl BitOr for FPFastMathMode {
158 type Output = Self;
159 #[inline]
160 fn bitor(self, rhs: Self) -> Self {
161 Self(self.0 | rhs.0)
162 }
163}
164impl Display for FPFastMathMode {
165 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
166 if self.0 == 0 {
167 return write!(f, "None");
168 }
169 let mut bitfmt = BitFmt(0);
170 if *self & Self::NOT_NA_N == Self::NOT_NA_N {
171 bitfmt.fmt(Self::NOT_NA_N.0, f)?;
172 write!(f, "NotNaN")?;
173 }
174 if *self & Self::NOT_INF == Self::NOT_INF {
175 bitfmt.fmt(Self::NOT_INF.0, f)?;
176 write!(f, "NotInf")?;
177 }
178 if *self & Self::NSZ == Self::NSZ {
179 bitfmt.fmt(Self::NSZ.0, f)?;
180 write!(f, "NSZ")?;
181 }
182 if *self & Self::ALLOW_RECIP == Self::ALLOW_RECIP {
183 bitfmt.fmt(Self::ALLOW_RECIP.0, f)?;
184 write!(f, "AllowRecip")?;
185 }
186 if *self & Self::FAST == Self::FAST {
187 bitfmt.fmt(Self::FAST.0, f)?;
188 write!(f, "Fast")?;
189 }
190 if *self & Self::ALLOW_CONTRACT == Self::ALLOW_CONTRACT {
191 bitfmt.fmt(Self::ALLOW_CONTRACT.0, f)?;
192 write!(f, "AllowContract")?;
193 }
194 if *self & Self::ALLOW_REASSOC == Self::ALLOW_REASSOC {
195 bitfmt.fmt(Self::ALLOW_REASSOC.0, f)?;
196 write!(f, "AllowReassoc")?;
197 }
198 if *self & Self::ALLOW_TRANSFORM == Self::ALLOW_TRANSFORM {
199 bitfmt.fmt(Self::ALLOW_TRANSFORM.0, f)?;
200 write!(f, "AllowTransform")?;
201 }
202 Ok(())
203 }
204}
205#[derive(Clone, Copy, PartialEq, Eq, Debug)]
206pub struct SelectionControl(pub(crate) u32);
207impl SelectionControl {
208 pub const NONE: Self = Self(0x0000);
209 pub const FLATTEN: Self = Self(0x0001);
210 pub const DONT_FLATTEN: Self = Self(0x0002);
211}
212impl Word for SelectionControl {
213 #[inline]
214 fn from_word(word: u32) -> Self {
215 Self(word)
216 }
217}
218impl BitAnd for SelectionControl {
219 type Output = Self;
220 #[inline]
221 fn bitand(self, rhs: Self) -> Self {
222 Self(self.0 & rhs.0)
223 }
224}
225impl BitOr for SelectionControl {
226 type Output = Self;
227 #[inline]
228 fn bitor(self, rhs: Self) -> Self {
229 Self(self.0 | rhs.0)
230 }
231}
232impl Display for SelectionControl {
233 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
234 if self.0 == 0 {
235 return write!(f, "None");
236 }
237 let mut bitfmt = BitFmt(0);
238 if *self & Self::FLATTEN == Self::FLATTEN {
239 bitfmt.fmt(Self::FLATTEN.0, f)?;
240 write!(f, "Flatten")?;
241 }
242 if *self & Self::DONT_FLATTEN == Self::DONT_FLATTEN {
243 bitfmt.fmt(Self::DONT_FLATTEN.0, f)?;
244 write!(f, "DontFlatten")?;
245 }
246 Ok(())
247 }
248}
249#[derive(Clone, Copy, PartialEq, Eq, Debug)]
250pub struct LoopControl(pub(crate) u32);
251impl LoopControl {
252 pub const NONE: Self = Self(0x0000);
253 pub const UNROLL: Self = Self(0x0001);
254 pub const DONT_UNROLL: Self = Self(0x0002);
255 pub const DEPENDENCY_INFINITE: Self = Self(0x0004);
256 pub const DEPENDENCY_LENGTH: Self = Self(0x0008);
257 pub const MIN_ITERATIONS: Self = Self(0x0010);
258 pub const MAX_ITERATIONS: Self = Self(0x0020);
259 pub const ITERATION_MULTIPLE: Self = Self(0x0040);
260 pub const PEEL_COUNT: Self = Self(0x0080);
261 pub const PARTIAL_COUNT: Self = Self(0x0100);
262 pub const INITIATION_INTERVAL_ALTERA: Self = Self(0x10000);
263 pub const MAX_CONCURRENCY_ALTERA: Self = Self(0x20000);
264 pub const DEPENDENCY_ARRAY_ALTERA: Self = Self(0x40000);
265 pub const PIPELINE_ENABLE_ALTERA: Self = Self(0x80000);
266 pub const LOOP_COALESCE_ALTERA: Self = Self(0x100000);
267 pub const MAX_INTERLEAVING_ALTERA: Self = Self(0x200000);
268 pub const SPECULATED_ITERATIONS_ALTERA: Self = Self(0x400000);
269 pub const NO_FUSION_ALTERA: Self = Self(0x800000);
270 pub const LOOP_COUNT_ALTERA: Self = Self(0x1000000);
271 pub const MAX_REINVOCATION_DELAY_ALTERA: Self = Self(0x2000000);
272}
273impl Word for LoopControl {
274 #[inline]
275 fn from_word(word: u32) -> Self {
276 Self(word)
277 }
278}
279impl BitAnd for LoopControl {
280 type Output = Self;
281 #[inline]
282 fn bitand(self, rhs: Self) -> Self {
283 Self(self.0 & rhs.0)
284 }
285}
286impl BitOr for LoopControl {
287 type Output = Self;
288 #[inline]
289 fn bitor(self, rhs: Self) -> Self {
290 Self(self.0 | rhs.0)
291 }
292}
293impl Display for LoopControl {
294 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
295 if self.0 == 0 {
296 return write!(f, "None");
297 }
298 let mut bitfmt = BitFmt(0);
299 if *self & Self::UNROLL == Self::UNROLL {
300 bitfmt.fmt(Self::UNROLL.0, f)?;
301 write!(f, "Unroll")?;
302 }
303 if *self & Self::DONT_UNROLL == Self::DONT_UNROLL {
304 bitfmt.fmt(Self::DONT_UNROLL.0, f)?;
305 write!(f, "DontUnroll")?;
306 }
307 if *self & Self::DEPENDENCY_INFINITE == Self::DEPENDENCY_INFINITE {
308 bitfmt.fmt(Self::DEPENDENCY_INFINITE.0, f)?;
309 write!(f, "DependencyInfinite")?;
310 }
311 if *self & Self::DEPENDENCY_LENGTH == Self::DEPENDENCY_LENGTH {
312 bitfmt.fmt(Self::DEPENDENCY_LENGTH.0, f)?;
313 write!(f, "DependencyLength")?;
314 }
315 if *self & Self::MIN_ITERATIONS == Self::MIN_ITERATIONS {
316 bitfmt.fmt(Self::MIN_ITERATIONS.0, f)?;
317 write!(f, "MinIterations")?;
318 }
319 if *self & Self::MAX_ITERATIONS == Self::MAX_ITERATIONS {
320 bitfmt.fmt(Self::MAX_ITERATIONS.0, f)?;
321 write!(f, "MaxIterations")?;
322 }
323 if *self & Self::ITERATION_MULTIPLE == Self::ITERATION_MULTIPLE {
324 bitfmt.fmt(Self::ITERATION_MULTIPLE.0, f)?;
325 write!(f, "IterationMultiple")?;
326 }
327 if *self & Self::PEEL_COUNT == Self::PEEL_COUNT {
328 bitfmt.fmt(Self::PEEL_COUNT.0, f)?;
329 write!(f, "PeelCount")?;
330 }
331 if *self & Self::PARTIAL_COUNT == Self::PARTIAL_COUNT {
332 bitfmt.fmt(Self::PARTIAL_COUNT.0, f)?;
333 write!(f, "PartialCount")?;
334 }
335 if *self & Self::INITIATION_INTERVAL_ALTERA == Self::INITIATION_INTERVAL_ALTERA {
336 bitfmt.fmt(Self::INITIATION_INTERVAL_ALTERA.0, f)?;
337 write!(f, "InitiationIntervalALTERA")?;
338 }
339 if *self & Self::MAX_CONCURRENCY_ALTERA == Self::MAX_CONCURRENCY_ALTERA {
340 bitfmt.fmt(Self::MAX_CONCURRENCY_ALTERA.0, f)?;
341 write!(f, "MaxConcurrencyALTERA")?;
342 }
343 if *self & Self::DEPENDENCY_ARRAY_ALTERA == Self::DEPENDENCY_ARRAY_ALTERA {
344 bitfmt.fmt(Self::DEPENDENCY_ARRAY_ALTERA.0, f)?;
345 write!(f, "DependencyArrayALTERA")?;
346 }
347 if *self & Self::PIPELINE_ENABLE_ALTERA == Self::PIPELINE_ENABLE_ALTERA {
348 bitfmt.fmt(Self::PIPELINE_ENABLE_ALTERA.0, f)?;
349 write!(f, "PipelineEnableALTERA")?;
350 }
351 if *self & Self::LOOP_COALESCE_ALTERA == Self::LOOP_COALESCE_ALTERA {
352 bitfmt.fmt(Self::LOOP_COALESCE_ALTERA.0, f)?;
353 write!(f, "LoopCoalesceALTERA")?;
354 }
355 if *self & Self::MAX_INTERLEAVING_ALTERA == Self::MAX_INTERLEAVING_ALTERA {
356 bitfmt.fmt(Self::MAX_INTERLEAVING_ALTERA.0, f)?;
357 write!(f, "MaxInterleavingALTERA")?;
358 }
359 if *self & Self::SPECULATED_ITERATIONS_ALTERA == Self::SPECULATED_ITERATIONS_ALTERA {
360 bitfmt.fmt(Self::SPECULATED_ITERATIONS_ALTERA.0, f)?;
361 write!(f, "SpeculatedIterationsALTERA")?;
362 }
363 if *self & Self::NO_FUSION_ALTERA == Self::NO_FUSION_ALTERA {
364 bitfmt.fmt(Self::NO_FUSION_ALTERA.0, f)?;
365 write!(f, "NoFusionALTERA")?;
366 }
367 if *self & Self::LOOP_COUNT_ALTERA == Self::LOOP_COUNT_ALTERA {
368 bitfmt.fmt(Self::LOOP_COUNT_ALTERA.0, f)?;
369 write!(f, "LoopCountALTERA")?;
370 }
371 if *self & Self::MAX_REINVOCATION_DELAY_ALTERA == Self::MAX_REINVOCATION_DELAY_ALTERA {
372 bitfmt.fmt(Self::MAX_REINVOCATION_DELAY_ALTERA.0, f)?;
373 write!(f, "MaxReinvocationDelayALTERA")?;
374 }
375 Ok(())
376 }
377}
378#[derive(Clone, Copy, PartialEq, Eq, Debug)]
379pub struct FunctionControl(pub(crate) u32);
380impl FunctionControl {
381 pub const NONE: Self = Self(0x0000);
382 pub const INLINE: Self = Self(0x0001);
383 pub const DONT_INLINE: Self = Self(0x0002);
384 pub const PURE: Self = Self(0x0004);
385 pub const CONST: Self = Self(0x0008);
386 pub const OPT_NONE_EXT: Self = Self(0x10000);
387}
388impl Word for FunctionControl {
389 #[inline]
390 fn from_word(word: u32) -> Self {
391 Self(word)
392 }
393}
394impl BitAnd for FunctionControl {
395 type Output = Self;
396 #[inline]
397 fn bitand(self, rhs: Self) -> Self {
398 Self(self.0 & rhs.0)
399 }
400}
401impl BitOr for FunctionControl {
402 type Output = Self;
403 #[inline]
404 fn bitor(self, rhs: Self) -> Self {
405 Self(self.0 | rhs.0)
406 }
407}
408impl Display for FunctionControl {
409 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
410 if self.0 == 0 {
411 return write!(f, "None");
412 }
413 let mut bitfmt = BitFmt(0);
414 if *self & Self::INLINE == Self::INLINE {
415 bitfmt.fmt(Self::INLINE.0, f)?;
416 write!(f, "Inline")?;
417 }
418 if *self & Self::DONT_INLINE == Self::DONT_INLINE {
419 bitfmt.fmt(Self::DONT_INLINE.0, f)?;
420 write!(f, "DontInline")?;
421 }
422 if *self & Self::PURE == Self::PURE {
423 bitfmt.fmt(Self::PURE.0, f)?;
424 write!(f, "Pure")?;
425 }
426 if *self & Self::CONST == Self::CONST {
427 bitfmt.fmt(Self::CONST.0, f)?;
428 write!(f, "Const")?;
429 }
430 if *self & Self::OPT_NONE_EXT == Self::OPT_NONE_EXT {
431 bitfmt.fmt(Self::OPT_NONE_EXT.0, f)?;
432 write!(f, "OptNoneEXT")?;
433 }
434 Ok(())
435 }
436}
437#[derive(Clone, Copy, PartialEq, Eq, Debug)]
438pub struct MemorySemantics(pub(crate) u32);
439impl MemorySemantics {
440 pub const RELAXED: Self = Self(0x0000);
441 pub const ACQUIRE: Self = Self(0x0002);
442 pub const RELEASE: Self = Self(0x0004);
443 pub const ACQUIRE_RELEASE: Self = Self(0x0008);
444 pub const SEQUENTIALLY_CONSISTENT: Self = Self(0x0010);
445 pub const UNIFORM_MEMORY: Self = Self(0x0040);
446 pub const SUBGROUP_MEMORY: Self = Self(0x0080);
447 pub const WORKGROUP_MEMORY: Self = Self(0x0100);
448 pub const CROSS_WORKGROUP_MEMORY: Self = Self(0x0200);
449 pub const ATOMIC_COUNTER_MEMORY: Self = Self(0x0400);
450 pub const IMAGE_MEMORY: Self = Self(0x0800);
451 pub const OUTPUT_MEMORY: Self = Self(0x1000);
452 pub const MAKE_AVAILABLE: Self = Self(0x2000);
453 pub const MAKE_VISIBLE: Self = Self(0x4000);
454 pub const VOLATILE: Self = Self(0x8000);
455}
456impl Word for MemorySemantics {
457 #[inline]
458 fn from_word(word: u32) -> Self {
459 Self(word)
460 }
461}
462impl BitAnd for MemorySemantics {
463 type Output = Self;
464 #[inline]
465 fn bitand(self, rhs: Self) -> Self {
466 Self(self.0 & rhs.0)
467 }
468}
469impl BitOr for MemorySemantics {
470 type Output = Self;
471 #[inline]
472 fn bitor(self, rhs: Self) -> Self {
473 Self(self.0 | rhs.0)
474 }
475}
476impl Display for MemorySemantics {
477 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
478 if self.0 == 0 {
479 return write!(f, "None");
480 }
481 let mut bitfmt = BitFmt(0);
482 if *self & Self::ACQUIRE == Self::ACQUIRE {
483 bitfmt.fmt(Self::ACQUIRE.0, f)?;
484 write!(f, "Acquire")?;
485 }
486 if *self & Self::RELEASE == Self::RELEASE {
487 bitfmt.fmt(Self::RELEASE.0, f)?;
488 write!(f, "Release")?;
489 }
490 if *self & Self::ACQUIRE_RELEASE == Self::ACQUIRE_RELEASE {
491 bitfmt.fmt(Self::ACQUIRE_RELEASE.0, f)?;
492 write!(f, "AcquireRelease")?;
493 }
494 if *self & Self::SEQUENTIALLY_CONSISTENT == Self::SEQUENTIALLY_CONSISTENT {
495 bitfmt.fmt(Self::SEQUENTIALLY_CONSISTENT.0, f)?;
496 write!(f, "SequentiallyConsistent")?;
497 }
498 if *self & Self::UNIFORM_MEMORY == Self::UNIFORM_MEMORY {
499 bitfmt.fmt(Self::UNIFORM_MEMORY.0, f)?;
500 write!(f, "UniformMemory")?;
501 }
502 if *self & Self::SUBGROUP_MEMORY == Self::SUBGROUP_MEMORY {
503 bitfmt.fmt(Self::SUBGROUP_MEMORY.0, f)?;
504 write!(f, "SubgroupMemory")?;
505 }
506 if *self & Self::WORKGROUP_MEMORY == Self::WORKGROUP_MEMORY {
507 bitfmt.fmt(Self::WORKGROUP_MEMORY.0, f)?;
508 write!(f, "WorkgroupMemory")?;
509 }
510 if *self & Self::CROSS_WORKGROUP_MEMORY == Self::CROSS_WORKGROUP_MEMORY {
511 bitfmt.fmt(Self::CROSS_WORKGROUP_MEMORY.0, f)?;
512 write!(f, "CrossWorkgroupMemory")?;
513 }
514 if *self & Self::ATOMIC_COUNTER_MEMORY == Self::ATOMIC_COUNTER_MEMORY {
515 bitfmt.fmt(Self::ATOMIC_COUNTER_MEMORY.0, f)?;
516 write!(f, "AtomicCounterMemory")?;
517 }
518 if *self & Self::IMAGE_MEMORY == Self::IMAGE_MEMORY {
519 bitfmt.fmt(Self::IMAGE_MEMORY.0, f)?;
520 write!(f, "ImageMemory")?;
521 }
522 if *self & Self::OUTPUT_MEMORY == Self::OUTPUT_MEMORY {
523 bitfmt.fmt(Self::OUTPUT_MEMORY.0, f)?;
524 write!(f, "OutputMemory")?;
525 }
526 if *self & Self::MAKE_AVAILABLE == Self::MAKE_AVAILABLE {
527 bitfmt.fmt(Self::MAKE_AVAILABLE.0, f)?;
528 write!(f, "MakeAvailable")?;
529 }
530 if *self & Self::MAKE_VISIBLE == Self::MAKE_VISIBLE {
531 bitfmt.fmt(Self::MAKE_VISIBLE.0, f)?;
532 write!(f, "MakeVisible")?;
533 }
534 if *self & Self::VOLATILE == Self::VOLATILE {
535 bitfmt.fmt(Self::VOLATILE.0, f)?;
536 write!(f, "Volatile")?;
537 }
538 Ok(())
539 }
540}
541#[derive(Clone, Copy, PartialEq, Eq, Debug)]
542pub struct MemoryAccess(pub(crate) u32);
543impl MemoryAccess {
544 pub const NONE: Self = Self(0x0000);
545 pub const VOLATILE: Self = Self(0x0001);
546 pub const ALIGNED: Self = Self(0x0002);
547 pub const NONTEMPORAL: Self = Self(0x0004);
548 pub const MAKE_POINTER_AVAILABLE: Self = Self(0x0008);
549 pub const MAKE_POINTER_VISIBLE: Self = Self(0x0010);
550 pub const NON_PRIVATE_POINTER: Self = Self(0x0020);
551 pub const ALIAS_SCOPE_INTELMASK: Self = Self(0x10000);
552 pub const NO_ALIAS_INTELMASK: Self = Self(0x20000);
553}
554impl Word for MemoryAccess {
555 #[inline]
556 fn from_word(word: u32) -> Self {
557 Self(word)
558 }
559}
560impl BitAnd for MemoryAccess {
561 type Output = Self;
562 #[inline]
563 fn bitand(self, rhs: Self) -> Self {
564 Self(self.0 & rhs.0)
565 }
566}
567impl BitOr for MemoryAccess {
568 type Output = Self;
569 #[inline]
570 fn bitor(self, rhs: Self) -> Self {
571 Self(self.0 | rhs.0)
572 }
573}
574impl Display for MemoryAccess {
575 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
576 if self.0 == 0 {
577 return write!(f, "None");
578 }
579 let mut bitfmt = BitFmt(0);
580 if *self & Self::VOLATILE == Self::VOLATILE {
581 bitfmt.fmt(Self::VOLATILE.0, f)?;
582 write!(f, "Volatile")?;
583 }
584 if *self & Self::ALIGNED == Self::ALIGNED {
585 bitfmt.fmt(Self::ALIGNED.0, f)?;
586 write!(f, "Aligned")?;
587 }
588 if *self & Self::NONTEMPORAL == Self::NONTEMPORAL {
589 bitfmt.fmt(Self::NONTEMPORAL.0, f)?;
590 write!(f, "Nontemporal")?;
591 }
592 if *self & Self::MAKE_POINTER_AVAILABLE == Self::MAKE_POINTER_AVAILABLE {
593 bitfmt.fmt(Self::MAKE_POINTER_AVAILABLE.0, f)?;
594 write!(f, "MakePointerAvailable")?;
595 }
596 if *self & Self::MAKE_POINTER_VISIBLE == Self::MAKE_POINTER_VISIBLE {
597 bitfmt.fmt(Self::MAKE_POINTER_VISIBLE.0, f)?;
598 write!(f, "MakePointerVisible")?;
599 }
600 if *self & Self::NON_PRIVATE_POINTER == Self::NON_PRIVATE_POINTER {
601 bitfmt.fmt(Self::NON_PRIVATE_POINTER.0, f)?;
602 write!(f, "NonPrivatePointer")?;
603 }
604 if *self & Self::ALIAS_SCOPE_INTELMASK == Self::ALIAS_SCOPE_INTELMASK {
605 bitfmt.fmt(Self::ALIAS_SCOPE_INTELMASK.0, f)?;
606 write!(f, "AliasScopeINTELMask")?;
607 }
608 if *self & Self::NO_ALIAS_INTELMASK == Self::NO_ALIAS_INTELMASK {
609 bitfmt.fmt(Self::NO_ALIAS_INTELMASK.0, f)?;
610 write!(f, "NoAliasINTELMask")?;
611 }
612 Ok(())
613 }
614}
615#[derive(Clone, Copy, PartialEq, Eq, Debug)]
616pub struct KernelProfilingInfo(pub(crate) u32);
617impl KernelProfilingInfo {
618 pub const NONE: Self = Self(0x0000);
619 pub const CMD_EXEC_TIME: Self = Self(0x0001);
620}
621impl Word for KernelProfilingInfo {
622 #[inline]
623 fn from_word(word: u32) -> Self {
624 Self(word)
625 }
626}
627impl BitAnd for KernelProfilingInfo {
628 type Output = Self;
629 #[inline]
630 fn bitand(self, rhs: Self) -> Self {
631 Self(self.0 & rhs.0)
632 }
633}
634impl BitOr for KernelProfilingInfo {
635 type Output = Self;
636 #[inline]
637 fn bitor(self, rhs: Self) -> Self {
638 Self(self.0 | rhs.0)
639 }
640}
641impl Display for KernelProfilingInfo {
642 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
643 if self.0 == 0 {
644 return write!(f, "None");
645 }
646 let mut bitfmt = BitFmt(0);
647 if *self & Self::CMD_EXEC_TIME == Self::CMD_EXEC_TIME {
648 bitfmt.fmt(Self::CMD_EXEC_TIME.0, f)?;
649 write!(f, "CmdExecTime")?;
650 }
651 Ok(())
652 }
653}
654#[derive(Clone, Copy, PartialEq, Eq, Debug)]
655pub struct RayFlags(pub(crate) u32);
656impl RayFlags {
657 pub const NONE_KHR: Self = Self(0x0000);
658 pub const OPAQUE_KHR: Self = Self(0x0001);
659 pub const NO_OPAQUE_KHR: Self = Self(0x0002);
660 pub const TERMINATE_ON_FIRST_HIT_KHR: Self = Self(0x0004);
661 pub const SKIP_CLOSEST_HIT_SHADER_KHR: Self = Self(0x0008);
662 pub const CULL_BACK_FACING_TRIANGLES_KHR: Self = Self(0x0010);
663 pub const CULL_FRONT_FACING_TRIANGLES_KHR: Self = Self(0x0020);
664 pub const CULL_OPAQUE_KHR: Self = Self(0x0040);
665 pub const CULL_NO_OPAQUE_KHR: Self = Self(0x0080);
666 pub const SKIP_TRIANGLES_KHR: Self = Self(0x0100);
667 pub const SKIP_AABBS_KHR: Self = Self(0x0200);
668 pub const FORCE_OPACITY_MICROMAP2_STATE_EXT: Self = Self(0x0400);
669}
670impl Word for RayFlags {
671 #[inline]
672 fn from_word(word: u32) -> Self {
673 Self(word)
674 }
675}
676impl BitAnd for RayFlags {
677 type Output = Self;
678 #[inline]
679 fn bitand(self, rhs: Self) -> Self {
680 Self(self.0 & rhs.0)
681 }
682}
683impl BitOr for RayFlags {
684 type Output = Self;
685 #[inline]
686 fn bitor(self, rhs: Self) -> Self {
687 Self(self.0 | rhs.0)
688 }
689}
690impl Display for RayFlags {
691 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
692 if self.0 == 0 {
693 return write!(f, "None");
694 }
695 let mut bitfmt = BitFmt(0);
696 if *self & Self::OPAQUE_KHR == Self::OPAQUE_KHR {
697 bitfmt.fmt(Self::OPAQUE_KHR.0, f)?;
698 write!(f, "OpaqueKHR")?;
699 }
700 if *self & Self::NO_OPAQUE_KHR == Self::NO_OPAQUE_KHR {
701 bitfmt.fmt(Self::NO_OPAQUE_KHR.0, f)?;
702 write!(f, "NoOpaqueKHR")?;
703 }
704 if *self & Self::TERMINATE_ON_FIRST_HIT_KHR == Self::TERMINATE_ON_FIRST_HIT_KHR {
705 bitfmt.fmt(Self::TERMINATE_ON_FIRST_HIT_KHR.0, f)?;
706 write!(f, "TerminateOnFirstHitKHR")?;
707 }
708 if *self & Self::SKIP_CLOSEST_HIT_SHADER_KHR == Self::SKIP_CLOSEST_HIT_SHADER_KHR {
709 bitfmt.fmt(Self::SKIP_CLOSEST_HIT_SHADER_KHR.0, f)?;
710 write!(f, "SkipClosestHitShaderKHR")?;
711 }
712 if *self & Self::CULL_BACK_FACING_TRIANGLES_KHR == Self::CULL_BACK_FACING_TRIANGLES_KHR {
713 bitfmt.fmt(Self::CULL_BACK_FACING_TRIANGLES_KHR.0, f)?;
714 write!(f, "CullBackFacingTrianglesKHR")?;
715 }
716 if *self & Self::CULL_FRONT_FACING_TRIANGLES_KHR == Self::CULL_FRONT_FACING_TRIANGLES_KHR {
717 bitfmt.fmt(Self::CULL_FRONT_FACING_TRIANGLES_KHR.0, f)?;
718 write!(f, "CullFrontFacingTrianglesKHR")?;
719 }
720 if *self & Self::CULL_OPAQUE_KHR == Self::CULL_OPAQUE_KHR {
721 bitfmt.fmt(Self::CULL_OPAQUE_KHR.0, f)?;
722 write!(f, "CullOpaqueKHR")?;
723 }
724 if *self & Self::CULL_NO_OPAQUE_KHR == Self::CULL_NO_OPAQUE_KHR {
725 bitfmt.fmt(Self::CULL_NO_OPAQUE_KHR.0, f)?;
726 write!(f, "CullNoOpaqueKHR")?;
727 }
728 if *self & Self::SKIP_TRIANGLES_KHR == Self::SKIP_TRIANGLES_KHR {
729 bitfmt.fmt(Self::SKIP_TRIANGLES_KHR.0, f)?;
730 write!(f, "SkipTrianglesKHR")?;
731 }
732 if *self & Self::SKIP_AABBS_KHR == Self::SKIP_AABBS_KHR {
733 bitfmt.fmt(Self::SKIP_AABBS_KHR.0, f)?;
734 write!(f, "SkipAABBsKHR")?;
735 }
736 if *self & Self::FORCE_OPACITY_MICROMAP2_STATE_EXT
737 == Self::FORCE_OPACITY_MICROMAP2_STATE_EXT
738 {
739 bitfmt.fmt(Self::FORCE_OPACITY_MICROMAP2_STATE_EXT.0, f)?;
740 write!(f, "ForceOpacityMicromap2StateEXT")?;
741 }
742 Ok(())
743 }
744}
745#[derive(Clone, Copy, PartialEq, Eq, Debug)]
746pub struct FragmentShadingRate(pub(crate) u32);
747impl FragmentShadingRate {
748 pub const VERTICAL2_PIXELS: Self = Self(0x0001);
749 pub const VERTICAL4_PIXELS: Self = Self(0x0002);
750 pub const HORIZONTAL2_PIXELS: Self = Self(0x0004);
751 pub const HORIZONTAL4_PIXELS: Self = Self(0x0008);
752}
753impl Word for FragmentShadingRate {
754 #[inline]
755 fn from_word(word: u32) -> Self {
756 Self(word)
757 }
758}
759impl BitAnd for FragmentShadingRate {
760 type Output = Self;
761 #[inline]
762 fn bitand(self, rhs: Self) -> Self {
763 Self(self.0 & rhs.0)
764 }
765}
766impl BitOr for FragmentShadingRate {
767 type Output = Self;
768 #[inline]
769 fn bitor(self, rhs: Self) -> Self {
770 Self(self.0 | rhs.0)
771 }
772}
773impl Display for FragmentShadingRate {
774 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
775 if self.0 == 0 {
776 return write!(f, "None");
777 }
778 let mut bitfmt = BitFmt(0);
779 if *self & Self::VERTICAL2_PIXELS == Self::VERTICAL2_PIXELS {
780 bitfmt.fmt(Self::VERTICAL2_PIXELS.0, f)?;
781 write!(f, "Vertical2Pixels")?;
782 }
783 if *self & Self::VERTICAL4_PIXELS == Self::VERTICAL4_PIXELS {
784 bitfmt.fmt(Self::VERTICAL4_PIXELS.0, f)?;
785 write!(f, "Vertical4Pixels")?;
786 }
787 if *self & Self::HORIZONTAL2_PIXELS == Self::HORIZONTAL2_PIXELS {
788 bitfmt.fmt(Self::HORIZONTAL2_PIXELS.0, f)?;
789 write!(f, "Horizontal2Pixels")?;
790 }
791 if *self & Self::HORIZONTAL4_PIXELS == Self::HORIZONTAL4_PIXELS {
792 bitfmt.fmt(Self::HORIZONTAL4_PIXELS.0, f)?;
793 write!(f, "Horizontal4Pixels")?;
794 }
795 Ok(())
796 }
797}
798#[derive(Clone, Copy, PartialEq, Eq, Debug)]
799pub struct RawAccessChainOperands(pub(crate) u32);
800impl RawAccessChainOperands {
801 pub const NONE: Self = Self(0x0000);
802 pub const ROBUSTNESS_PER_COMPONENT_NV: Self = Self(0x0001);
803 pub const ROBUSTNESS_PER_ELEMENT_NV: Self = Self(0x0002);
804}
805impl Word for RawAccessChainOperands {
806 #[inline]
807 fn from_word(word: u32) -> Self {
808 Self(word)
809 }
810}
811impl BitAnd for RawAccessChainOperands {
812 type Output = Self;
813 #[inline]
814 fn bitand(self, rhs: Self) -> Self {
815 Self(self.0 & rhs.0)
816 }
817}
818impl BitOr for RawAccessChainOperands {
819 type Output = Self;
820 #[inline]
821 fn bitor(self, rhs: Self) -> Self {
822 Self(self.0 | rhs.0)
823 }
824}
825impl Display for RawAccessChainOperands {
826 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
827 if self.0 == 0 {
828 return write!(f, "None");
829 }
830 let mut bitfmt = BitFmt(0);
831 if *self & Self::ROBUSTNESS_PER_COMPONENT_NV == Self::ROBUSTNESS_PER_COMPONENT_NV {
832 bitfmt.fmt(Self::ROBUSTNESS_PER_COMPONENT_NV.0, f)?;
833 write!(f, "RobustnessPerComponentNV")?;
834 }
835 if *self & Self::ROBUSTNESS_PER_ELEMENT_NV == Self::ROBUSTNESS_PER_ELEMENT_NV {
836 bitfmt.fmt(Self::ROBUSTNESS_PER_ELEMENT_NV.0, f)?;
837 write!(f, "RobustnessPerElementNV")?;
838 }
839 Ok(())
840 }
841}
842#[derive(Clone, Copy, PartialEq, Eq, Debug)]
843pub struct SourceLanguage(pub(crate) u32);
844impl SourceLanguage {
845 pub const UNKNOWN: Self = Self(0u32);
846 pub const ESSL: Self = Self(1u32);
847 pub const GLSL: Self = Self(2u32);
848 pub const OPEN_CL_C: Self = Self(3u32);
849 pub const OPEN_CL_CPP: Self = Self(4u32);
850 pub const HLSL: Self = Self(5u32);
851 pub const CPP_FOR_OPEN_CL: Self = Self(6u32);
852 pub const SYCL: Self = Self(7u32);
853 pub const HERO_C: Self = Self(8u32);
854 pub const NZSL: Self = Self(9u32);
855 pub const WGSL: Self = Self(10u32);
856 pub const SLANG: Self = Self(11u32);
857 pub const ZIG: Self = Self(12u32);
858 pub const RUST: Self = Self(13u32);
859}
860impl Word for SourceLanguage {
861 #[inline]
862 fn from_word(word: u32) -> Self {
863 Self(word)
864 }
865}
866impl Display for SourceLanguage {
867 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
868 match *self {
869 Self::UNKNOWN => write!(f, "Unknown"),
870 Self::ESSL => write!(f, "ESSL"),
871 Self::GLSL => write!(f, "GLSL"),
872 Self::OPEN_CL_C => write!(f, "OpenCL_C"),
873 Self::OPEN_CL_CPP => write!(f, "OpenCL_CPP"),
874 Self::HLSL => write!(f, "HLSL"),
875 Self::CPP_FOR_OPEN_CL => write!(f, "CPP_for_OpenCL"),
876 Self::SYCL => write!(f, "SYCL"),
877 Self::HERO_C => write!(f, "HERO_C"),
878 Self::NZSL => write!(f, "NZSL"),
879 Self::WGSL => write!(f, "WGSL"),
880 Self::SLANG => write!(f, "Slang"),
881 Self::ZIG => write!(f, "Zig"),
882 Self::RUST => write!(f, "Rust"),
883 x => write!(f, "{x}"),
884 }
885 }
886}
887#[derive(Clone, Copy, PartialEq, Eq, Debug)]
888pub struct ExecutionModel(pub(crate) u32);
889impl ExecutionModel {
890 pub const VERTEX: Self = Self(0u32);
891 pub const TESSELLATION_CONTROL: Self = Self(1u32);
892 pub const TESSELLATION_EVALUATION: Self = Self(2u32);
893 pub const GEOMETRY: Self = Self(3u32);
894 pub const FRAGMENT: Self = Self(4u32);
895 pub const GLCOMPUTE: Self = Self(5u32);
896 pub const KERNEL: Self = Self(6u32);
897 pub const TASK_NV: Self = Self(5267u32);
898 pub const MESH_NV: Self = Self(5268u32);
899 pub const RAY_GENERATION_KHR: Self = Self(5313u32);
900 pub const INTERSECTION_KHR: Self = Self(5314u32);
901 pub const ANY_HIT_KHR: Self = Self(5315u32);
902 pub const CLOSEST_HIT_KHR: Self = Self(5316u32);
903 pub const MISS_KHR: Self = Self(5317u32);
904 pub const CALLABLE_KHR: Self = Self(5318u32);
905 pub const TASK_EXT: Self = Self(5364u32);
906 pub const MESH_EXT: Self = Self(5365u32);
907}
908impl Word for ExecutionModel {
909 #[inline]
910 fn from_word(word: u32) -> Self {
911 Self(word)
912 }
913}
914impl Display for ExecutionModel {
915 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
916 match *self {
917 Self::VERTEX => write!(f, "Vertex"),
918 Self::TESSELLATION_CONTROL => write!(f, "TessellationControl"),
919 Self::TESSELLATION_EVALUATION => write!(f, "TessellationEvaluation"),
920 Self::GEOMETRY => write!(f, "Geometry"),
921 Self::FRAGMENT => write!(f, "Fragment"),
922 Self::GLCOMPUTE => write!(f, "GLCompute"),
923 Self::KERNEL => write!(f, "Kernel"),
924 Self::TASK_NV => write!(f, "TaskNV"),
925 Self::MESH_NV => write!(f, "MeshNV"),
926 Self::RAY_GENERATION_KHR => write!(f, "RayGenerationKHR"),
927 Self::INTERSECTION_KHR => write!(f, "IntersectionKHR"),
928 Self::ANY_HIT_KHR => write!(f, "AnyHitKHR"),
929 Self::CLOSEST_HIT_KHR => write!(f, "ClosestHitKHR"),
930 Self::MISS_KHR => write!(f, "MissKHR"),
931 Self::CALLABLE_KHR => write!(f, "CallableKHR"),
932 Self::TASK_EXT => write!(f, "TaskEXT"),
933 Self::MESH_EXT => write!(f, "MeshEXT"),
934 x => write!(f, "{x}"),
935 }
936 }
937}
938#[derive(Clone, Copy, PartialEq, Eq, Debug)]
939pub struct AddressingModel(pub(crate) u32);
940impl AddressingModel {
941 pub const LOGICAL: Self = Self(0u32);
942 pub const PHYSICAL32: Self = Self(1u32);
943 pub const PHYSICAL64: Self = Self(2u32);
944 pub const PHYSICAL_STORAGE_BUFFER64: Self = Self(5348u32);
945}
946impl Word for AddressingModel {
947 #[inline]
948 fn from_word(word: u32) -> Self {
949 Self(word)
950 }
951}
952impl Display for AddressingModel {
953 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
954 match *self {
955 Self::LOGICAL => write!(f, "Logical"),
956 Self::PHYSICAL32 => write!(f, "Physical32"),
957 Self::PHYSICAL64 => write!(f, "Physical64"),
958 Self::PHYSICAL_STORAGE_BUFFER64 => write!(f, "PhysicalStorageBuffer64"),
959 x => write!(f, "{x}"),
960 }
961 }
962}
963#[derive(Clone, Copy, PartialEq, Eq, Debug)]
964pub struct MemoryModel(pub(crate) u32);
965impl MemoryModel {
966 pub const SIMPLE: Self = Self(0u32);
967 pub const GLSL450: Self = Self(1u32);
968 pub const OPEN_CL: Self = Self(2u32);
969 pub const VULKAN: Self = Self(3u32);
970}
971impl Word for MemoryModel {
972 #[inline]
973 fn from_word(word: u32) -> Self {
974 Self(word)
975 }
976}
977impl Display for MemoryModel {
978 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
979 match *self {
980 Self::SIMPLE => write!(f, "Simple"),
981 Self::GLSL450 => write!(f, "GLSL450"),
982 Self::OPEN_CL => write!(f, "OpenCL"),
983 Self::VULKAN => write!(f, "Vulkan"),
984 x => write!(f, "{x}"),
985 }
986 }
987}
988#[derive(Clone, Copy, Debug)]
989pub enum ExecutionMode {
990 Invocations {
991 number_of_invocations: LiteralInteger,
992 },
993 SpacingEqual,
994 SpacingFractionalEven,
995 SpacingFractionalOdd,
996 VertexOrderCw,
997 VertexOrderCcw,
998 PixelCenterInteger,
999 OriginUpperLeft,
1000 OriginLowerLeft,
1001 EarlyFragmentTests,
1002 PointMode,
1003 Xfb,
1004 DepthReplacing,
1005 DepthGreater,
1006 DepthLess,
1007 DepthUnchanged,
1008 LocalSize {
1009 x_size: LiteralInteger,
1010 y_size: LiteralInteger,
1011 z_size: LiteralInteger,
1012 },
1013 LocalSizeHint {
1014 x_size: LiteralInteger,
1015 y_size: LiteralInteger,
1016 z_size: LiteralInteger,
1017 },
1018 InputPoints,
1019 InputLines,
1020 InputLinesAdjacency,
1021 Triangles,
1022 InputTrianglesAdjacency,
1023 Quads,
1024 Isolines,
1025 OutputVertices {
1026 vertex_count: LiteralInteger,
1027 },
1028 OutputPoints,
1029 OutputLineStrip,
1030 OutputTriangleStrip,
1031 VecTypeHint {
1032 vector_type: LiteralInteger,
1033 },
1034 ContractionOff,
1035 Initializer,
1036 Finalizer,
1037 SubgroupSize {
1038 subgroup_size: LiteralInteger,
1039 },
1040 SubgroupsPerWorkgroup {
1041 subgroups_per_workgroup: LiteralInteger,
1042 },
1043 SubgroupsPerWorkgroupId {
1044 subgroups_per_workgroup: IdRef,
1045 },
1046 LocalSizeId {
1047 x_size: IdRef,
1048 y_size: IdRef,
1049 z_size: IdRef,
1050 },
1051 LocalSizeHintId {
1052 x_size_hint: IdRef,
1053 y_size_hint: IdRef,
1054 z_size_hint: IdRef,
1055 },
1056 NonCoherentColorAttachmentReadEXT,
1057 NonCoherentDepthAttachmentReadEXT,
1058 NonCoherentStencilAttachmentReadEXT,
1059 SubgroupUniformControlFlowKHR,
1060 PostDepthCoverage,
1061 DenormPreserve {
1062 target_width: LiteralInteger,
1063 },
1064 DenormFlushToZero {
1065 target_width: LiteralInteger,
1066 },
1067 SignedZeroInfNanPreserve {
1068 target_width: LiteralInteger,
1069 },
1070 RoundingModeRTE {
1071 target_width: LiteralInteger,
1072 },
1073 RoundingModeRTZ {
1074 target_width: LiteralInteger,
1075 },
1076 NonCoherentTileAttachmentReadQCOM,
1077 TileShadingRateQCOM {
1078 x_rate: LiteralInteger,
1079 y_rate: LiteralInteger,
1080 z_rate: LiteralInteger,
1081 },
1082 EarlyAndLateFragmentTestsAMD,
1083 StencilRefReplacingEXT,
1084 CoalescingAMDX,
1085 IsApiEntryAMDX {
1086 is_entry: IdRef,
1087 },
1088 MaxNodeRecursionAMDX {
1089 number_of_recursions: IdRef,
1090 },
1091 StaticNumWorkgroupsAMDX {
1092 x_size: IdRef,
1093 y_size: IdRef,
1094 z_size: IdRef,
1095 },
1096 ShaderIndexAMDX {
1097 shader_index: IdRef,
1098 },
1099 MaxNumWorkgroupsAMDX {
1100 x_size: IdRef,
1101 y_size: IdRef,
1102 z_size: IdRef,
1103 },
1104 StencilRefUnchangedFrontAMD,
1105 StencilRefGreaterFrontAMD,
1106 StencilRefLessFrontAMD,
1107 StencilRefUnchangedBackAMD,
1108 StencilRefGreaterBackAMD,
1109 StencilRefLessBackAMD,
1110 QuadDerivativesKHR,
1111 RequireFullQuadsKHR,
1112 SharesInputWithAMDX {
1113 node_name: IdRef,
1114 shader_index: IdRef,
1115 },
1116 ArithmeticPoisonKHR,
1117 OutputLinesEXT,
1118 OutputPrimitivesEXT {
1119 primitive_count: LiteralInteger,
1120 },
1121 DerivativeGroupQuadsKHR,
1122 DerivativeGroupLinearKHR,
1123 OutputTrianglesEXT,
1124 PixelInterlockOrderedEXT,
1125 PixelInterlockUnorderedEXT,
1126 SampleInterlockOrderedEXT,
1127 SampleInterlockUnorderedEXT,
1128 ShadingRateInterlockOrderedEXT,
1129 ShadingRateInterlockUnorderedEXT,
1130 Shader64BitIndexingEXT,
1131 SharedLocalMemorySizeINTEL {
1132 size: LiteralInteger,
1133 },
1134 RoundingModeRTPINTEL {
1135 target_width: LiteralInteger,
1136 },
1137 RoundingModeRTNINTEL {
1138 target_width: LiteralInteger,
1139 },
1140 FloatingPointModeALTINTEL {
1141 target_width: LiteralInteger,
1142 },
1143 FloatingPointModeIEEEINTEL {
1144 target_width: LiteralInteger,
1145 },
1146 MaxWorkgroupSizeINTEL {
1147 max_x_size: LiteralInteger,
1148 max_y_size: LiteralInteger,
1149 max_z_size: LiteralInteger,
1150 },
1151 MaxWorkDimINTEL {
1152 max_dimensions: LiteralInteger,
1153 },
1154 NoGlobalOffsetINTEL,
1155 NumSIMDWorkitemsINTEL {
1156 vector_width: LiteralInteger,
1157 },
1158 SchedulerTargetFmaxMhzINTEL {
1159 target_fmax: LiteralInteger,
1160 },
1161 MaximallyReconvergesKHR,
1162 FPFastMathDefault {
1163 target_type: IdRef,
1164 fast_math_mode: IdRef,
1165 },
1166 StreamingInterfaceINTEL {
1167 stall_free_return: LiteralInteger,
1168 },
1169 RegisterMapInterfaceINTEL {
1170 wait_for_done_write: LiteralInteger,
1171 },
1172 NamedBarrierCountINTEL {
1173 barrier_count: LiteralInteger,
1174 },
1175 MaximumRegistersINTEL {
1176 number_of_registers: LiteralInteger,
1177 },
1178 MaximumRegistersIdINTEL {
1179 number_of_registers: IdRef,
1180 },
1181 NamedMaximumRegistersINTEL {
1182 named_maximum_number_of_registers: NamedMaximumNumberOfRegisters,
1183 },
1184}
1185impl<'a> ExecutionMode {
1186 #[inline]
1187 pub fn parse_one(stream: &mut InstructionStream<'a>) -> ParseResult<Self> {
1188 let variant = stream.read()?;
1189 match variant {
1190 0u32 => Ok(Self::Invocations {
1191 number_of_invocations: LiteralInteger::parse_one(stream)?,
1192 }),
1193 1u32 => Ok(Self::SpacingEqual),
1194 2u32 => Ok(Self::SpacingFractionalEven),
1195 3u32 => Ok(Self::SpacingFractionalOdd),
1196 4u32 => Ok(Self::VertexOrderCw),
1197 5u32 => Ok(Self::VertexOrderCcw),
1198 6u32 => Ok(Self::PixelCenterInteger),
1199 7u32 => Ok(Self::OriginUpperLeft),
1200 8u32 => Ok(Self::OriginLowerLeft),
1201 9u32 => Ok(Self::EarlyFragmentTests),
1202 10u32 => Ok(Self::PointMode),
1203 11u32 => Ok(Self::Xfb),
1204 12u32 => Ok(Self::DepthReplacing),
1205 14u32 => Ok(Self::DepthGreater),
1206 15u32 => Ok(Self::DepthLess),
1207 16u32 => Ok(Self::DepthUnchanged),
1208 17u32 => Ok(Self::LocalSize {
1209 x_size: LiteralInteger::parse_one(stream)?,
1210 y_size: LiteralInteger::parse_one(stream)?,
1211 z_size: LiteralInteger::parse_one(stream)?,
1212 }),
1213 18u32 => Ok(Self::LocalSizeHint {
1214 x_size: LiteralInteger::parse_one(stream)?,
1215 y_size: LiteralInteger::parse_one(stream)?,
1216 z_size: LiteralInteger::parse_one(stream)?,
1217 }),
1218 19u32 => Ok(Self::InputPoints),
1219 20u32 => Ok(Self::InputLines),
1220 21u32 => Ok(Self::InputLinesAdjacency),
1221 22u32 => Ok(Self::Triangles),
1222 23u32 => Ok(Self::InputTrianglesAdjacency),
1223 24u32 => Ok(Self::Quads),
1224 25u32 => Ok(Self::Isolines),
1225 26u32 => Ok(Self::OutputVertices {
1226 vertex_count: LiteralInteger::parse_one(stream)?,
1227 }),
1228 27u32 => Ok(Self::OutputPoints),
1229 28u32 => Ok(Self::OutputLineStrip),
1230 29u32 => Ok(Self::OutputTriangleStrip),
1231 30u32 => Ok(Self::VecTypeHint {
1232 vector_type: LiteralInteger::parse_one(stream)?,
1233 }),
1234 31u32 => Ok(Self::ContractionOff),
1235 33u32 => Ok(Self::Initializer),
1236 34u32 => Ok(Self::Finalizer),
1237 35u32 => Ok(Self::SubgroupSize {
1238 subgroup_size: LiteralInteger::parse_one(stream)?,
1239 }),
1240 36u32 => Ok(Self::SubgroupsPerWorkgroup {
1241 subgroups_per_workgroup: LiteralInteger::parse_one(stream)?,
1242 }),
1243 37u32 => Ok(Self::SubgroupsPerWorkgroupId {
1244 subgroups_per_workgroup: IdRef::parse_one(stream)?,
1245 }),
1246 38u32 => Ok(Self::LocalSizeId {
1247 x_size: IdRef::parse_one(stream)?,
1248 y_size: IdRef::parse_one(stream)?,
1249 z_size: IdRef::parse_one(stream)?,
1250 }),
1251 39u32 => Ok(Self::LocalSizeHintId {
1252 x_size_hint: IdRef::parse_one(stream)?,
1253 y_size_hint: IdRef::parse_one(stream)?,
1254 z_size_hint: IdRef::parse_one(stream)?,
1255 }),
1256 4169u32 => Ok(Self::NonCoherentColorAttachmentReadEXT),
1257 4170u32 => Ok(Self::NonCoherentDepthAttachmentReadEXT),
1258 4171u32 => Ok(Self::NonCoherentStencilAttachmentReadEXT),
1259 4421u32 => Ok(Self::SubgroupUniformControlFlowKHR),
1260 4446u32 => Ok(Self::PostDepthCoverage),
1261 4459u32 => Ok(Self::DenormPreserve {
1262 target_width: LiteralInteger::parse_one(stream)?,
1263 }),
1264 4460u32 => Ok(Self::DenormFlushToZero {
1265 target_width: LiteralInteger::parse_one(stream)?,
1266 }),
1267 4461u32 => Ok(Self::SignedZeroInfNanPreserve {
1268 target_width: LiteralInteger::parse_one(stream)?,
1269 }),
1270 4462u32 => Ok(Self::RoundingModeRTE {
1271 target_width: LiteralInteger::parse_one(stream)?,
1272 }),
1273 4463u32 => Ok(Self::RoundingModeRTZ {
1274 target_width: LiteralInteger::parse_one(stream)?,
1275 }),
1276 4489u32 => Ok(Self::NonCoherentTileAttachmentReadQCOM),
1277 4490u32 => Ok(Self::TileShadingRateQCOM {
1278 x_rate: LiteralInteger::parse_one(stream)?,
1279 y_rate: LiteralInteger::parse_one(stream)?,
1280 z_rate: LiteralInteger::parse_one(stream)?,
1281 }),
1282 5017u32 => Ok(Self::EarlyAndLateFragmentTestsAMD),
1283 5027u32 => Ok(Self::StencilRefReplacingEXT),
1284 5069u32 => Ok(Self::CoalescingAMDX),
1285 5070u32 => Ok(Self::IsApiEntryAMDX {
1286 is_entry: IdRef::parse_one(stream)?,
1287 }),
1288 5071u32 => Ok(Self::MaxNodeRecursionAMDX {
1289 number_of_recursions: IdRef::parse_one(stream)?,
1290 }),
1291 5072u32 => Ok(Self::StaticNumWorkgroupsAMDX {
1292 x_size: IdRef::parse_one(stream)?,
1293 y_size: IdRef::parse_one(stream)?,
1294 z_size: IdRef::parse_one(stream)?,
1295 }),
1296 5073u32 => Ok(Self::ShaderIndexAMDX {
1297 shader_index: IdRef::parse_one(stream)?,
1298 }),
1299 5077u32 => Ok(Self::MaxNumWorkgroupsAMDX {
1300 x_size: IdRef::parse_one(stream)?,
1301 y_size: IdRef::parse_one(stream)?,
1302 z_size: IdRef::parse_one(stream)?,
1303 }),
1304 5079u32 => Ok(Self::StencilRefUnchangedFrontAMD),
1305 5080u32 => Ok(Self::StencilRefGreaterFrontAMD),
1306 5081u32 => Ok(Self::StencilRefLessFrontAMD),
1307 5082u32 => Ok(Self::StencilRefUnchangedBackAMD),
1308 5083u32 => Ok(Self::StencilRefGreaterBackAMD),
1309 5084u32 => Ok(Self::StencilRefLessBackAMD),
1310 5088u32 => Ok(Self::QuadDerivativesKHR),
1311 5089u32 => Ok(Self::RequireFullQuadsKHR),
1312 5102u32 => Ok(Self::SharesInputWithAMDX {
1313 node_name: IdRef::parse_one(stream)?,
1314 shader_index: IdRef::parse_one(stream)?,
1315 }),
1316 5157u32 => Ok(Self::ArithmeticPoisonKHR),
1317 5269u32 => Ok(Self::OutputLinesEXT),
1318 5270u32 => Ok(Self::OutputPrimitivesEXT {
1319 primitive_count: LiteralInteger::parse_one(stream)?,
1320 }),
1321 5289u32 => Ok(Self::DerivativeGroupQuadsKHR),
1322 5290u32 => Ok(Self::DerivativeGroupLinearKHR),
1323 5298u32 => Ok(Self::OutputTrianglesEXT),
1324 5366u32 => Ok(Self::PixelInterlockOrderedEXT),
1325 5367u32 => Ok(Self::PixelInterlockUnorderedEXT),
1326 5368u32 => Ok(Self::SampleInterlockOrderedEXT),
1327 5369u32 => Ok(Self::SampleInterlockUnorderedEXT),
1328 5370u32 => Ok(Self::ShadingRateInterlockOrderedEXT),
1329 5371u32 => Ok(Self::ShadingRateInterlockUnorderedEXT),
1330 5427u32 => Ok(Self::Shader64BitIndexingEXT),
1331 5618u32 => Ok(Self::SharedLocalMemorySizeINTEL {
1332 size: LiteralInteger::parse_one(stream)?,
1333 }),
1334 5620u32 => Ok(Self::RoundingModeRTPINTEL {
1335 target_width: LiteralInteger::parse_one(stream)?,
1336 }),
1337 5621u32 => Ok(Self::RoundingModeRTNINTEL {
1338 target_width: LiteralInteger::parse_one(stream)?,
1339 }),
1340 5622u32 => Ok(Self::FloatingPointModeALTINTEL {
1341 target_width: LiteralInteger::parse_one(stream)?,
1342 }),
1343 5623u32 => Ok(Self::FloatingPointModeIEEEINTEL {
1344 target_width: LiteralInteger::parse_one(stream)?,
1345 }),
1346 5893u32 => Ok(Self::MaxWorkgroupSizeINTEL {
1347 max_x_size: LiteralInteger::parse_one(stream)?,
1348 max_y_size: LiteralInteger::parse_one(stream)?,
1349 max_z_size: LiteralInteger::parse_one(stream)?,
1350 }),
1351 5894u32 => Ok(Self::MaxWorkDimINTEL {
1352 max_dimensions: LiteralInteger::parse_one(stream)?,
1353 }),
1354 5895u32 => Ok(Self::NoGlobalOffsetINTEL),
1355 5896u32 => Ok(Self::NumSIMDWorkitemsINTEL {
1356 vector_width: LiteralInteger::parse_one(stream)?,
1357 }),
1358 5903u32 => Ok(Self::SchedulerTargetFmaxMhzINTEL {
1359 target_fmax: LiteralInteger::parse_one(stream)?,
1360 }),
1361 6023u32 => Ok(Self::MaximallyReconvergesKHR),
1362 6028u32 => Ok(Self::FPFastMathDefault {
1363 target_type: IdRef::parse_one(stream)?,
1364 fast_math_mode: IdRef::parse_one(stream)?,
1365 }),
1366 6154u32 => Ok(Self::StreamingInterfaceINTEL {
1367 stall_free_return: LiteralInteger::parse_one(stream)?,
1368 }),
1369 6160u32 => Ok(Self::RegisterMapInterfaceINTEL {
1370 wait_for_done_write: LiteralInteger::parse_one(stream)?,
1371 }),
1372 6417u32 => Ok(Self::NamedBarrierCountINTEL {
1373 barrier_count: LiteralInteger::parse_one(stream)?,
1374 }),
1375 6461u32 => Ok(Self::MaximumRegistersINTEL {
1376 number_of_registers: LiteralInteger::parse_one(stream)?,
1377 }),
1378 6462u32 => Ok(Self::MaximumRegistersIdINTEL {
1379 number_of_registers: IdRef::parse_one(stream)?,
1380 }),
1381 6463u32 => Ok(Self::NamedMaximumRegistersINTEL {
1382 named_maximum_number_of_registers: NamedMaximumNumberOfRegisters::parse_one(
1383 stream,
1384 )?,
1385 }),
1386 x => Err(ParseError::UnknownVariant {
1387 kind: stringify!(ExecutionMode),
1388 value: x,
1389 }),
1390 }
1391 }
1392}
1393impl Display for ExecutionMode {
1394 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1395 match self {
1396 Self::Invocations {
1397 number_of_invocations,
1398 } => {
1399 write!(f, "{}", stringify!(Invocations))?;
1400 write!(f, " {}", number_of_invocations)?;
1401 Ok(())
1402 }
1403 Self::SpacingEqual => write!(f, "{}", stringify!(SpacingEqual)),
1404 Self::SpacingFractionalEven => write!(f, "{}", stringify!(SpacingFractionalEven)),
1405 Self::SpacingFractionalOdd => write!(f, "{}", stringify!(SpacingFractionalOdd)),
1406 Self::VertexOrderCw => write!(f, "{}", stringify!(VertexOrderCw)),
1407 Self::VertexOrderCcw => write!(f, "{}", stringify!(VertexOrderCcw)),
1408 Self::PixelCenterInteger => write!(f, "{}", stringify!(PixelCenterInteger)),
1409 Self::OriginUpperLeft => write!(f, "{}", stringify!(OriginUpperLeft)),
1410 Self::OriginLowerLeft => write!(f, "{}", stringify!(OriginLowerLeft)),
1411 Self::EarlyFragmentTests => write!(f, "{}", stringify!(EarlyFragmentTests)),
1412 Self::PointMode => write!(f, "{}", stringify!(PointMode)),
1413 Self::Xfb => write!(f, "{}", stringify!(Xfb)),
1414 Self::DepthReplacing => write!(f, "{}", stringify!(DepthReplacing)),
1415 Self::DepthGreater => write!(f, "{}", stringify!(DepthGreater)),
1416 Self::DepthLess => write!(f, "{}", stringify!(DepthLess)),
1417 Self::DepthUnchanged => write!(f, "{}", stringify!(DepthUnchanged)),
1418 Self::LocalSize {
1419 x_size,
1420 y_size,
1421 z_size,
1422 } => {
1423 write!(f, "{}", stringify!(LocalSize))?;
1424 write!(f, " {}", x_size)?;
1425 write!(f, " {}", y_size)?;
1426 write!(f, " {}", z_size)?;
1427 Ok(())
1428 }
1429 Self::LocalSizeHint {
1430 x_size,
1431 y_size,
1432 z_size,
1433 } => {
1434 write!(f, "{}", stringify!(LocalSizeHint))?;
1435 write!(f, " {}", x_size)?;
1436 write!(f, " {}", y_size)?;
1437 write!(f, " {}", z_size)?;
1438 Ok(())
1439 }
1440 Self::InputPoints => write!(f, "{}", stringify!(InputPoints)),
1441 Self::InputLines => write!(f, "{}", stringify!(InputLines)),
1442 Self::InputLinesAdjacency => write!(f, "{}", stringify!(InputLinesAdjacency)),
1443 Self::Triangles => write!(f, "{}", stringify!(Triangles)),
1444 Self::InputTrianglesAdjacency => write!(f, "{}", stringify!(InputTrianglesAdjacency)),
1445 Self::Quads => write!(f, "{}", stringify!(Quads)),
1446 Self::Isolines => write!(f, "{}", stringify!(Isolines)),
1447 Self::OutputVertices { vertex_count } => {
1448 write!(f, "{}", stringify!(OutputVertices))?;
1449 write!(f, " {}", vertex_count)?;
1450 Ok(())
1451 }
1452 Self::OutputPoints => write!(f, "{}", stringify!(OutputPoints)),
1453 Self::OutputLineStrip => write!(f, "{}", stringify!(OutputLineStrip)),
1454 Self::OutputTriangleStrip => write!(f, "{}", stringify!(OutputTriangleStrip)),
1455 Self::VecTypeHint { vector_type } => {
1456 write!(f, "{}", stringify!(VecTypeHint))?;
1457 write!(f, " {}", vector_type)?;
1458 Ok(())
1459 }
1460 Self::ContractionOff => write!(f, "{}", stringify!(ContractionOff)),
1461 Self::Initializer => write!(f, "{}", stringify!(Initializer)),
1462 Self::Finalizer => write!(f, "{}", stringify!(Finalizer)),
1463 Self::SubgroupSize { subgroup_size } => {
1464 write!(f, "{}", stringify!(SubgroupSize))?;
1465 write!(f, " {}", subgroup_size)?;
1466 Ok(())
1467 }
1468 Self::SubgroupsPerWorkgroup {
1469 subgroups_per_workgroup,
1470 } => {
1471 write!(f, "{}", stringify!(SubgroupsPerWorkgroup))?;
1472 write!(f, " {}", subgroups_per_workgroup)?;
1473 Ok(())
1474 }
1475 Self::SubgroupsPerWorkgroupId {
1476 subgroups_per_workgroup,
1477 } => {
1478 write!(f, "{}", stringify!(SubgroupsPerWorkgroupId))?;
1479 write!(f, " {}", subgroups_per_workgroup)?;
1480 Ok(())
1481 }
1482 Self::LocalSizeId {
1483 x_size,
1484 y_size,
1485 z_size,
1486 } => {
1487 write!(f, "{}", stringify!(LocalSizeId))?;
1488 write!(f, " {}", x_size)?;
1489 write!(f, " {}", y_size)?;
1490 write!(f, " {}", z_size)?;
1491 Ok(())
1492 }
1493 Self::LocalSizeHintId {
1494 x_size_hint,
1495 y_size_hint,
1496 z_size_hint,
1497 } => {
1498 write!(f, "{}", stringify!(LocalSizeHintId))?;
1499 write!(f, " {}", x_size_hint)?;
1500 write!(f, " {}", y_size_hint)?;
1501 write!(f, " {}", z_size_hint)?;
1502 Ok(())
1503 }
1504 Self::NonCoherentColorAttachmentReadEXT => {
1505 write!(f, "{}", stringify!(NonCoherentColorAttachmentReadEXT))
1506 }
1507 Self::NonCoherentDepthAttachmentReadEXT => {
1508 write!(f, "{}", stringify!(NonCoherentDepthAttachmentReadEXT))
1509 }
1510 Self::NonCoherentStencilAttachmentReadEXT => {
1511 write!(f, "{}", stringify!(NonCoherentStencilAttachmentReadEXT))
1512 }
1513 Self::SubgroupUniformControlFlowKHR => {
1514 write!(f, "{}", stringify!(SubgroupUniformControlFlowKHR))
1515 }
1516 Self::PostDepthCoverage => write!(f, "{}", stringify!(PostDepthCoverage)),
1517 Self::DenormPreserve { target_width } => {
1518 write!(f, "{}", stringify!(DenormPreserve))?;
1519 write!(f, " {}", target_width)?;
1520 Ok(())
1521 }
1522 Self::DenormFlushToZero { target_width } => {
1523 write!(f, "{}", stringify!(DenormFlushToZero))?;
1524 write!(f, " {}", target_width)?;
1525 Ok(())
1526 }
1527 Self::SignedZeroInfNanPreserve { target_width } => {
1528 write!(f, "{}", stringify!(SignedZeroInfNanPreserve))?;
1529 write!(f, " {}", target_width)?;
1530 Ok(())
1531 }
1532 Self::RoundingModeRTE { target_width } => {
1533 write!(f, "{}", stringify!(RoundingModeRTE))?;
1534 write!(f, " {}", target_width)?;
1535 Ok(())
1536 }
1537 Self::RoundingModeRTZ { target_width } => {
1538 write!(f, "{}", stringify!(RoundingModeRTZ))?;
1539 write!(f, " {}", target_width)?;
1540 Ok(())
1541 }
1542 Self::NonCoherentTileAttachmentReadQCOM => {
1543 write!(f, "{}", stringify!(NonCoherentTileAttachmentReadQCOM))
1544 }
1545 Self::TileShadingRateQCOM {
1546 x_rate,
1547 y_rate,
1548 z_rate,
1549 } => {
1550 write!(f, "{}", stringify!(TileShadingRateQCOM))?;
1551 write!(f, " {}", x_rate)?;
1552 write!(f, " {}", y_rate)?;
1553 write!(f, " {}", z_rate)?;
1554 Ok(())
1555 }
1556 Self::EarlyAndLateFragmentTestsAMD => {
1557 write!(f, "{}", stringify!(EarlyAndLateFragmentTestsAMD))
1558 }
1559 Self::StencilRefReplacingEXT => write!(f, "{}", stringify!(StencilRefReplacingEXT)),
1560 Self::CoalescingAMDX => write!(f, "{}", stringify!(CoalescingAMDX)),
1561 Self::IsApiEntryAMDX { is_entry } => {
1562 write!(f, "{}", stringify!(IsApiEntryAMDX))?;
1563 write!(f, " {}", is_entry)?;
1564 Ok(())
1565 }
1566 Self::MaxNodeRecursionAMDX {
1567 number_of_recursions,
1568 } => {
1569 write!(f, "{}", stringify!(MaxNodeRecursionAMDX))?;
1570 write!(f, " {}", number_of_recursions)?;
1571 Ok(())
1572 }
1573 Self::StaticNumWorkgroupsAMDX {
1574 x_size,
1575 y_size,
1576 z_size,
1577 } => {
1578 write!(f, "{}", stringify!(StaticNumWorkgroupsAMDX))?;
1579 write!(f, " {}", x_size)?;
1580 write!(f, " {}", y_size)?;
1581 write!(f, " {}", z_size)?;
1582 Ok(())
1583 }
1584 Self::ShaderIndexAMDX { shader_index } => {
1585 write!(f, "{}", stringify!(ShaderIndexAMDX))?;
1586 write!(f, " {}", shader_index)?;
1587 Ok(())
1588 }
1589 Self::MaxNumWorkgroupsAMDX {
1590 x_size,
1591 y_size,
1592 z_size,
1593 } => {
1594 write!(f, "{}", stringify!(MaxNumWorkgroupsAMDX))?;
1595 write!(f, " {}", x_size)?;
1596 write!(f, " {}", y_size)?;
1597 write!(f, " {}", z_size)?;
1598 Ok(())
1599 }
1600 Self::StencilRefUnchangedFrontAMD => {
1601 write!(f, "{}", stringify!(StencilRefUnchangedFrontAMD))
1602 }
1603 Self::StencilRefGreaterFrontAMD => {
1604 write!(f, "{}", stringify!(StencilRefGreaterFrontAMD))
1605 }
1606 Self::StencilRefLessFrontAMD => write!(f, "{}", stringify!(StencilRefLessFrontAMD)),
1607 Self::StencilRefUnchangedBackAMD => {
1608 write!(f, "{}", stringify!(StencilRefUnchangedBackAMD))
1609 }
1610 Self::StencilRefGreaterBackAMD => write!(f, "{}", stringify!(StencilRefGreaterBackAMD)),
1611 Self::StencilRefLessBackAMD => write!(f, "{}", stringify!(StencilRefLessBackAMD)),
1612 Self::QuadDerivativesKHR => write!(f, "{}", stringify!(QuadDerivativesKHR)),
1613 Self::RequireFullQuadsKHR => write!(f, "{}", stringify!(RequireFullQuadsKHR)),
1614 Self::SharesInputWithAMDX {
1615 node_name,
1616 shader_index,
1617 } => {
1618 write!(f, "{}", stringify!(SharesInputWithAMDX))?;
1619 write!(f, " {}", node_name)?;
1620 write!(f, " {}", shader_index)?;
1621 Ok(())
1622 }
1623 Self::ArithmeticPoisonKHR => write!(f, "{}", stringify!(ArithmeticPoisonKHR)),
1624 Self::OutputLinesEXT => write!(f, "{}", stringify!(OutputLinesEXT)),
1625 Self::OutputPrimitivesEXT { primitive_count } => {
1626 write!(f, "{}", stringify!(OutputPrimitivesEXT))?;
1627 write!(f, " {}", primitive_count)?;
1628 Ok(())
1629 }
1630 Self::DerivativeGroupQuadsKHR => write!(f, "{}", stringify!(DerivativeGroupQuadsKHR)),
1631 Self::DerivativeGroupLinearKHR => write!(f, "{}", stringify!(DerivativeGroupLinearKHR)),
1632 Self::OutputTrianglesEXT => write!(f, "{}", stringify!(OutputTrianglesEXT)),
1633 Self::PixelInterlockOrderedEXT => write!(f, "{}", stringify!(PixelInterlockOrderedEXT)),
1634 Self::PixelInterlockUnorderedEXT => {
1635 write!(f, "{}", stringify!(PixelInterlockUnorderedEXT))
1636 }
1637 Self::SampleInterlockOrderedEXT => {
1638 write!(f, "{}", stringify!(SampleInterlockOrderedEXT))
1639 }
1640 Self::SampleInterlockUnorderedEXT => {
1641 write!(f, "{}", stringify!(SampleInterlockUnorderedEXT))
1642 }
1643 Self::ShadingRateInterlockOrderedEXT => {
1644 write!(f, "{}", stringify!(ShadingRateInterlockOrderedEXT))
1645 }
1646 Self::ShadingRateInterlockUnorderedEXT => {
1647 write!(f, "{}", stringify!(ShadingRateInterlockUnorderedEXT))
1648 }
1649 Self::Shader64BitIndexingEXT => write!(f, "{}", stringify!(Shader64BitIndexingEXT)),
1650 Self::SharedLocalMemorySizeINTEL { size } => {
1651 write!(f, "{}", stringify!(SharedLocalMemorySizeINTEL))?;
1652 write!(f, " {}", size)?;
1653 Ok(())
1654 }
1655 Self::RoundingModeRTPINTEL { target_width } => {
1656 write!(f, "{}", stringify!(RoundingModeRTPINTEL))?;
1657 write!(f, " {}", target_width)?;
1658 Ok(())
1659 }
1660 Self::RoundingModeRTNINTEL { target_width } => {
1661 write!(f, "{}", stringify!(RoundingModeRTNINTEL))?;
1662 write!(f, " {}", target_width)?;
1663 Ok(())
1664 }
1665 Self::FloatingPointModeALTINTEL { target_width } => {
1666 write!(f, "{}", stringify!(FloatingPointModeALTINTEL))?;
1667 write!(f, " {}", target_width)?;
1668 Ok(())
1669 }
1670 Self::FloatingPointModeIEEEINTEL { target_width } => {
1671 write!(f, "{}", stringify!(FloatingPointModeIEEEINTEL))?;
1672 write!(f, " {}", target_width)?;
1673 Ok(())
1674 }
1675 Self::MaxWorkgroupSizeINTEL {
1676 max_x_size,
1677 max_y_size,
1678 max_z_size,
1679 } => {
1680 write!(f, "{}", stringify!(MaxWorkgroupSizeINTEL))?;
1681 write!(f, " {}", max_x_size)?;
1682 write!(f, " {}", max_y_size)?;
1683 write!(f, " {}", max_z_size)?;
1684 Ok(())
1685 }
1686 Self::MaxWorkDimINTEL { max_dimensions } => {
1687 write!(f, "{}", stringify!(MaxWorkDimINTEL))?;
1688 write!(f, " {}", max_dimensions)?;
1689 Ok(())
1690 }
1691 Self::NoGlobalOffsetINTEL => write!(f, "{}", stringify!(NoGlobalOffsetINTEL)),
1692 Self::NumSIMDWorkitemsINTEL { vector_width } => {
1693 write!(f, "{}", stringify!(NumSIMDWorkitemsINTEL))?;
1694 write!(f, " {}", vector_width)?;
1695 Ok(())
1696 }
1697 Self::SchedulerTargetFmaxMhzINTEL { target_fmax } => {
1698 write!(f, "{}", stringify!(SchedulerTargetFmaxMhzINTEL))?;
1699 write!(f, " {}", target_fmax)?;
1700 Ok(())
1701 }
1702 Self::MaximallyReconvergesKHR => write!(f, "{}", stringify!(MaximallyReconvergesKHR)),
1703 Self::FPFastMathDefault {
1704 target_type,
1705 fast_math_mode,
1706 } => {
1707 write!(f, "{}", stringify!(FPFastMathDefault))?;
1708 write!(f, " {}", target_type)?;
1709 write!(f, " {}", fast_math_mode)?;
1710 Ok(())
1711 }
1712 Self::StreamingInterfaceINTEL { stall_free_return } => {
1713 write!(f, "{}", stringify!(StreamingInterfaceINTEL))?;
1714 write!(f, " {}", stall_free_return)?;
1715 Ok(())
1716 }
1717 Self::RegisterMapInterfaceINTEL {
1718 wait_for_done_write,
1719 } => {
1720 write!(f, "{}", stringify!(RegisterMapInterfaceINTEL))?;
1721 write!(f, " {}", wait_for_done_write)?;
1722 Ok(())
1723 }
1724 Self::NamedBarrierCountINTEL { barrier_count } => {
1725 write!(f, "{}", stringify!(NamedBarrierCountINTEL))?;
1726 write!(f, " {}", barrier_count)?;
1727 Ok(())
1728 }
1729 Self::MaximumRegistersINTEL {
1730 number_of_registers,
1731 } => {
1732 write!(f, "{}", stringify!(MaximumRegistersINTEL))?;
1733 write!(f, " {}", number_of_registers)?;
1734 Ok(())
1735 }
1736 Self::MaximumRegistersIdINTEL {
1737 number_of_registers,
1738 } => {
1739 write!(f, "{}", stringify!(MaximumRegistersIdINTEL))?;
1740 write!(f, " {}", number_of_registers)?;
1741 Ok(())
1742 }
1743 Self::NamedMaximumRegistersINTEL {
1744 named_maximum_number_of_registers,
1745 } => {
1746 write!(f, "{}", stringify!(NamedMaximumRegistersINTEL))?;
1747 write!(f, " {}", named_maximum_number_of_registers)?;
1748 Ok(())
1749 }
1750 }
1751 }
1752}
1753#[derive(Clone, Copy, PartialEq, Eq, Debug)]
1754pub struct StorageClass(pub(crate) u32);
1755impl StorageClass {
1756 pub const UNIFORM_CONSTANT: Self = Self(0u32);
1757 pub const INPUT: Self = Self(1u32);
1758 pub const UNIFORM: Self = Self(2u32);
1759 pub const OUTPUT: Self = Self(3u32);
1760 pub const WORKGROUP: Self = Self(4u32);
1761 pub const CROSS_WORKGROUP: Self = Self(5u32);
1762 pub const PRIVATE: Self = Self(6u32);
1763 pub const FUNCTION: Self = Self(7u32);
1764 pub const GENERIC: Self = Self(8u32);
1765 pub const PUSH_CONSTANT: Self = Self(9u32);
1766 pub const ATOMIC_COUNTER: Self = Self(10u32);
1767 pub const IMAGE: Self = Self(11u32);
1768 pub const STORAGE_BUFFER: Self = Self(12u32);
1769 pub const TILE_IMAGE_EXT: Self = Self(4172u32);
1770 pub const TILE_ATTACHMENT_QCOM: Self = Self(4491u32);
1771 pub const NODE_PAYLOAD_AMDX: Self = Self(5068u32);
1772 pub const CALLABLE_DATA_KHR: Self = Self(5328u32);
1773 pub const INCOMING_CALLABLE_DATA_KHR: Self = Self(5329u32);
1774 pub const RAY_PAYLOAD_KHR: Self = Self(5338u32);
1775 pub const HIT_ATTRIBUTE_KHR: Self = Self(5339u32);
1776 pub const INCOMING_RAY_PAYLOAD_KHR: Self = Self(5342u32);
1777 pub const SHADER_RECORD_BUFFER_KHR: Self = Self(5343u32);
1778 pub const PHYSICAL_STORAGE_BUFFER: Self = Self(5349u32);
1779 pub const HIT_OBJECT_ATTRIBUTE_NV: Self = Self(5385u32);
1780 pub const TASK_PAYLOAD_WORKGROUP_EXT: Self = Self(5402u32);
1781 pub const HIT_OBJECT_ATTRIBUTE_EXT: Self = Self(5411u32);
1782 pub const CODE_SECTION_INTEL: Self = Self(5605u32);
1783 pub const DEVICE_ONLY_ALTERA: Self = Self(5936u32);
1784 pub const HOST_ONLY_ALTERA: Self = Self(5937u32);
1785}
1786impl Word for StorageClass {
1787 #[inline]
1788 fn from_word(word: u32) -> Self {
1789 Self(word)
1790 }
1791}
1792impl Display for StorageClass {
1793 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1794 match *self {
1795 Self::UNIFORM_CONSTANT => write!(f, "UniformConstant"),
1796 Self::INPUT => write!(f, "Input"),
1797 Self::UNIFORM => write!(f, "Uniform"),
1798 Self::OUTPUT => write!(f, "Output"),
1799 Self::WORKGROUP => write!(f, "Workgroup"),
1800 Self::CROSS_WORKGROUP => write!(f, "CrossWorkgroup"),
1801 Self::PRIVATE => write!(f, "Private"),
1802 Self::FUNCTION => write!(f, "Function"),
1803 Self::GENERIC => write!(f, "Generic"),
1804 Self::PUSH_CONSTANT => write!(f, "PushConstant"),
1805 Self::ATOMIC_COUNTER => write!(f, "AtomicCounter"),
1806 Self::IMAGE => write!(f, "Image"),
1807 Self::STORAGE_BUFFER => write!(f, "StorageBuffer"),
1808 Self::TILE_IMAGE_EXT => write!(f, "TileImageEXT"),
1809 Self::TILE_ATTACHMENT_QCOM => write!(f, "TileAttachmentQCOM"),
1810 Self::NODE_PAYLOAD_AMDX => write!(f, "NodePayloadAMDX"),
1811 Self::CALLABLE_DATA_KHR => write!(f, "CallableDataKHR"),
1812 Self::INCOMING_CALLABLE_DATA_KHR => write!(f, "IncomingCallableDataKHR"),
1813 Self::RAY_PAYLOAD_KHR => write!(f, "RayPayloadKHR"),
1814 Self::HIT_ATTRIBUTE_KHR => write!(f, "HitAttributeKHR"),
1815 Self::INCOMING_RAY_PAYLOAD_KHR => write!(f, "IncomingRayPayloadKHR"),
1816 Self::SHADER_RECORD_BUFFER_KHR => write!(f, "ShaderRecordBufferKHR"),
1817 Self::PHYSICAL_STORAGE_BUFFER => write!(f, "PhysicalStorageBuffer"),
1818 Self::HIT_OBJECT_ATTRIBUTE_NV => write!(f, "HitObjectAttributeNV"),
1819 Self::TASK_PAYLOAD_WORKGROUP_EXT => write!(f, "TaskPayloadWorkgroupEXT"),
1820 Self::HIT_OBJECT_ATTRIBUTE_EXT => write!(f, "HitObjectAttributeEXT"),
1821 Self::CODE_SECTION_INTEL => write!(f, "CodeSectionINTEL"),
1822 Self::DEVICE_ONLY_ALTERA => write!(f, "DeviceOnlyALTERA"),
1823 Self::HOST_ONLY_ALTERA => write!(f, "HostOnlyALTERA"),
1824 x => write!(f, "{x}"),
1825 }
1826 }
1827}
1828#[derive(Clone, Copy, PartialEq, Eq, Debug)]
1829pub struct Dim(pub(crate) u32);
1830impl Dim {
1831 pub const TYPE_1D: Self = Self(0u32);
1832 pub const TYPE_2D: Self = Self(1u32);
1833 pub const TYPE_3D: Self = Self(2u32);
1834 pub const CUBE: Self = Self(3u32);
1835 pub const RECT: Self = Self(4u32);
1836 pub const BUFFER: Self = Self(5u32);
1837 pub const SUBPASS_DATA: Self = Self(6u32);
1838 pub const TILE_IMAGE_DATA_EXT: Self = Self(4173u32);
1839}
1840impl Word for Dim {
1841 #[inline]
1842 fn from_word(word: u32) -> Self {
1843 Self(word)
1844 }
1845}
1846impl Display for Dim {
1847 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1848 match *self {
1849 Self::TYPE_1D => write!(f, "1D"),
1850 Self::TYPE_2D => write!(f, "2D"),
1851 Self::TYPE_3D => write!(f, "3D"),
1852 Self::CUBE => write!(f, "Cube"),
1853 Self::RECT => write!(f, "Rect"),
1854 Self::BUFFER => write!(f, "Buffer"),
1855 Self::SUBPASS_DATA => write!(f, "SubpassData"),
1856 Self::TILE_IMAGE_DATA_EXT => write!(f, "TileImageDataEXT"),
1857 x => write!(f, "{x}"),
1858 }
1859 }
1860}
1861#[derive(Clone, Copy, PartialEq, Eq, Debug)]
1862pub struct SamplerAddressingMode(pub(crate) u32);
1863impl SamplerAddressingMode {
1864 pub const NONE: Self = Self(0u32);
1865 pub const CLAMP_TO_EDGE: Self = Self(1u32);
1866 pub const CLAMP: Self = Self(2u32);
1867 pub const REPEAT: Self = Self(3u32);
1868 pub const REPEAT_MIRRORED: Self = Self(4u32);
1869}
1870impl Word for SamplerAddressingMode {
1871 #[inline]
1872 fn from_word(word: u32) -> Self {
1873 Self(word)
1874 }
1875}
1876impl Display for SamplerAddressingMode {
1877 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1878 match *self {
1879 Self::NONE => write!(f, "None"),
1880 Self::CLAMP_TO_EDGE => write!(f, "ClampToEdge"),
1881 Self::CLAMP => write!(f, "Clamp"),
1882 Self::REPEAT => write!(f, "Repeat"),
1883 Self::REPEAT_MIRRORED => write!(f, "RepeatMirrored"),
1884 x => write!(f, "{x}"),
1885 }
1886 }
1887}
1888#[derive(Clone, Copy, PartialEq, Eq, Debug)]
1889pub struct SamplerFilterMode(pub(crate) u32);
1890impl SamplerFilterMode {
1891 pub const NEAREST: Self = Self(0u32);
1892 pub const LINEAR: Self = Self(1u32);
1893}
1894impl Word for SamplerFilterMode {
1895 #[inline]
1896 fn from_word(word: u32) -> Self {
1897 Self(word)
1898 }
1899}
1900impl Display for SamplerFilterMode {
1901 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1902 match *self {
1903 Self::NEAREST => write!(f, "Nearest"),
1904 Self::LINEAR => write!(f, "Linear"),
1905 x => write!(f, "{x}"),
1906 }
1907 }
1908}
1909#[derive(Clone, Copy, PartialEq, Eq, Debug)]
1910pub struct ImageFormat(pub(crate) u32);
1911impl ImageFormat {
1912 pub const UNKNOWN: Self = Self(0u32);
1913 pub const RGBA32F: Self = Self(1u32);
1914 pub const RGBA16F: Self = Self(2u32);
1915 pub const R32F: Self = Self(3u32);
1916 pub const RGBA8: Self = Self(4u32);
1917 pub const RGBA8_SNORM: Self = Self(5u32);
1918 pub const RG32F: Self = Self(6u32);
1919 pub const RG16F: Self = Self(7u32);
1920 pub const R11F_G11F_B10F: Self = Self(8u32);
1921 pub const R16F: Self = Self(9u32);
1922 pub const RGBA16: Self = Self(10u32);
1923 pub const RGB10_A2: Self = Self(11u32);
1924 pub const RG16: Self = Self(12u32);
1925 pub const RG8: Self = Self(13u32);
1926 pub const R16: Self = Self(14u32);
1927 pub const R8: Self = Self(15u32);
1928 pub const RGBA16_SNORM: Self = Self(16u32);
1929 pub const RG16_SNORM: Self = Self(17u32);
1930 pub const RG8_SNORM: Self = Self(18u32);
1931 pub const R16_SNORM: Self = Self(19u32);
1932 pub const R8_SNORM: Self = Self(20u32);
1933 pub const RGBA32I: Self = Self(21u32);
1934 pub const RGBA16I: Self = Self(22u32);
1935 pub const RGBA8I: Self = Self(23u32);
1936 pub const R32I: Self = Self(24u32);
1937 pub const RG32I: Self = Self(25u32);
1938 pub const RG16I: Self = Self(26u32);
1939 pub const RG8I: Self = Self(27u32);
1940 pub const R16I: Self = Self(28u32);
1941 pub const R8I: Self = Self(29u32);
1942 pub const RGBA32UI: Self = Self(30u32);
1943 pub const RGBA16UI: Self = Self(31u32);
1944 pub const RGBA8UI: Self = Self(32u32);
1945 pub const R32UI: Self = Self(33u32);
1946 pub const RGB10A2UI: Self = Self(34u32);
1947 pub const RG32UI: Self = Self(35u32);
1948 pub const RG16UI: Self = Self(36u32);
1949 pub const RG8UI: Self = Self(37u32);
1950 pub const R16UI: Self = Self(38u32);
1951 pub const R8UI: Self = Self(39u32);
1952 pub const R64UI: Self = Self(40u32);
1953 pub const R64I: Self = Self(41u32);
1954}
1955impl Word for ImageFormat {
1956 #[inline]
1957 fn from_word(word: u32) -> Self {
1958 Self(word)
1959 }
1960}
1961impl Display for ImageFormat {
1962 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1963 match *self {
1964 Self::UNKNOWN => write!(f, "Unknown"),
1965 Self::RGBA32F => write!(f, "Rgba32f"),
1966 Self::RGBA16F => write!(f, "Rgba16f"),
1967 Self::R32F => write!(f, "R32f"),
1968 Self::RGBA8 => write!(f, "Rgba8"),
1969 Self::RGBA8_SNORM => write!(f, "Rgba8Snorm"),
1970 Self::RG32F => write!(f, "Rg32f"),
1971 Self::RG16F => write!(f, "Rg16f"),
1972 Self::R11F_G11F_B10F => write!(f, "R11fG11fB10f"),
1973 Self::R16F => write!(f, "R16f"),
1974 Self::RGBA16 => write!(f, "Rgba16"),
1975 Self::RGB10_A2 => write!(f, "Rgb10A2"),
1976 Self::RG16 => write!(f, "Rg16"),
1977 Self::RG8 => write!(f, "Rg8"),
1978 Self::R16 => write!(f, "R16"),
1979 Self::R8 => write!(f, "R8"),
1980 Self::RGBA16_SNORM => write!(f, "Rgba16Snorm"),
1981 Self::RG16_SNORM => write!(f, "Rg16Snorm"),
1982 Self::RG8_SNORM => write!(f, "Rg8Snorm"),
1983 Self::R16_SNORM => write!(f, "R16Snorm"),
1984 Self::R8_SNORM => write!(f, "R8Snorm"),
1985 Self::RGBA32I => write!(f, "Rgba32i"),
1986 Self::RGBA16I => write!(f, "Rgba16i"),
1987 Self::RGBA8I => write!(f, "Rgba8i"),
1988 Self::R32I => write!(f, "R32i"),
1989 Self::RG32I => write!(f, "Rg32i"),
1990 Self::RG16I => write!(f, "Rg16i"),
1991 Self::RG8I => write!(f, "Rg8i"),
1992 Self::R16I => write!(f, "R16i"),
1993 Self::R8I => write!(f, "R8i"),
1994 Self::RGBA32UI => write!(f, "Rgba32ui"),
1995 Self::RGBA16UI => write!(f, "Rgba16ui"),
1996 Self::RGBA8UI => write!(f, "Rgba8ui"),
1997 Self::R32UI => write!(f, "R32ui"),
1998 Self::RGB10A2UI => write!(f, "Rgb10a2ui"),
1999 Self::RG32UI => write!(f, "Rg32ui"),
2000 Self::RG16UI => write!(f, "Rg16ui"),
2001 Self::RG8UI => write!(f, "Rg8ui"),
2002 Self::R16UI => write!(f, "R16ui"),
2003 Self::R8UI => write!(f, "R8ui"),
2004 Self::R64UI => write!(f, "R64ui"),
2005 Self::R64I => write!(f, "R64i"),
2006 x => write!(f, "{x}"),
2007 }
2008 }
2009}
2010#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2011pub struct ImageChannelOrder(pub(crate) u32);
2012impl ImageChannelOrder {
2013 pub const R: Self = Self(0u32);
2014 pub const A: Self = Self(1u32);
2015 pub const RG: Self = Self(2u32);
2016 pub const RA: Self = Self(3u32);
2017 pub const RGB: Self = Self(4u32);
2018 pub const RGBA: Self = Self(5u32);
2019 pub const BGRA: Self = Self(6u32);
2020 pub const ARGB: Self = Self(7u32);
2021 pub const INTENSITY: Self = Self(8u32);
2022 pub const LUMINANCE: Self = Self(9u32);
2023 pub const RX: Self = Self(10u32);
2024 pub const RGX: Self = Self(11u32);
2025 pub const RGBX: Self = Self(12u32);
2026 pub const DEPTH: Self = Self(13u32);
2027 pub const DEPTH_STENCIL: Self = Self(14u32);
2028 pub const SRGB: Self = Self(15u32);
2029 pub const SRGBX: Self = Self(16u32);
2030 pub const SRGBA: Self = Self(17u32);
2031 pub const SBGRA: Self = Self(18u32);
2032 pub const ABGR: Self = Self(19u32);
2033}
2034impl Word for ImageChannelOrder {
2035 #[inline]
2036 fn from_word(word: u32) -> Self {
2037 Self(word)
2038 }
2039}
2040impl Display for ImageChannelOrder {
2041 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2042 match *self {
2043 Self::R => write!(f, "R"),
2044 Self::A => write!(f, "A"),
2045 Self::RG => write!(f, "RG"),
2046 Self::RA => write!(f, "RA"),
2047 Self::RGB => write!(f, "RGB"),
2048 Self::RGBA => write!(f, "RGBA"),
2049 Self::BGRA => write!(f, "BGRA"),
2050 Self::ARGB => write!(f, "ARGB"),
2051 Self::INTENSITY => write!(f, "Intensity"),
2052 Self::LUMINANCE => write!(f, "Luminance"),
2053 Self::RX => write!(f, "Rx"),
2054 Self::RGX => write!(f, "RGx"),
2055 Self::RGBX => write!(f, "RGBx"),
2056 Self::DEPTH => write!(f, "Depth"),
2057 Self::DEPTH_STENCIL => write!(f, "DepthStencil"),
2058 Self::SRGB => write!(f, "sRGB"),
2059 Self::SRGBX => write!(f, "sRGBx"),
2060 Self::SRGBA => write!(f, "sRGBA"),
2061 Self::SBGRA => write!(f, "sBGRA"),
2062 Self::ABGR => write!(f, "ABGR"),
2063 x => write!(f, "{x}"),
2064 }
2065 }
2066}
2067#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2068pub struct ImageChannelDataType(pub(crate) u32);
2069impl ImageChannelDataType {
2070 pub const SNORM_INT8: Self = Self(0u32);
2071 pub const SNORM_INT16: Self = Self(1u32);
2072 pub const UNORM_INT8: Self = Self(2u32);
2073 pub const UNORM_INT16: Self = Self(3u32);
2074 pub const UNORM_SHORT565: Self = Self(4u32);
2075 pub const UNORM_SHORT555: Self = Self(5u32);
2076 pub const UNORM_INT101010: Self = Self(6u32);
2077 pub const SIGNED_INT8: Self = Self(7u32);
2078 pub const SIGNED_INT16: Self = Self(8u32);
2079 pub const SIGNED_INT32: Self = Self(9u32);
2080 pub const UNSIGNED_INT8: Self = Self(10u32);
2081 pub const UNSIGNED_INT16: Self = Self(11u32);
2082 pub const UNSIGNED_INT32: Self = Self(12u32);
2083 pub const HALF_FLOAT: Self = Self(13u32);
2084 pub const FLOAT: Self = Self(14u32);
2085 pub const UNORM_INT24: Self = Self(15u32);
2086 pub const UNORM_INT101010_2: Self = Self(16u32);
2087 pub const UNORM_INT10_X6_EXT: Self = Self(17u32);
2088 pub const UNSIGNED_INT_RAW10_EXT: Self = Self(19u32);
2089 pub const UNSIGNED_INT_RAW12_EXT: Self = Self(20u32);
2090 pub const UNORM_INT2_101010_EXT: Self = Self(21u32);
2091 pub const UNSIGNED_INT10_X6_EXT: Self = Self(22u32);
2092 pub const UNSIGNED_INT12_X4_EXT: Self = Self(23u32);
2093 pub const UNSIGNED_INT14_X2_EXT: Self = Self(24u32);
2094 pub const UNORM_INT12_X4_EXT: Self = Self(25u32);
2095 pub const UNORM_INT14_X2_EXT: Self = Self(26u32);
2096}
2097impl Word for ImageChannelDataType {
2098 #[inline]
2099 fn from_word(word: u32) -> Self {
2100 Self(word)
2101 }
2102}
2103impl Display for ImageChannelDataType {
2104 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2105 match *self {
2106 Self::SNORM_INT8 => write!(f, "SnormInt8"),
2107 Self::SNORM_INT16 => write!(f, "SnormInt16"),
2108 Self::UNORM_INT8 => write!(f, "UnormInt8"),
2109 Self::UNORM_INT16 => write!(f, "UnormInt16"),
2110 Self::UNORM_SHORT565 => write!(f, "UnormShort565"),
2111 Self::UNORM_SHORT555 => write!(f, "UnormShort555"),
2112 Self::UNORM_INT101010 => write!(f, "UnormInt101010"),
2113 Self::SIGNED_INT8 => write!(f, "SignedInt8"),
2114 Self::SIGNED_INT16 => write!(f, "SignedInt16"),
2115 Self::SIGNED_INT32 => write!(f, "SignedInt32"),
2116 Self::UNSIGNED_INT8 => write!(f, "UnsignedInt8"),
2117 Self::UNSIGNED_INT16 => write!(f, "UnsignedInt16"),
2118 Self::UNSIGNED_INT32 => write!(f, "UnsignedInt32"),
2119 Self::HALF_FLOAT => write!(f, "HalfFloat"),
2120 Self::FLOAT => write!(f, "Float"),
2121 Self::UNORM_INT24 => write!(f, "UnormInt24"),
2122 Self::UNORM_INT101010_2 => write!(f, "UnormInt101010_2"),
2123 Self::UNORM_INT10_X6_EXT => write!(f, "UnormInt10X6EXT"),
2124 Self::UNSIGNED_INT_RAW10_EXT => write!(f, "UnsignedIntRaw10EXT"),
2125 Self::UNSIGNED_INT_RAW12_EXT => write!(f, "UnsignedIntRaw12EXT"),
2126 Self::UNORM_INT2_101010_EXT => write!(f, "UnormInt2_101010EXT"),
2127 Self::UNSIGNED_INT10_X6_EXT => write!(f, "UnsignedInt10X6EXT"),
2128 Self::UNSIGNED_INT12_X4_EXT => write!(f, "UnsignedInt12X4EXT"),
2129 Self::UNSIGNED_INT14_X2_EXT => write!(f, "UnsignedInt14X2EXT"),
2130 Self::UNORM_INT12_X4_EXT => write!(f, "UnormInt12X4EXT"),
2131 Self::UNORM_INT14_X2_EXT => write!(f, "UnormInt14X2EXT"),
2132 x => write!(f, "{x}"),
2133 }
2134 }
2135}
2136#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2137pub struct FPRoundingMode(pub(crate) u32);
2138impl FPRoundingMode {
2139 pub const RTE: Self = Self(0u32);
2140 pub const RTZ: Self = Self(1u32);
2141 pub const RTP: Self = Self(2u32);
2142 pub const RTN: Self = Self(3u32);
2143}
2144impl Word for FPRoundingMode {
2145 #[inline]
2146 fn from_word(word: u32) -> Self {
2147 Self(word)
2148 }
2149}
2150impl Display for FPRoundingMode {
2151 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2152 match *self {
2153 Self::RTE => write!(f, "RTE"),
2154 Self::RTZ => write!(f, "RTZ"),
2155 Self::RTP => write!(f, "RTP"),
2156 Self::RTN => write!(f, "RTN"),
2157 x => write!(f, "{x}"),
2158 }
2159 }
2160}
2161#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2162pub struct FPDenormMode(pub(crate) u32);
2163impl FPDenormMode {
2164 pub const PRESERVE: Self = Self(0u32);
2165 pub const FLUSH_TO_ZERO: Self = Self(1u32);
2166}
2167impl Word for FPDenormMode {
2168 #[inline]
2169 fn from_word(word: u32) -> Self {
2170 Self(word)
2171 }
2172}
2173impl Display for FPDenormMode {
2174 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2175 match *self {
2176 Self::PRESERVE => write!(f, "Preserve"),
2177 Self::FLUSH_TO_ZERO => write!(f, "FlushToZero"),
2178 x => write!(f, "{x}"),
2179 }
2180 }
2181}
2182#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2183pub struct QuantizationModes(pub(crate) u32);
2184impl QuantizationModes {
2185 pub const TRN: Self = Self(0u32);
2186 pub const TRN_ZERO: Self = Self(1u32);
2187 pub const RND: Self = Self(2u32);
2188 pub const RND_ZERO: Self = Self(3u32);
2189 pub const RND_INF: Self = Self(4u32);
2190 pub const RND_MIN_INF: Self = Self(5u32);
2191 pub const RND_CONV: Self = Self(6u32);
2192 pub const RND_CONV_ODD: Self = Self(7u32);
2193}
2194impl Word for QuantizationModes {
2195 #[inline]
2196 fn from_word(word: u32) -> Self {
2197 Self(word)
2198 }
2199}
2200impl Display for QuantizationModes {
2201 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2202 match *self {
2203 Self::TRN => write!(f, "TRN"),
2204 Self::TRN_ZERO => write!(f, "TRN_ZERO"),
2205 Self::RND => write!(f, "RND"),
2206 Self::RND_ZERO => write!(f, "RND_ZERO"),
2207 Self::RND_INF => write!(f, "RND_INF"),
2208 Self::RND_MIN_INF => write!(f, "RND_MIN_INF"),
2209 Self::RND_CONV => write!(f, "RND_CONV"),
2210 Self::RND_CONV_ODD => write!(f, "RND_CONV_ODD"),
2211 x => write!(f, "{x}"),
2212 }
2213 }
2214}
2215#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2216pub struct FPOperationMode(pub(crate) u32);
2217impl FPOperationMode {
2218 pub const IEEE: Self = Self(0u32);
2219 pub const ALT: Self = Self(1u32);
2220}
2221impl Word for FPOperationMode {
2222 #[inline]
2223 fn from_word(word: u32) -> Self {
2224 Self(word)
2225 }
2226}
2227impl Display for FPOperationMode {
2228 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2229 match *self {
2230 Self::IEEE => write!(f, "IEEE"),
2231 Self::ALT => write!(f, "ALT"),
2232 x => write!(f, "{x}"),
2233 }
2234 }
2235}
2236#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2237pub struct OverflowModes(pub(crate) u32);
2238impl OverflowModes {
2239 pub const WRAP: Self = Self(0u32);
2240 pub const SAT: Self = Self(1u32);
2241 pub const SAT_ZERO: Self = Self(2u32);
2242 pub const SAT_SYM: Self = Self(3u32);
2243}
2244impl Word for OverflowModes {
2245 #[inline]
2246 fn from_word(word: u32) -> Self {
2247 Self(word)
2248 }
2249}
2250impl Display for OverflowModes {
2251 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2252 match *self {
2253 Self::WRAP => write!(f, "WRAP"),
2254 Self::SAT => write!(f, "SAT"),
2255 Self::SAT_ZERO => write!(f, "SAT_ZERO"),
2256 Self::SAT_SYM => write!(f, "SAT_SYM"),
2257 x => write!(f, "{x}"),
2258 }
2259 }
2260}
2261#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2262pub struct LinkageType(pub(crate) u32);
2263impl LinkageType {
2264 pub const EXPORT: Self = Self(0u32);
2265 pub const IMPORT: Self = Self(1u32);
2266 pub const LINK_ONCE_ODR: Self = Self(2u32);
2267}
2268impl Word for LinkageType {
2269 #[inline]
2270 fn from_word(word: u32) -> Self {
2271 Self(word)
2272 }
2273}
2274impl Display for LinkageType {
2275 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2276 match *self {
2277 Self::EXPORT => write!(f, "Export"),
2278 Self::IMPORT => write!(f, "Import"),
2279 Self::LINK_ONCE_ODR => write!(f, "LinkOnceODR"),
2280 x => write!(f, "{x}"),
2281 }
2282 }
2283}
2284#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2285pub struct AccessQualifier(pub(crate) u32);
2286impl AccessQualifier {
2287 pub const READ_ONLY: Self = Self(0u32);
2288 pub const WRITE_ONLY: Self = Self(1u32);
2289 pub const READ_WRITE: Self = Self(2u32);
2290}
2291impl Word for AccessQualifier {
2292 #[inline]
2293 fn from_word(word: u32) -> Self {
2294 Self(word)
2295 }
2296}
2297impl Display for AccessQualifier {
2298 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2299 match *self {
2300 Self::READ_ONLY => write!(f, "ReadOnly"),
2301 Self::WRITE_ONLY => write!(f, "WriteOnly"),
2302 Self::READ_WRITE => write!(f, "ReadWrite"),
2303 x => write!(f, "{x}"),
2304 }
2305 }
2306}
2307#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2308pub struct HostAccessQualifier(pub(crate) u32);
2309impl HostAccessQualifier {
2310 pub const NONE_INTEL: Self = Self(0u32);
2311 pub const READ_INTEL: Self = Self(1u32);
2312 pub const WRITE_INTEL: Self = Self(2u32);
2313 pub const READ_WRITE_INTEL: Self = Self(3u32);
2314}
2315impl Word for HostAccessQualifier {
2316 #[inline]
2317 fn from_word(word: u32) -> Self {
2318 Self(word)
2319 }
2320}
2321impl Display for HostAccessQualifier {
2322 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2323 match *self {
2324 Self::NONE_INTEL => write!(f, "NoneINTEL"),
2325 Self::READ_INTEL => write!(f, "ReadINTEL"),
2326 Self::WRITE_INTEL => write!(f, "WriteINTEL"),
2327 Self::READ_WRITE_INTEL => write!(f, "ReadWriteINTEL"),
2328 x => write!(f, "{x}"),
2329 }
2330 }
2331}
2332#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2333pub struct FunctionParameterAttribute(pub(crate) u32);
2334impl FunctionParameterAttribute {
2335 pub const ZEXT: Self = Self(0u32);
2336 pub const SEXT: Self = Self(1u32);
2337 pub const BY_VAL: Self = Self(2u32);
2338 pub const SRET: Self = Self(3u32);
2339 pub const NO_ALIAS: Self = Self(4u32);
2340 pub const NO_CAPTURE: Self = Self(5u32);
2341 pub const NO_WRITE: Self = Self(6u32);
2342 pub const NO_READ_WRITE: Self = Self(7u32);
2343 pub const RUNTIME_ALIGNED_ALTERA: Self = Self(5940u32);
2344}
2345impl Word for FunctionParameterAttribute {
2346 #[inline]
2347 fn from_word(word: u32) -> Self {
2348 Self(word)
2349 }
2350}
2351impl Display for FunctionParameterAttribute {
2352 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2353 match *self {
2354 Self::ZEXT => write!(f, "Zext"),
2355 Self::SEXT => write!(f, "Sext"),
2356 Self::BY_VAL => write!(f, "ByVal"),
2357 Self::SRET => write!(f, "Sret"),
2358 Self::NO_ALIAS => write!(f, "NoAlias"),
2359 Self::NO_CAPTURE => write!(f, "NoCapture"),
2360 Self::NO_WRITE => write!(f, "NoWrite"),
2361 Self::NO_READ_WRITE => write!(f, "NoReadWrite"),
2362 Self::RUNTIME_ALIGNED_ALTERA => write!(f, "RuntimeAlignedALTERA"),
2363 x => write!(f, "{x}"),
2364 }
2365 }
2366}
2367#[derive(Clone, Copy, Debug)]
2368pub enum Decoration<'a> {
2369 RelaxedPrecision,
2370 SpecId {
2371 specialization_constant_id: LiteralInteger,
2372 },
2373 Block,
2374 BufferBlock,
2375 RowMajor,
2376 ColMajor,
2377 ArrayStride {
2378 array_stride: LiteralInteger,
2379 },
2380 MatrixStride {
2381 matrix_stride: LiteralInteger,
2382 },
2383 GLSLShared,
2384 GLSLPacked,
2385 CPacked,
2386 BuiltIn {
2387 built_in: BuiltIn,
2388 },
2389 NoPerspective,
2390 Flat,
2391 Patch,
2392 Centroid,
2393 Sample,
2394 Invariant,
2395 Restrict,
2396 Aliased,
2397 Volatile,
2398 Constant,
2399 Coherent,
2400 NonWritable,
2401 NonReadable,
2402 Uniform,
2403 UniformId {
2404 execution: IdScope,
2405 },
2406 SaturatedConversion,
2407 Stream {
2408 stream_number: LiteralInteger,
2409 },
2410 Location {
2411 location: LiteralInteger,
2412 },
2413 Component {
2414 component: LiteralInteger,
2415 },
2416 Index {
2417 index: LiteralInteger,
2418 },
2419 Binding {
2420 binding_point: LiteralInteger,
2421 },
2422 DescriptorSet {
2423 descriptor_set: LiteralInteger,
2424 },
2425 Offset {
2426 byte_offset: LiteralInteger,
2427 },
2428 XfbBuffer {
2429 xfb_buffer_number: LiteralInteger,
2430 },
2431 XfbStride {
2432 xfb_stride: LiteralInteger,
2433 },
2434 FuncParamAttr {
2435 function_parameter_attribute: FunctionParameterAttribute,
2436 },
2437 FPRoundingMode {
2438 floating_point_rounding_mode: FPRoundingMode,
2439 },
2440 FPFastMathMode {
2441 fast_math_mode: FPFastMathMode,
2442 },
2443 LinkageAttributes {
2444 name: LiteralString<'a>,
2445 linkage_type: LinkageType,
2446 },
2447 NoContraction,
2448 InputAttachmentIndex {
2449 attachment_index: LiteralInteger,
2450 },
2451 Alignment {
2452 alignment: LiteralInteger,
2453 },
2454 MaxByteOffset {
2455 max_byte_offset: LiteralInteger,
2456 },
2457 AlignmentId {
2458 alignment: IdRef,
2459 },
2460 MaxByteOffsetId {
2461 max_byte_offset: IdRef,
2462 },
2463 SaturatedToLargestFloat8NormalConversionEXT,
2464 NoSignedWrap,
2465 NoUnsignedWrap,
2466 WeightTextureQCOM,
2467 BlockMatchTextureQCOM,
2468 BlockMatchSamplerQCOM,
2469 ExplicitInterpAMD,
2470 NodeSharesPayloadLimitsWithAMDX {
2471 payload_type: IdRef,
2472 },
2473 NodeMaxPayloadsAMDX {
2474 max_number_of_payloads: IdRef,
2475 },
2476 TrackFinishWritingAMDX,
2477 PayloadNodeNameAMDX {
2478 node_name: IdRef,
2479 },
2480 PayloadNodeBaseIndexAMDX {
2481 base_index: IdRef,
2482 },
2483 PayloadNodeSparseArrayAMDX,
2484 PayloadNodeArraySizeAMDX {
2485 array_size: IdRef,
2486 },
2487 PayloadDispatchIndirectAMDX,
2488 ArrayStrideIdEXT {
2489 array_stride: IdRef,
2490 },
2491 OffsetIdEXT {
2492 byte_offset: IdRef,
2493 },
2494 UTFEncodedKHR,
2495 OverrideCoverageNV,
2496 PassthroughNV,
2497 ViewportRelativeNV,
2498 SecondaryViewportRelativeNV {
2499 offset: LiteralInteger,
2500 },
2501 PerPrimitiveEXT,
2502 PerViewNV,
2503 PerTaskNV,
2504 PerVertexKHR,
2505 NonUniform,
2506 RestrictPointer,
2507 AliasedPointer,
2508 MemberOffsetNV {
2509 member_offset: LiteralInteger,
2510 },
2511 HitObjectShaderRecordBufferNV,
2512 HitObjectShaderRecordBufferEXT,
2513 BankNV {
2514 bank: LiteralInteger,
2515 },
2516 BindlessSamplerNV,
2517 BindlessImageNV,
2518 BoundSamplerNV,
2519 BoundImageNV,
2520 SIMTCallINTEL {
2521 n: LiteralInteger,
2522 },
2523 ReferencedIndirectlyINTEL,
2524 ClobberINTEL {
2525 register: LiteralString<'a>,
2526 },
2527 SideEffectsINTEL,
2528 VectorComputeVariableINTEL,
2529 FuncParamIOKindINTEL {
2530 kind: LiteralInteger,
2531 },
2532 VectorComputeFunctionINTEL,
2533 StackCallINTEL,
2534 GlobalVariableOffsetINTEL {
2535 offset: LiteralInteger,
2536 },
2537 CounterBuffer {
2538 counter_buffer: IdRef,
2539 },
2540 UserSemantic {
2541 semantic: LiteralString<'a>,
2542 },
2543 UserTypeGOOGLE {
2544 user_type: LiteralString<'a>,
2545 },
2546 FunctionRoundingModeINTEL {
2547 target_width: LiteralInteger,
2548 fp_rounding_mode: FPRoundingMode,
2549 },
2550 FunctionDenormModeINTEL {
2551 target_width: LiteralInteger,
2552 fp_denorm_mode: FPDenormMode,
2553 },
2554 RegisterALTERA,
2555 MemoryALTERA {
2556 memory_type: LiteralString<'a>,
2557 },
2558 NumbanksALTERA {
2559 banks: LiteralInteger,
2560 },
2561 BankwidthALTERA {
2562 bank_width: LiteralInteger,
2563 },
2564 MaxPrivateCopiesALTERA {
2565 maximum_copies: LiteralInteger,
2566 },
2567 SinglepumpALTERA,
2568 DoublepumpALTERA,
2569 MaxReplicatesALTERA {
2570 maximum_replicates: LiteralInteger,
2571 },
2572 SimpleDualPortALTERA,
2573 MergeALTERA {
2574 merge_key: LiteralString<'a>,
2575 merge_type: LiteralString<'a>,
2576 },
2577 BankBitsALTERA {
2578 bank_bits: LiteralInteger,
2579 },
2580 ForcePow2DepthALTERA {
2581 force_key: LiteralInteger,
2582 },
2583 StridesizeALTERA {
2584 stride_size: LiteralInteger,
2585 },
2586 WordsizeALTERA {
2587 word_size: LiteralInteger,
2588 },
2589 TrueDualPortALTERA,
2590 BurstCoalesceALTERA,
2591 CacheSizeALTERA {
2592 cache_size_in_bytes: LiteralInteger,
2593 },
2594 DontStaticallyCoalesceALTERA,
2595 PrefetchALTERA {
2596 prefetcher_size_in_bytes: LiteralInteger,
2597 },
2598 StallEnableALTERA,
2599 FuseLoopsInFunctionALTERA,
2600 MathOpDSPModeALTERA {
2601 mode: LiteralInteger,
2602 propagate: LiteralInteger,
2603 },
2604 AliasScopeINTEL {
2605 aliasing_scopes_list: IdRef,
2606 },
2607 NoAliasINTEL {
2608 aliasing_scopes_list: IdRef,
2609 },
2610 InitiationIntervalALTERA {
2611 cycles: LiteralInteger,
2612 },
2613 MaxConcurrencyALTERA {
2614 invocations: LiteralInteger,
2615 },
2616 PipelineEnableALTERA {
2617 enable: LiteralInteger,
2618 },
2619 BufferLocationALTERA {
2620 buffer_location_id: LiteralInteger,
2621 },
2622 IOPipeStorageALTERA {
2623 io_pipe_id: LiteralInteger,
2624 },
2625 FunctionFloatingPointModeINTEL {
2626 target_width: LiteralInteger,
2627 fp_operation_mode: FPOperationMode,
2628 },
2629 SingleElementVectorINTEL,
2630 VectorComputeCallableFunctionINTEL,
2631 MediaBlockIOINTEL,
2632 StallFreeALTERA,
2633 FPMaxErrorDecorationINTEL {
2634 max_error: LiteralFloat,
2635 },
2636 LatencyControlLabelALTERA {
2637 latency_label: LiteralInteger,
2638 },
2639 LatencyControlConstraintALTERA {
2640 relative_to: LiteralInteger,
2641 control_type: LiteralInteger,
2642 relative_cycle: LiteralInteger,
2643 },
2644 ConduitKernelArgumentALTERA,
2645 RegisterMapKernelArgumentALTERA,
2646 MMHostInterfaceAddressWidthALTERA {
2647 address_width: LiteralInteger,
2648 },
2649 MMHostInterfaceDataWidthALTERA {
2650 data_width: LiteralInteger,
2651 },
2652 MMHostInterfaceLatencyALTERA {
2653 latency: LiteralInteger,
2654 },
2655 MMHostInterfaceReadWriteModeALTERA {
2656 read_write_mode: AccessQualifier,
2657 },
2658 MMHostInterfaceMaxBurstALTERA {
2659 max_burst_count: LiteralInteger,
2660 },
2661 MMHostInterfaceWaitRequestALTERA {
2662 waitrequest: LiteralInteger,
2663 },
2664 StableKernelArgumentALTERA,
2665 HostAccessINTEL {
2666 access: HostAccessQualifier,
2667 name: LiteralString<'a>,
2668 },
2669 InitModeALTERA {
2670 trigger: InitializationModeQualifier,
2671 },
2672 ImplementInRegisterMapALTERA {
2673 value: LiteralInteger,
2674 },
2675 ConditionalINTEL {
2676 condition: IdRef,
2677 },
2678 CacheControlLoadINTEL {
2679 cache_level: LiteralInteger,
2680 cache_control: LoadCacheControl,
2681 },
2682 CacheControlStoreINTEL {
2683 cache_level: LiteralInteger,
2684 cache_control: StoreCacheControl,
2685 },
2686}
2687impl<'a> Decoration<'a> {
2688 #[inline]
2689 pub fn parse_one(stream: &mut InstructionStream<'a>) -> ParseResult<Self> {
2690 let variant = stream.read()?;
2691 match variant {
2692 0u32 => Ok(Self::RelaxedPrecision),
2693 1u32 => Ok(Self::SpecId {
2694 specialization_constant_id: LiteralInteger::parse_one(stream)?,
2695 }),
2696 2u32 => Ok(Self::Block),
2697 3u32 => Ok(Self::BufferBlock),
2698 4u32 => Ok(Self::RowMajor),
2699 5u32 => Ok(Self::ColMajor),
2700 6u32 => Ok(Self::ArrayStride {
2701 array_stride: LiteralInteger::parse_one(stream)?,
2702 }),
2703 7u32 => Ok(Self::MatrixStride {
2704 matrix_stride: LiteralInteger::parse_one(stream)?,
2705 }),
2706 8u32 => Ok(Self::GLSLShared),
2707 9u32 => Ok(Self::GLSLPacked),
2708 10u32 => Ok(Self::CPacked),
2709 11u32 => Ok(Self::BuiltIn {
2710 built_in: BuiltIn::parse_one(stream)?,
2711 }),
2712 13u32 => Ok(Self::NoPerspective),
2713 14u32 => Ok(Self::Flat),
2714 15u32 => Ok(Self::Patch),
2715 16u32 => Ok(Self::Centroid),
2716 17u32 => Ok(Self::Sample),
2717 18u32 => Ok(Self::Invariant),
2718 19u32 => Ok(Self::Restrict),
2719 20u32 => Ok(Self::Aliased),
2720 21u32 => Ok(Self::Volatile),
2721 22u32 => Ok(Self::Constant),
2722 23u32 => Ok(Self::Coherent),
2723 24u32 => Ok(Self::NonWritable),
2724 25u32 => Ok(Self::NonReadable),
2725 26u32 => Ok(Self::Uniform),
2726 27u32 => Ok(Self::UniformId {
2727 execution: IdScope::parse_one(stream)?,
2728 }),
2729 28u32 => Ok(Self::SaturatedConversion),
2730 29u32 => Ok(Self::Stream {
2731 stream_number: LiteralInteger::parse_one(stream)?,
2732 }),
2733 30u32 => Ok(Self::Location {
2734 location: LiteralInteger::parse_one(stream)?,
2735 }),
2736 31u32 => Ok(Self::Component {
2737 component: LiteralInteger::parse_one(stream)?,
2738 }),
2739 32u32 => Ok(Self::Index {
2740 index: LiteralInteger::parse_one(stream)?,
2741 }),
2742 33u32 => Ok(Self::Binding {
2743 binding_point: LiteralInteger::parse_one(stream)?,
2744 }),
2745 34u32 => Ok(Self::DescriptorSet {
2746 descriptor_set: LiteralInteger::parse_one(stream)?,
2747 }),
2748 35u32 => Ok(Self::Offset {
2749 byte_offset: LiteralInteger::parse_one(stream)?,
2750 }),
2751 36u32 => Ok(Self::XfbBuffer {
2752 xfb_buffer_number: LiteralInteger::parse_one(stream)?,
2753 }),
2754 37u32 => Ok(Self::XfbStride {
2755 xfb_stride: LiteralInteger::parse_one(stream)?,
2756 }),
2757 38u32 => Ok(Self::FuncParamAttr {
2758 function_parameter_attribute: FunctionParameterAttribute::parse_one(stream)?,
2759 }),
2760 39u32 => Ok(Self::FPRoundingMode {
2761 floating_point_rounding_mode: FPRoundingMode::parse_one(stream)?,
2762 }),
2763 40u32 => Ok(Self::FPFastMathMode {
2764 fast_math_mode: FPFastMathMode::parse_one(stream)?,
2765 }),
2766 41u32 => Ok(Self::LinkageAttributes {
2767 name: LiteralString::parse_one(stream)?,
2768 linkage_type: LinkageType::parse_one(stream)?,
2769 }),
2770 42u32 => Ok(Self::NoContraction),
2771 43u32 => Ok(Self::InputAttachmentIndex {
2772 attachment_index: LiteralInteger::parse_one(stream)?,
2773 }),
2774 44u32 => Ok(Self::Alignment {
2775 alignment: LiteralInteger::parse_one(stream)?,
2776 }),
2777 45u32 => Ok(Self::MaxByteOffset {
2778 max_byte_offset: LiteralInteger::parse_one(stream)?,
2779 }),
2780 46u32 => Ok(Self::AlignmentId {
2781 alignment: IdRef::parse_one(stream)?,
2782 }),
2783 47u32 => Ok(Self::MaxByteOffsetId {
2784 max_byte_offset: IdRef::parse_one(stream)?,
2785 }),
2786 4216u32 => Ok(Self::SaturatedToLargestFloat8NormalConversionEXT),
2787 4469u32 => Ok(Self::NoSignedWrap),
2788 4470u32 => Ok(Self::NoUnsignedWrap),
2789 4487u32 => Ok(Self::WeightTextureQCOM),
2790 4488u32 => Ok(Self::BlockMatchTextureQCOM),
2791 4499u32 => Ok(Self::BlockMatchSamplerQCOM),
2792 4999u32 => Ok(Self::ExplicitInterpAMD),
2793 5019u32 => Ok(Self::NodeSharesPayloadLimitsWithAMDX {
2794 payload_type: IdRef::parse_one(stream)?,
2795 }),
2796 5020u32 => Ok(Self::NodeMaxPayloadsAMDX {
2797 max_number_of_payloads: IdRef::parse_one(stream)?,
2798 }),
2799 5078u32 => Ok(Self::TrackFinishWritingAMDX),
2800 5091u32 => Ok(Self::PayloadNodeNameAMDX {
2801 node_name: IdRef::parse_one(stream)?,
2802 }),
2803 5098u32 => Ok(Self::PayloadNodeBaseIndexAMDX {
2804 base_index: IdRef::parse_one(stream)?,
2805 }),
2806 5099u32 => Ok(Self::PayloadNodeSparseArrayAMDX),
2807 5100u32 => Ok(Self::PayloadNodeArraySizeAMDX {
2808 array_size: IdRef::parse_one(stream)?,
2809 }),
2810 5105u32 => Ok(Self::PayloadDispatchIndirectAMDX),
2811 5124u32 => Ok(Self::ArrayStrideIdEXT {
2812 array_stride: IdRef::parse_one(stream)?,
2813 }),
2814 5125u32 => Ok(Self::OffsetIdEXT {
2815 byte_offset: IdRef::parse_one(stream)?,
2816 }),
2817 5145u32 => Ok(Self::UTFEncodedKHR),
2818 5248u32 => Ok(Self::OverrideCoverageNV),
2819 5250u32 => Ok(Self::PassthroughNV),
2820 5252u32 => Ok(Self::ViewportRelativeNV),
2821 5256u32 => Ok(Self::SecondaryViewportRelativeNV {
2822 offset: LiteralInteger::parse_one(stream)?,
2823 }),
2824 5271u32 => Ok(Self::PerPrimitiveEXT),
2825 5272u32 => Ok(Self::PerViewNV),
2826 5273u32 => Ok(Self::PerTaskNV),
2827 5285u32 => Ok(Self::PerVertexKHR),
2828 5300u32 => Ok(Self::NonUniform),
2829 5355u32 => Ok(Self::RestrictPointer),
2830 5356u32 => Ok(Self::AliasedPointer),
2831 5358u32 => Ok(Self::MemberOffsetNV {
2832 member_offset: LiteralInteger::parse_one(stream)?,
2833 }),
2834 5386u32 => Ok(Self::HitObjectShaderRecordBufferNV),
2835 5389u32 => Ok(Self::HitObjectShaderRecordBufferEXT),
2836 5397u32 => Ok(Self::BankNV {
2837 bank: LiteralInteger::parse_one(stream)?,
2838 }),
2839 5398u32 => Ok(Self::BindlessSamplerNV),
2840 5399u32 => Ok(Self::BindlessImageNV),
2841 5400u32 => Ok(Self::BoundSamplerNV),
2842 5401u32 => Ok(Self::BoundImageNV),
2843 5599u32 => Ok(Self::SIMTCallINTEL {
2844 n: LiteralInteger::parse_one(stream)?,
2845 }),
2846 5602u32 => Ok(Self::ReferencedIndirectlyINTEL),
2847 5607u32 => Ok(Self::ClobberINTEL {
2848 register: LiteralString::parse_one(stream)?,
2849 }),
2850 5608u32 => Ok(Self::SideEffectsINTEL),
2851 5624u32 => Ok(Self::VectorComputeVariableINTEL),
2852 5625u32 => Ok(Self::FuncParamIOKindINTEL {
2853 kind: LiteralInteger::parse_one(stream)?,
2854 }),
2855 5626u32 => Ok(Self::VectorComputeFunctionINTEL),
2856 5627u32 => Ok(Self::StackCallINTEL),
2857 5628u32 => Ok(Self::GlobalVariableOffsetINTEL {
2858 offset: LiteralInteger::parse_one(stream)?,
2859 }),
2860 5634u32 => Ok(Self::CounterBuffer {
2861 counter_buffer: IdRef::parse_one(stream)?,
2862 }),
2863 5635u32 => Ok(Self::UserSemantic {
2864 semantic: LiteralString::parse_one(stream)?,
2865 }),
2866 5636u32 => Ok(Self::UserTypeGOOGLE {
2867 user_type: LiteralString::parse_one(stream)?,
2868 }),
2869 5822u32 => Ok(Self::FunctionRoundingModeINTEL {
2870 target_width: LiteralInteger::parse_one(stream)?,
2871 fp_rounding_mode: FPRoundingMode::parse_one(stream)?,
2872 }),
2873 5823u32 => Ok(Self::FunctionDenormModeINTEL {
2874 target_width: LiteralInteger::parse_one(stream)?,
2875 fp_denorm_mode: FPDenormMode::parse_one(stream)?,
2876 }),
2877 5825u32 => Ok(Self::RegisterALTERA),
2878 5826u32 => Ok(Self::MemoryALTERA {
2879 memory_type: LiteralString::parse_one(stream)?,
2880 }),
2881 5827u32 => Ok(Self::NumbanksALTERA {
2882 banks: LiteralInteger::parse_one(stream)?,
2883 }),
2884 5828u32 => Ok(Self::BankwidthALTERA {
2885 bank_width: LiteralInteger::parse_one(stream)?,
2886 }),
2887 5829u32 => Ok(Self::MaxPrivateCopiesALTERA {
2888 maximum_copies: LiteralInteger::parse_one(stream)?,
2889 }),
2890 5830u32 => Ok(Self::SinglepumpALTERA),
2891 5831u32 => Ok(Self::DoublepumpALTERA),
2892 5832u32 => Ok(Self::MaxReplicatesALTERA {
2893 maximum_replicates: LiteralInteger::parse_one(stream)?,
2894 }),
2895 5833u32 => Ok(Self::SimpleDualPortALTERA),
2896 5834u32 => Ok(Self::MergeALTERA {
2897 merge_key: LiteralString::parse_one(stream)?,
2898 merge_type: LiteralString::parse_one(stream)?,
2899 }),
2900 5835u32 => Ok(Self::BankBitsALTERA {
2901 bank_bits: LiteralInteger::parse_one(stream)?,
2902 }),
2903 5836u32 => Ok(Self::ForcePow2DepthALTERA {
2904 force_key: LiteralInteger::parse_one(stream)?,
2905 }),
2906 5883u32 => Ok(Self::StridesizeALTERA {
2907 stride_size: LiteralInteger::parse_one(stream)?,
2908 }),
2909 5884u32 => Ok(Self::WordsizeALTERA {
2910 word_size: LiteralInteger::parse_one(stream)?,
2911 }),
2912 5885u32 => Ok(Self::TrueDualPortALTERA),
2913 5899u32 => Ok(Self::BurstCoalesceALTERA),
2914 5900u32 => Ok(Self::CacheSizeALTERA {
2915 cache_size_in_bytes: LiteralInteger::parse_one(stream)?,
2916 }),
2917 5901u32 => Ok(Self::DontStaticallyCoalesceALTERA),
2918 5902u32 => Ok(Self::PrefetchALTERA {
2919 prefetcher_size_in_bytes: LiteralInteger::parse_one(stream)?,
2920 }),
2921 5905u32 => Ok(Self::StallEnableALTERA),
2922 5907u32 => Ok(Self::FuseLoopsInFunctionALTERA),
2923 5909u32 => Ok(Self::MathOpDSPModeALTERA {
2924 mode: LiteralInteger::parse_one(stream)?,
2925 propagate: LiteralInteger::parse_one(stream)?,
2926 }),
2927 5914u32 => Ok(Self::AliasScopeINTEL {
2928 aliasing_scopes_list: IdRef::parse_one(stream)?,
2929 }),
2930 5915u32 => Ok(Self::NoAliasINTEL {
2931 aliasing_scopes_list: IdRef::parse_one(stream)?,
2932 }),
2933 5917u32 => Ok(Self::InitiationIntervalALTERA {
2934 cycles: LiteralInteger::parse_one(stream)?,
2935 }),
2936 5918u32 => Ok(Self::MaxConcurrencyALTERA {
2937 invocations: LiteralInteger::parse_one(stream)?,
2938 }),
2939 5919u32 => Ok(Self::PipelineEnableALTERA {
2940 enable: LiteralInteger::parse_one(stream)?,
2941 }),
2942 5921u32 => Ok(Self::BufferLocationALTERA {
2943 buffer_location_id: LiteralInteger::parse_one(stream)?,
2944 }),
2945 5944u32 => Ok(Self::IOPipeStorageALTERA {
2946 io_pipe_id: LiteralInteger::parse_one(stream)?,
2947 }),
2948 6080u32 => Ok(Self::FunctionFloatingPointModeINTEL {
2949 target_width: LiteralInteger::parse_one(stream)?,
2950 fp_operation_mode: FPOperationMode::parse_one(stream)?,
2951 }),
2952 6085u32 => Ok(Self::SingleElementVectorINTEL),
2953 6087u32 => Ok(Self::VectorComputeCallableFunctionINTEL),
2954 6140u32 => Ok(Self::MediaBlockIOINTEL),
2955 6151u32 => Ok(Self::StallFreeALTERA),
2956 6170u32 => Ok(Self::FPMaxErrorDecorationINTEL {
2957 max_error: LiteralFloat::parse_one(stream)?,
2958 }),
2959 6172u32 => Ok(Self::LatencyControlLabelALTERA {
2960 latency_label: LiteralInteger::parse_one(stream)?,
2961 }),
2962 6173u32 => Ok(Self::LatencyControlConstraintALTERA {
2963 relative_to: LiteralInteger::parse_one(stream)?,
2964 control_type: LiteralInteger::parse_one(stream)?,
2965 relative_cycle: LiteralInteger::parse_one(stream)?,
2966 }),
2967 6175u32 => Ok(Self::ConduitKernelArgumentALTERA),
2968 6176u32 => Ok(Self::RegisterMapKernelArgumentALTERA),
2969 6177u32 => Ok(Self::MMHostInterfaceAddressWidthALTERA {
2970 address_width: LiteralInteger::parse_one(stream)?,
2971 }),
2972 6178u32 => Ok(Self::MMHostInterfaceDataWidthALTERA {
2973 data_width: LiteralInteger::parse_one(stream)?,
2974 }),
2975 6179u32 => Ok(Self::MMHostInterfaceLatencyALTERA {
2976 latency: LiteralInteger::parse_one(stream)?,
2977 }),
2978 6180u32 => Ok(Self::MMHostInterfaceReadWriteModeALTERA {
2979 read_write_mode: AccessQualifier::parse_one(stream)?,
2980 }),
2981 6181u32 => Ok(Self::MMHostInterfaceMaxBurstALTERA {
2982 max_burst_count: LiteralInteger::parse_one(stream)?,
2983 }),
2984 6182u32 => Ok(Self::MMHostInterfaceWaitRequestALTERA {
2985 waitrequest: LiteralInteger::parse_one(stream)?,
2986 }),
2987 6183u32 => Ok(Self::StableKernelArgumentALTERA),
2988 6188u32 => Ok(Self::HostAccessINTEL {
2989 access: HostAccessQualifier::parse_one(stream)?,
2990 name: LiteralString::parse_one(stream)?,
2991 }),
2992 6190u32 => Ok(Self::InitModeALTERA {
2993 trigger: InitializationModeQualifier::parse_one(stream)?,
2994 }),
2995 6191u32 => Ok(Self::ImplementInRegisterMapALTERA {
2996 value: LiteralInteger::parse_one(stream)?,
2997 }),
2998 6247u32 => Ok(Self::ConditionalINTEL {
2999 condition: IdRef::parse_one(stream)?,
3000 }),
3001 6442u32 => Ok(Self::CacheControlLoadINTEL {
3002 cache_level: LiteralInteger::parse_one(stream)?,
3003 cache_control: LoadCacheControl::parse_one(stream)?,
3004 }),
3005 6443u32 => Ok(Self::CacheControlStoreINTEL {
3006 cache_level: LiteralInteger::parse_one(stream)?,
3007 cache_control: StoreCacheControl::parse_one(stream)?,
3008 }),
3009 x => Err(ParseError::UnknownVariant {
3010 kind: stringify!(Decoration),
3011 value: x,
3012 }),
3013 }
3014 }
3015}
3016impl<'a> Display for Decoration<'a> {
3017 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3018 match self {
3019 Self::RelaxedPrecision => write!(f, "{}", stringify!(RelaxedPrecision)),
3020 Self::SpecId {
3021 specialization_constant_id,
3022 } => {
3023 write!(f, "{}", stringify!(SpecId))?;
3024 write!(f, " {}", specialization_constant_id)?;
3025 Ok(())
3026 }
3027 Self::Block => write!(f, "{}", stringify!(Block)),
3028 Self::BufferBlock => write!(f, "{}", stringify!(BufferBlock)),
3029 Self::RowMajor => write!(f, "{}", stringify!(RowMajor)),
3030 Self::ColMajor => write!(f, "{}", stringify!(ColMajor)),
3031 Self::ArrayStride { array_stride } => {
3032 write!(f, "{}", stringify!(ArrayStride))?;
3033 write!(f, " {}", array_stride)?;
3034 Ok(())
3035 }
3036 Self::MatrixStride { matrix_stride } => {
3037 write!(f, "{}", stringify!(MatrixStride))?;
3038 write!(f, " {}", matrix_stride)?;
3039 Ok(())
3040 }
3041 Self::GLSLShared => write!(f, "{}", stringify!(GLSLShared)),
3042 Self::GLSLPacked => write!(f, "{}", stringify!(GLSLPacked)),
3043 Self::CPacked => write!(f, "{}", stringify!(CPacked)),
3044 Self::BuiltIn { built_in } => {
3045 write!(f, "{}", stringify!(BuiltIn))?;
3046 write!(f, " {}", built_in)?;
3047 Ok(())
3048 }
3049 Self::NoPerspective => write!(f, "{}", stringify!(NoPerspective)),
3050 Self::Flat => write!(f, "{}", stringify!(Flat)),
3051 Self::Patch => write!(f, "{}", stringify!(Patch)),
3052 Self::Centroid => write!(f, "{}", stringify!(Centroid)),
3053 Self::Sample => write!(f, "{}", stringify!(Sample)),
3054 Self::Invariant => write!(f, "{}", stringify!(Invariant)),
3055 Self::Restrict => write!(f, "{}", stringify!(Restrict)),
3056 Self::Aliased => write!(f, "{}", stringify!(Aliased)),
3057 Self::Volatile => write!(f, "{}", stringify!(Volatile)),
3058 Self::Constant => write!(f, "{}", stringify!(Constant)),
3059 Self::Coherent => write!(f, "{}", stringify!(Coherent)),
3060 Self::NonWritable => write!(f, "{}", stringify!(NonWritable)),
3061 Self::NonReadable => write!(f, "{}", stringify!(NonReadable)),
3062 Self::Uniform => write!(f, "{}", stringify!(Uniform)),
3063 Self::UniformId { execution } => {
3064 write!(f, "{}", stringify!(UniformId))?;
3065 write!(f, " {}", execution)?;
3066 Ok(())
3067 }
3068 Self::SaturatedConversion => write!(f, "{}", stringify!(SaturatedConversion)),
3069 Self::Stream { stream_number } => {
3070 write!(f, "{}", stringify!(Stream))?;
3071 write!(f, " {}", stream_number)?;
3072 Ok(())
3073 }
3074 Self::Location { location } => {
3075 write!(f, "{}", stringify!(Location))?;
3076 write!(f, " {}", location)?;
3077 Ok(())
3078 }
3079 Self::Component { component } => {
3080 write!(f, "{}", stringify!(Component))?;
3081 write!(f, " {}", component)?;
3082 Ok(())
3083 }
3084 Self::Index { index } => {
3085 write!(f, "{}", stringify!(Index))?;
3086 write!(f, " {}", index)?;
3087 Ok(())
3088 }
3089 Self::Binding { binding_point } => {
3090 write!(f, "{}", stringify!(Binding))?;
3091 write!(f, " {}", binding_point)?;
3092 Ok(())
3093 }
3094 Self::DescriptorSet { descriptor_set } => {
3095 write!(f, "{}", stringify!(DescriptorSet))?;
3096 write!(f, " {}", descriptor_set)?;
3097 Ok(())
3098 }
3099 Self::Offset { byte_offset } => {
3100 write!(f, "{}", stringify!(Offset))?;
3101 write!(f, " {}", byte_offset)?;
3102 Ok(())
3103 }
3104 Self::XfbBuffer { xfb_buffer_number } => {
3105 write!(f, "{}", stringify!(XfbBuffer))?;
3106 write!(f, " {}", xfb_buffer_number)?;
3107 Ok(())
3108 }
3109 Self::XfbStride { xfb_stride } => {
3110 write!(f, "{}", stringify!(XfbStride))?;
3111 write!(f, " {}", xfb_stride)?;
3112 Ok(())
3113 }
3114 Self::FuncParamAttr {
3115 function_parameter_attribute,
3116 } => {
3117 write!(f, "{}", stringify!(FuncParamAttr))?;
3118 write!(f, " {}", function_parameter_attribute)?;
3119 Ok(())
3120 }
3121 Self::FPRoundingMode {
3122 floating_point_rounding_mode,
3123 } => {
3124 write!(f, "{}", stringify!(FPRoundingMode))?;
3125 write!(f, " {}", floating_point_rounding_mode)?;
3126 Ok(())
3127 }
3128 Self::FPFastMathMode { fast_math_mode } => {
3129 write!(f, "{}", stringify!(FPFastMathMode))?;
3130 write!(f, " {}", fast_math_mode)?;
3131 Ok(())
3132 }
3133 Self::LinkageAttributes { name, linkage_type } => {
3134 write!(f, "{}", stringify!(LinkageAttributes))?;
3135 write!(f, " {}", name)?;
3136 write!(f, " {}", linkage_type)?;
3137 Ok(())
3138 }
3139 Self::NoContraction => write!(f, "{}", stringify!(NoContraction)),
3140 Self::InputAttachmentIndex { attachment_index } => {
3141 write!(f, "{}", stringify!(InputAttachmentIndex))?;
3142 write!(f, " {}", attachment_index)?;
3143 Ok(())
3144 }
3145 Self::Alignment { alignment } => {
3146 write!(f, "{}", stringify!(Alignment))?;
3147 write!(f, " {}", alignment)?;
3148 Ok(())
3149 }
3150 Self::MaxByteOffset { max_byte_offset } => {
3151 write!(f, "{}", stringify!(MaxByteOffset))?;
3152 write!(f, " {}", max_byte_offset)?;
3153 Ok(())
3154 }
3155 Self::AlignmentId { alignment } => {
3156 write!(f, "{}", stringify!(AlignmentId))?;
3157 write!(f, " {}", alignment)?;
3158 Ok(())
3159 }
3160 Self::MaxByteOffsetId { max_byte_offset } => {
3161 write!(f, "{}", stringify!(MaxByteOffsetId))?;
3162 write!(f, " {}", max_byte_offset)?;
3163 Ok(())
3164 }
3165 Self::SaturatedToLargestFloat8NormalConversionEXT => write!(
3166 f,
3167 "{}",
3168 stringify!(SaturatedToLargestFloat8NormalConversionEXT)
3169 ),
3170 Self::NoSignedWrap => write!(f, "{}", stringify!(NoSignedWrap)),
3171 Self::NoUnsignedWrap => write!(f, "{}", stringify!(NoUnsignedWrap)),
3172 Self::WeightTextureQCOM => write!(f, "{}", stringify!(WeightTextureQCOM)),
3173 Self::BlockMatchTextureQCOM => write!(f, "{}", stringify!(BlockMatchTextureQCOM)),
3174 Self::BlockMatchSamplerQCOM => write!(f, "{}", stringify!(BlockMatchSamplerQCOM)),
3175 Self::ExplicitInterpAMD => write!(f, "{}", stringify!(ExplicitInterpAMD)),
3176 Self::NodeSharesPayloadLimitsWithAMDX { payload_type } => {
3177 write!(f, "{}", stringify!(NodeSharesPayloadLimitsWithAMDX))?;
3178 write!(f, " {}", payload_type)?;
3179 Ok(())
3180 }
3181 Self::NodeMaxPayloadsAMDX {
3182 max_number_of_payloads,
3183 } => {
3184 write!(f, "{}", stringify!(NodeMaxPayloadsAMDX))?;
3185 write!(f, " {}", max_number_of_payloads)?;
3186 Ok(())
3187 }
3188 Self::TrackFinishWritingAMDX => write!(f, "{}", stringify!(TrackFinishWritingAMDX)),
3189 Self::PayloadNodeNameAMDX { node_name } => {
3190 write!(f, "{}", stringify!(PayloadNodeNameAMDX))?;
3191 write!(f, " {}", node_name)?;
3192 Ok(())
3193 }
3194 Self::PayloadNodeBaseIndexAMDX { base_index } => {
3195 write!(f, "{}", stringify!(PayloadNodeBaseIndexAMDX))?;
3196 write!(f, " {}", base_index)?;
3197 Ok(())
3198 }
3199 Self::PayloadNodeSparseArrayAMDX => {
3200 write!(f, "{}", stringify!(PayloadNodeSparseArrayAMDX))
3201 }
3202 Self::PayloadNodeArraySizeAMDX { array_size } => {
3203 write!(f, "{}", stringify!(PayloadNodeArraySizeAMDX))?;
3204 write!(f, " {}", array_size)?;
3205 Ok(())
3206 }
3207 Self::PayloadDispatchIndirectAMDX => {
3208 write!(f, "{}", stringify!(PayloadDispatchIndirectAMDX))
3209 }
3210 Self::ArrayStrideIdEXT { array_stride } => {
3211 write!(f, "{}", stringify!(ArrayStrideIdEXT))?;
3212 write!(f, " {}", array_stride)?;
3213 Ok(())
3214 }
3215 Self::OffsetIdEXT { byte_offset } => {
3216 write!(f, "{}", stringify!(OffsetIdEXT))?;
3217 write!(f, " {}", byte_offset)?;
3218 Ok(())
3219 }
3220 Self::UTFEncodedKHR => write!(f, "{}", stringify!(UTFEncodedKHR)),
3221 Self::OverrideCoverageNV => write!(f, "{}", stringify!(OverrideCoverageNV)),
3222 Self::PassthroughNV => write!(f, "{}", stringify!(PassthroughNV)),
3223 Self::ViewportRelativeNV => write!(f, "{}", stringify!(ViewportRelativeNV)),
3224 Self::SecondaryViewportRelativeNV { offset } => {
3225 write!(f, "{}", stringify!(SecondaryViewportRelativeNV))?;
3226 write!(f, " {}", offset)?;
3227 Ok(())
3228 }
3229 Self::PerPrimitiveEXT => write!(f, "{}", stringify!(PerPrimitiveEXT)),
3230 Self::PerViewNV => write!(f, "{}", stringify!(PerViewNV)),
3231 Self::PerTaskNV => write!(f, "{}", stringify!(PerTaskNV)),
3232 Self::PerVertexKHR => write!(f, "{}", stringify!(PerVertexKHR)),
3233 Self::NonUniform => write!(f, "{}", stringify!(NonUniform)),
3234 Self::RestrictPointer => write!(f, "{}", stringify!(RestrictPointer)),
3235 Self::AliasedPointer => write!(f, "{}", stringify!(AliasedPointer)),
3236 Self::MemberOffsetNV { member_offset } => {
3237 write!(f, "{}", stringify!(MemberOffsetNV))?;
3238 write!(f, " {}", member_offset)?;
3239 Ok(())
3240 }
3241 Self::HitObjectShaderRecordBufferNV => {
3242 write!(f, "{}", stringify!(HitObjectShaderRecordBufferNV))
3243 }
3244 Self::HitObjectShaderRecordBufferEXT => {
3245 write!(f, "{}", stringify!(HitObjectShaderRecordBufferEXT))
3246 }
3247 Self::BankNV { bank } => {
3248 write!(f, "{}", stringify!(BankNV))?;
3249 write!(f, " {}", bank)?;
3250 Ok(())
3251 }
3252 Self::BindlessSamplerNV => write!(f, "{}", stringify!(BindlessSamplerNV)),
3253 Self::BindlessImageNV => write!(f, "{}", stringify!(BindlessImageNV)),
3254 Self::BoundSamplerNV => write!(f, "{}", stringify!(BoundSamplerNV)),
3255 Self::BoundImageNV => write!(f, "{}", stringify!(BoundImageNV)),
3256 Self::SIMTCallINTEL { n } => {
3257 write!(f, "{}", stringify!(SIMTCallINTEL))?;
3258 write!(f, " {}", n)?;
3259 Ok(())
3260 }
3261 Self::ReferencedIndirectlyINTEL => {
3262 write!(f, "{}", stringify!(ReferencedIndirectlyINTEL))
3263 }
3264 Self::ClobberINTEL { register } => {
3265 write!(f, "{}", stringify!(ClobberINTEL))?;
3266 write!(f, " {}", register)?;
3267 Ok(())
3268 }
3269 Self::SideEffectsINTEL => write!(f, "{}", stringify!(SideEffectsINTEL)),
3270 Self::VectorComputeVariableINTEL => {
3271 write!(f, "{}", stringify!(VectorComputeVariableINTEL))
3272 }
3273 Self::FuncParamIOKindINTEL { kind } => {
3274 write!(f, "{}", stringify!(FuncParamIOKindINTEL))?;
3275 write!(f, " {}", kind)?;
3276 Ok(())
3277 }
3278 Self::VectorComputeFunctionINTEL => {
3279 write!(f, "{}", stringify!(VectorComputeFunctionINTEL))
3280 }
3281 Self::StackCallINTEL => write!(f, "{}", stringify!(StackCallINTEL)),
3282 Self::GlobalVariableOffsetINTEL { offset } => {
3283 write!(f, "{}", stringify!(GlobalVariableOffsetINTEL))?;
3284 write!(f, " {}", offset)?;
3285 Ok(())
3286 }
3287 Self::CounterBuffer { counter_buffer } => {
3288 write!(f, "{}", stringify!(CounterBuffer))?;
3289 write!(f, " {}", counter_buffer)?;
3290 Ok(())
3291 }
3292 Self::UserSemantic { semantic } => {
3293 write!(f, "{}", stringify!(UserSemantic))?;
3294 write!(f, " {}", semantic)?;
3295 Ok(())
3296 }
3297 Self::UserTypeGOOGLE { user_type } => {
3298 write!(f, "{}", stringify!(UserTypeGOOGLE))?;
3299 write!(f, " {}", user_type)?;
3300 Ok(())
3301 }
3302 Self::FunctionRoundingModeINTEL {
3303 target_width,
3304 fp_rounding_mode,
3305 } => {
3306 write!(f, "{}", stringify!(FunctionRoundingModeINTEL))?;
3307 write!(f, " {}", target_width)?;
3308 write!(f, " {}", fp_rounding_mode)?;
3309 Ok(())
3310 }
3311 Self::FunctionDenormModeINTEL {
3312 target_width,
3313 fp_denorm_mode,
3314 } => {
3315 write!(f, "{}", stringify!(FunctionDenormModeINTEL))?;
3316 write!(f, " {}", target_width)?;
3317 write!(f, " {}", fp_denorm_mode)?;
3318 Ok(())
3319 }
3320 Self::RegisterALTERA => write!(f, "{}", stringify!(RegisterALTERA)),
3321 Self::MemoryALTERA { memory_type } => {
3322 write!(f, "{}", stringify!(MemoryALTERA))?;
3323 write!(f, " {}", memory_type)?;
3324 Ok(())
3325 }
3326 Self::NumbanksALTERA { banks } => {
3327 write!(f, "{}", stringify!(NumbanksALTERA))?;
3328 write!(f, " {}", banks)?;
3329 Ok(())
3330 }
3331 Self::BankwidthALTERA { bank_width } => {
3332 write!(f, "{}", stringify!(BankwidthALTERA))?;
3333 write!(f, " {}", bank_width)?;
3334 Ok(())
3335 }
3336 Self::MaxPrivateCopiesALTERA { maximum_copies } => {
3337 write!(f, "{}", stringify!(MaxPrivateCopiesALTERA))?;
3338 write!(f, " {}", maximum_copies)?;
3339 Ok(())
3340 }
3341 Self::SinglepumpALTERA => write!(f, "{}", stringify!(SinglepumpALTERA)),
3342 Self::DoublepumpALTERA => write!(f, "{}", stringify!(DoublepumpALTERA)),
3343 Self::MaxReplicatesALTERA { maximum_replicates } => {
3344 write!(f, "{}", stringify!(MaxReplicatesALTERA))?;
3345 write!(f, " {}", maximum_replicates)?;
3346 Ok(())
3347 }
3348 Self::SimpleDualPortALTERA => write!(f, "{}", stringify!(SimpleDualPortALTERA)),
3349 Self::MergeALTERA {
3350 merge_key,
3351 merge_type,
3352 } => {
3353 write!(f, "{}", stringify!(MergeALTERA))?;
3354 write!(f, " {}", merge_key)?;
3355 write!(f, " {}", merge_type)?;
3356 Ok(())
3357 }
3358 Self::BankBitsALTERA { bank_bits } => {
3359 write!(f, "{}", stringify!(BankBitsALTERA))?;
3360 write!(f, " {}", bank_bits)?;
3361 Ok(())
3362 }
3363 Self::ForcePow2DepthALTERA { force_key } => {
3364 write!(f, "{}", stringify!(ForcePow2DepthALTERA))?;
3365 write!(f, " {}", force_key)?;
3366 Ok(())
3367 }
3368 Self::StridesizeALTERA { stride_size } => {
3369 write!(f, "{}", stringify!(StridesizeALTERA))?;
3370 write!(f, " {}", stride_size)?;
3371 Ok(())
3372 }
3373 Self::WordsizeALTERA { word_size } => {
3374 write!(f, "{}", stringify!(WordsizeALTERA))?;
3375 write!(f, " {}", word_size)?;
3376 Ok(())
3377 }
3378 Self::TrueDualPortALTERA => write!(f, "{}", stringify!(TrueDualPortALTERA)),
3379 Self::BurstCoalesceALTERA => write!(f, "{}", stringify!(BurstCoalesceALTERA)),
3380 Self::CacheSizeALTERA {
3381 cache_size_in_bytes,
3382 } => {
3383 write!(f, "{}", stringify!(CacheSizeALTERA))?;
3384 write!(f, " {}", cache_size_in_bytes)?;
3385 Ok(())
3386 }
3387 Self::DontStaticallyCoalesceALTERA => {
3388 write!(f, "{}", stringify!(DontStaticallyCoalesceALTERA))
3389 }
3390 Self::PrefetchALTERA {
3391 prefetcher_size_in_bytes,
3392 } => {
3393 write!(f, "{}", stringify!(PrefetchALTERA))?;
3394 write!(f, " {}", prefetcher_size_in_bytes)?;
3395 Ok(())
3396 }
3397 Self::StallEnableALTERA => write!(f, "{}", stringify!(StallEnableALTERA)),
3398 Self::FuseLoopsInFunctionALTERA => {
3399 write!(f, "{}", stringify!(FuseLoopsInFunctionALTERA))
3400 }
3401 Self::MathOpDSPModeALTERA { mode, propagate } => {
3402 write!(f, "{}", stringify!(MathOpDSPModeALTERA))?;
3403 write!(f, " {}", mode)?;
3404 write!(f, " {}", propagate)?;
3405 Ok(())
3406 }
3407 Self::AliasScopeINTEL {
3408 aliasing_scopes_list,
3409 } => {
3410 write!(f, "{}", stringify!(AliasScopeINTEL))?;
3411 write!(f, " {}", aliasing_scopes_list)?;
3412 Ok(())
3413 }
3414 Self::NoAliasINTEL {
3415 aliasing_scopes_list,
3416 } => {
3417 write!(f, "{}", stringify!(NoAliasINTEL))?;
3418 write!(f, " {}", aliasing_scopes_list)?;
3419 Ok(())
3420 }
3421 Self::InitiationIntervalALTERA { cycles } => {
3422 write!(f, "{}", stringify!(InitiationIntervalALTERA))?;
3423 write!(f, " {}", cycles)?;
3424 Ok(())
3425 }
3426 Self::MaxConcurrencyALTERA { invocations } => {
3427 write!(f, "{}", stringify!(MaxConcurrencyALTERA))?;
3428 write!(f, " {}", invocations)?;
3429 Ok(())
3430 }
3431 Self::PipelineEnableALTERA { enable } => {
3432 write!(f, "{}", stringify!(PipelineEnableALTERA))?;
3433 write!(f, " {}", enable)?;
3434 Ok(())
3435 }
3436 Self::BufferLocationALTERA { buffer_location_id } => {
3437 write!(f, "{}", stringify!(BufferLocationALTERA))?;
3438 write!(f, " {}", buffer_location_id)?;
3439 Ok(())
3440 }
3441 Self::IOPipeStorageALTERA { io_pipe_id } => {
3442 write!(f, "{}", stringify!(IOPipeStorageALTERA))?;
3443 write!(f, " {}", io_pipe_id)?;
3444 Ok(())
3445 }
3446 Self::FunctionFloatingPointModeINTEL {
3447 target_width,
3448 fp_operation_mode,
3449 } => {
3450 write!(f, "{}", stringify!(FunctionFloatingPointModeINTEL))?;
3451 write!(f, " {}", target_width)?;
3452 write!(f, " {}", fp_operation_mode)?;
3453 Ok(())
3454 }
3455 Self::SingleElementVectorINTEL => write!(f, "{}", stringify!(SingleElementVectorINTEL)),
3456 Self::VectorComputeCallableFunctionINTEL => {
3457 write!(f, "{}", stringify!(VectorComputeCallableFunctionINTEL))
3458 }
3459 Self::MediaBlockIOINTEL => write!(f, "{}", stringify!(MediaBlockIOINTEL)),
3460 Self::StallFreeALTERA => write!(f, "{}", stringify!(StallFreeALTERA)),
3461 Self::FPMaxErrorDecorationINTEL { max_error } => {
3462 write!(f, "{}", stringify!(FPMaxErrorDecorationINTEL))?;
3463 write!(f, " {}", max_error)?;
3464 Ok(())
3465 }
3466 Self::LatencyControlLabelALTERA { latency_label } => {
3467 write!(f, "{}", stringify!(LatencyControlLabelALTERA))?;
3468 write!(f, " {}", latency_label)?;
3469 Ok(())
3470 }
3471 Self::LatencyControlConstraintALTERA {
3472 relative_to,
3473 control_type,
3474 relative_cycle,
3475 } => {
3476 write!(f, "{}", stringify!(LatencyControlConstraintALTERA))?;
3477 write!(f, " {}", relative_to)?;
3478 write!(f, " {}", control_type)?;
3479 write!(f, " {}", relative_cycle)?;
3480 Ok(())
3481 }
3482 Self::ConduitKernelArgumentALTERA => {
3483 write!(f, "{}", stringify!(ConduitKernelArgumentALTERA))
3484 }
3485 Self::RegisterMapKernelArgumentALTERA => {
3486 write!(f, "{}", stringify!(RegisterMapKernelArgumentALTERA))
3487 }
3488 Self::MMHostInterfaceAddressWidthALTERA { address_width } => {
3489 write!(f, "{}", stringify!(MMHostInterfaceAddressWidthALTERA))?;
3490 write!(f, " {}", address_width)?;
3491 Ok(())
3492 }
3493 Self::MMHostInterfaceDataWidthALTERA { data_width } => {
3494 write!(f, "{}", stringify!(MMHostInterfaceDataWidthALTERA))?;
3495 write!(f, " {}", data_width)?;
3496 Ok(())
3497 }
3498 Self::MMHostInterfaceLatencyALTERA { latency } => {
3499 write!(f, "{}", stringify!(MMHostInterfaceLatencyALTERA))?;
3500 write!(f, " {}", latency)?;
3501 Ok(())
3502 }
3503 Self::MMHostInterfaceReadWriteModeALTERA { read_write_mode } => {
3504 write!(f, "{}", stringify!(MMHostInterfaceReadWriteModeALTERA))?;
3505 write!(f, " {}", read_write_mode)?;
3506 Ok(())
3507 }
3508 Self::MMHostInterfaceMaxBurstALTERA { max_burst_count } => {
3509 write!(f, "{}", stringify!(MMHostInterfaceMaxBurstALTERA))?;
3510 write!(f, " {}", max_burst_count)?;
3511 Ok(())
3512 }
3513 Self::MMHostInterfaceWaitRequestALTERA { waitrequest } => {
3514 write!(f, "{}", stringify!(MMHostInterfaceWaitRequestALTERA))?;
3515 write!(f, " {}", waitrequest)?;
3516 Ok(())
3517 }
3518 Self::StableKernelArgumentALTERA => {
3519 write!(f, "{}", stringify!(StableKernelArgumentALTERA))
3520 }
3521 Self::HostAccessINTEL { access, name } => {
3522 write!(f, "{}", stringify!(HostAccessINTEL))?;
3523 write!(f, " {}", access)?;
3524 write!(f, " {}", name)?;
3525 Ok(())
3526 }
3527 Self::InitModeALTERA { trigger } => {
3528 write!(f, "{}", stringify!(InitModeALTERA))?;
3529 write!(f, " {}", trigger)?;
3530 Ok(())
3531 }
3532 Self::ImplementInRegisterMapALTERA { value } => {
3533 write!(f, "{}", stringify!(ImplementInRegisterMapALTERA))?;
3534 write!(f, " {}", value)?;
3535 Ok(())
3536 }
3537 Self::ConditionalINTEL { condition } => {
3538 write!(f, "{}", stringify!(ConditionalINTEL))?;
3539 write!(f, " {}", condition)?;
3540 Ok(())
3541 }
3542 Self::CacheControlLoadINTEL {
3543 cache_level,
3544 cache_control,
3545 } => {
3546 write!(f, "{}", stringify!(CacheControlLoadINTEL))?;
3547 write!(f, " {}", cache_level)?;
3548 write!(f, " {}", cache_control)?;
3549 Ok(())
3550 }
3551 Self::CacheControlStoreINTEL {
3552 cache_level,
3553 cache_control,
3554 } => {
3555 write!(f, "{}", stringify!(CacheControlStoreINTEL))?;
3556 write!(f, " {}", cache_level)?;
3557 write!(f, " {}", cache_control)?;
3558 Ok(())
3559 }
3560 }
3561 }
3562}
3563#[derive(Clone, Copy, PartialEq, Eq, Debug)]
3564pub struct BuiltIn(pub(crate) u32);
3565impl BuiltIn {
3566 pub const POSITION: Self = Self(0u32);
3567 pub const POINT_SIZE: Self = Self(1u32);
3568 pub const CLIP_DISTANCE: Self = Self(3u32);
3569 pub const CULL_DISTANCE: Self = Self(4u32);
3570 pub const VERTEX_ID: Self = Self(5u32);
3571 pub const INSTANCE_ID: Self = Self(6u32);
3572 pub const PRIMITIVE_ID: Self = Self(7u32);
3573 pub const INVOCATION_ID: Self = Self(8u32);
3574 pub const LAYER: Self = Self(9u32);
3575 pub const VIEWPORT_INDEX: Self = Self(10u32);
3576 pub const TESS_LEVEL_OUTER: Self = Self(11u32);
3577 pub const TESS_LEVEL_INNER: Self = Self(12u32);
3578 pub const TESS_COORD: Self = Self(13u32);
3579 pub const PATCH_VERTICES: Self = Self(14u32);
3580 pub const FRAG_COORD: Self = Self(15u32);
3581 pub const POINT_COORD: Self = Self(16u32);
3582 pub const FRONT_FACING: Self = Self(17u32);
3583 pub const SAMPLE_ID: Self = Self(18u32);
3584 pub const SAMPLE_POSITION: Self = Self(19u32);
3585 pub const SAMPLE_MASK: Self = Self(20u32);
3586 pub const FRAG_DEPTH: Self = Self(22u32);
3587 pub const HELPER_INVOCATION: Self = Self(23u32);
3588 pub const NUM_WORKGROUPS: Self = Self(24u32);
3589 pub const WORKGROUP_SIZE: Self = Self(25u32);
3590 pub const WORKGROUP_ID: Self = Self(26u32);
3591 pub const LOCAL_INVOCATION_ID: Self = Self(27u32);
3592 pub const GLOBAL_INVOCATION_ID: Self = Self(28u32);
3593 pub const LOCAL_INVOCATION_INDEX: Self = Self(29u32);
3594 pub const WORK_DIM: Self = Self(30u32);
3595 pub const GLOBAL_SIZE: Self = Self(31u32);
3596 pub const ENQUEUED_WORKGROUP_SIZE: Self = Self(32u32);
3597 pub const GLOBAL_OFFSET: Self = Self(33u32);
3598 pub const GLOBAL_LINEAR_ID: Self = Self(34u32);
3599 pub const SUBGROUP_SIZE: Self = Self(36u32);
3600 pub const SUBGROUP_MAX_SIZE: Self = Self(37u32);
3601 pub const NUM_SUBGROUPS: Self = Self(38u32);
3602 pub const NUM_ENQUEUED_SUBGROUPS: Self = Self(39u32);
3603 pub const SUBGROUP_ID: Self = Self(40u32);
3604 pub const SUBGROUP_LOCAL_INVOCATION_ID: Self = Self(41u32);
3605 pub const VERTEX_INDEX: Self = Self(42u32);
3606 pub const INSTANCE_INDEX: Self = Self(43u32);
3607 pub const CORE_IDARM: Self = Self(4160u32);
3608 pub const CORE_COUNT_ARM: Self = Self(4161u32);
3609 pub const CORE_MAX_IDARM: Self = Self(4162u32);
3610 pub const WARP_IDARM: Self = Self(4163u32);
3611 pub const WARP_MAX_IDARM: Self = Self(4164u32);
3612 pub const SUBGROUP_EQ_MASK: Self = Self(4416u32);
3613 pub const SUBGROUP_GE_MASK: Self = Self(4417u32);
3614 pub const SUBGROUP_GT_MASK: Self = Self(4418u32);
3615 pub const SUBGROUP_LE_MASK: Self = Self(4419u32);
3616 pub const SUBGROUP_LT_MASK: Self = Self(4420u32);
3617 pub const BASE_VERTEX: Self = Self(4424u32);
3618 pub const BASE_INSTANCE: Self = Self(4425u32);
3619 pub const DRAW_INDEX: Self = Self(4426u32);
3620 pub const PRIMITIVE_SHADING_RATE_KHR: Self = Self(4432u32);
3621 pub const DEVICE_INDEX: Self = Self(4438u32);
3622 pub const VIEW_INDEX: Self = Self(4440u32);
3623 pub const SHADING_RATE_KHR: Self = Self(4444u32);
3624 pub const TILE_OFFSET_QCOM: Self = Self(4492u32);
3625 pub const TILE_DIMENSION_QCOM: Self = Self(4493u32);
3626 pub const TILE_APRON_SIZE_QCOM: Self = Self(4494u32);
3627 pub const BARY_COORD_NO_PERSP_AMD: Self = Self(4992u32);
3628 pub const BARY_COORD_NO_PERSP_CENTROID_AMD: Self = Self(4993u32);
3629 pub const BARY_COORD_NO_PERSP_SAMPLE_AMD: Self = Self(4994u32);
3630 pub const BARY_COORD_SMOOTH_AMD: Self = Self(4995u32);
3631 pub const BARY_COORD_SMOOTH_CENTROID_AMD: Self = Self(4996u32);
3632 pub const BARY_COORD_SMOOTH_SAMPLE_AMD: Self = Self(4997u32);
3633 pub const BARY_COORD_PULL_MODEL_AMD: Self = Self(4998u32);
3634 pub const FRAG_STENCIL_REF_EXT: Self = Self(5014u32);
3635 pub const REMAINING_RECURSION_LEVELS_AMDX: Self = Self(5021u32);
3636 pub const SHADER_INDEX_AMDX: Self = Self(5073u32);
3637 pub const SAMPLER_HEAP_EXT: Self = Self(5122u32);
3638 pub const RESOURCE_HEAP_EXT: Self = Self(5123u32);
3639 pub const VIEWPORT_MASK_NV: Self = Self(5253u32);
3640 pub const SECONDARY_POSITION_NV: Self = Self(5257u32);
3641 pub const SECONDARY_VIEWPORT_MASK_NV: Self = Self(5258u32);
3642 pub const POSITION_PER_VIEW_NV: Self = Self(5261u32);
3643 pub const VIEWPORT_MASK_PER_VIEW_NV: Self = Self(5262u32);
3644 pub const FULLY_COVERED_EXT: Self = Self(5264u32);
3645 pub const TASK_COUNT_NV: Self = Self(5274u32);
3646 pub const PRIMITIVE_COUNT_NV: Self = Self(5275u32);
3647 pub const PRIMITIVE_INDICES_NV: Self = Self(5276u32);
3648 pub const CLIP_DISTANCE_PER_VIEW_NV: Self = Self(5277u32);
3649 pub const CULL_DISTANCE_PER_VIEW_NV: Self = Self(5278u32);
3650 pub const LAYER_PER_VIEW_NV: Self = Self(5279u32);
3651 pub const MESH_VIEW_COUNT_NV: Self = Self(5280u32);
3652 pub const MESH_VIEW_INDICES_NV: Self = Self(5281u32);
3653 pub const BARY_COORD_KHR: Self = Self(5286u32);
3654 pub const BARY_COORD_NO_PERSP_KHR: Self = Self(5287u32);
3655 pub const FRAG_SIZE_EXT: Self = Self(5292u32);
3656 pub const FRAG_INVOCATION_COUNT_EXT: Self = Self(5293u32);
3657 pub const PRIMITIVE_POINT_INDICES_EXT: Self = Self(5294u32);
3658 pub const PRIMITIVE_LINE_INDICES_EXT: Self = Self(5295u32);
3659 pub const PRIMITIVE_TRIANGLE_INDICES_EXT: Self = Self(5296u32);
3660 pub const CULL_PRIMITIVE_EXT: Self = Self(5299u32);
3661 pub const LAUNCH_ID_KHR: Self = Self(5319u32);
3662 pub const LAUNCH_SIZE_KHR: Self = Self(5320u32);
3663 pub const WORLD_RAY_ORIGIN_KHR: Self = Self(5321u32);
3664 pub const WORLD_RAY_DIRECTION_KHR: Self = Self(5322u32);
3665 pub const OBJECT_RAY_ORIGIN_KHR: Self = Self(5323u32);
3666 pub const OBJECT_RAY_DIRECTION_KHR: Self = Self(5324u32);
3667 pub const RAY_TMIN_KHR: Self = Self(5325u32);
3668 pub const RAY_TMAX_KHR: Self = Self(5326u32);
3669 pub const INSTANCE_CUSTOM_INDEX_KHR: Self = Self(5327u32);
3670 pub const OBJECT_TO_WORLD_KHR: Self = Self(5330u32);
3671 pub const WORLD_TO_OBJECT_KHR: Self = Self(5331u32);
3672 pub const HIT_TNV: Self = Self(5332u32);
3673 pub const HIT_KIND_KHR: Self = Self(5333u32);
3674 pub const CURRENT_RAY_TIME_NV: Self = Self(5334u32);
3675 pub const HIT_TRIANGLE_VERTEX_POSITIONS_KHR: Self = Self(5335u32);
3676 pub const HIT_MICRO_TRIANGLE_VERTEX_POSITIONS_NV: Self = Self(5337u32);
3677 pub const HIT_MICRO_TRIANGLE_VERTEX_BARYCENTRICS_NV: Self = Self(5344u32);
3678 pub const INCOMING_RAY_FLAGS_KHR: Self = Self(5351u32);
3679 pub const RAY_GEOMETRY_INDEX_KHR: Self = Self(5352u32);
3680 pub const HIT_IS_SPHERE_NV: Self = Self(5359u32);
3681 pub const HIT_IS_LSSNV: Self = Self(5360u32);
3682 pub const HIT_SPHERE_POSITION_NV: Self = Self(5361u32);
3683 pub const WARPS_PER_SMNV: Self = Self(5374u32);
3684 pub const SMCOUNT_NV: Self = Self(5375u32);
3685 pub const WARP_IDNV: Self = Self(5376u32);
3686 pub const SMIDNV: Self = Self(5377u32);
3687 pub const HIT_LSSPOSITIONS_NV: Self = Self(5396u32);
3688 pub const HIT_KIND_FRONT_FACING_MICRO_TRIANGLE_NV: Self = Self(5405u32);
3689 pub const HIT_KIND_BACK_FACING_MICRO_TRIANGLE_NV: Self = Self(5406u32);
3690 pub const HIT_SPHERE_RADIUS_NV: Self = Self(5420u32);
3691 pub const HIT_LSSRADII_NV: Self = Self(5421u32);
3692 pub const CLUSTER_IDNV: Self = Self(5436u32);
3693 pub const CULL_MASK_KHR: Self = Self(6021u32);
3694}
3695impl Word for BuiltIn {
3696 #[inline]
3697 fn from_word(word: u32) -> Self {
3698 Self(word)
3699 }
3700}
3701impl Display for BuiltIn {
3702 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3703 match *self {
3704 Self::POSITION => write!(f, "Position"),
3705 Self::POINT_SIZE => write!(f, "PointSize"),
3706 Self::CLIP_DISTANCE => write!(f, "ClipDistance"),
3707 Self::CULL_DISTANCE => write!(f, "CullDistance"),
3708 Self::VERTEX_ID => write!(f, "VertexId"),
3709 Self::INSTANCE_ID => write!(f, "InstanceId"),
3710 Self::PRIMITIVE_ID => write!(f, "PrimitiveId"),
3711 Self::INVOCATION_ID => write!(f, "InvocationId"),
3712 Self::LAYER => write!(f, "Layer"),
3713 Self::VIEWPORT_INDEX => write!(f, "ViewportIndex"),
3714 Self::TESS_LEVEL_OUTER => write!(f, "TessLevelOuter"),
3715 Self::TESS_LEVEL_INNER => write!(f, "TessLevelInner"),
3716 Self::TESS_COORD => write!(f, "TessCoord"),
3717 Self::PATCH_VERTICES => write!(f, "PatchVertices"),
3718 Self::FRAG_COORD => write!(f, "FragCoord"),
3719 Self::POINT_COORD => write!(f, "PointCoord"),
3720 Self::FRONT_FACING => write!(f, "FrontFacing"),
3721 Self::SAMPLE_ID => write!(f, "SampleId"),
3722 Self::SAMPLE_POSITION => write!(f, "SamplePosition"),
3723 Self::SAMPLE_MASK => write!(f, "SampleMask"),
3724 Self::FRAG_DEPTH => write!(f, "FragDepth"),
3725 Self::HELPER_INVOCATION => write!(f, "HelperInvocation"),
3726 Self::NUM_WORKGROUPS => write!(f, "NumWorkgroups"),
3727 Self::WORKGROUP_SIZE => write!(f, "WorkgroupSize"),
3728 Self::WORKGROUP_ID => write!(f, "WorkgroupId"),
3729 Self::LOCAL_INVOCATION_ID => write!(f, "LocalInvocationId"),
3730 Self::GLOBAL_INVOCATION_ID => write!(f, "GlobalInvocationId"),
3731 Self::LOCAL_INVOCATION_INDEX => write!(f, "LocalInvocationIndex"),
3732 Self::WORK_DIM => write!(f, "WorkDim"),
3733 Self::GLOBAL_SIZE => write!(f, "GlobalSize"),
3734 Self::ENQUEUED_WORKGROUP_SIZE => write!(f, "EnqueuedWorkgroupSize"),
3735 Self::GLOBAL_OFFSET => write!(f, "GlobalOffset"),
3736 Self::GLOBAL_LINEAR_ID => write!(f, "GlobalLinearId"),
3737 Self::SUBGROUP_SIZE => write!(f, "SubgroupSize"),
3738 Self::SUBGROUP_MAX_SIZE => write!(f, "SubgroupMaxSize"),
3739 Self::NUM_SUBGROUPS => write!(f, "NumSubgroups"),
3740 Self::NUM_ENQUEUED_SUBGROUPS => write!(f, "NumEnqueuedSubgroups"),
3741 Self::SUBGROUP_ID => write!(f, "SubgroupId"),
3742 Self::SUBGROUP_LOCAL_INVOCATION_ID => write!(f, "SubgroupLocalInvocationId"),
3743 Self::VERTEX_INDEX => write!(f, "VertexIndex"),
3744 Self::INSTANCE_INDEX => write!(f, "InstanceIndex"),
3745 Self::CORE_IDARM => write!(f, "CoreIDARM"),
3746 Self::CORE_COUNT_ARM => write!(f, "CoreCountARM"),
3747 Self::CORE_MAX_IDARM => write!(f, "CoreMaxIDARM"),
3748 Self::WARP_IDARM => write!(f, "WarpIDARM"),
3749 Self::WARP_MAX_IDARM => write!(f, "WarpMaxIDARM"),
3750 Self::SUBGROUP_EQ_MASK => write!(f, "SubgroupEqMask"),
3751 Self::SUBGROUP_GE_MASK => write!(f, "SubgroupGeMask"),
3752 Self::SUBGROUP_GT_MASK => write!(f, "SubgroupGtMask"),
3753 Self::SUBGROUP_LE_MASK => write!(f, "SubgroupLeMask"),
3754 Self::SUBGROUP_LT_MASK => write!(f, "SubgroupLtMask"),
3755 Self::BASE_VERTEX => write!(f, "BaseVertex"),
3756 Self::BASE_INSTANCE => write!(f, "BaseInstance"),
3757 Self::DRAW_INDEX => write!(f, "DrawIndex"),
3758 Self::PRIMITIVE_SHADING_RATE_KHR => write!(f, "PrimitiveShadingRateKHR"),
3759 Self::DEVICE_INDEX => write!(f, "DeviceIndex"),
3760 Self::VIEW_INDEX => write!(f, "ViewIndex"),
3761 Self::SHADING_RATE_KHR => write!(f, "ShadingRateKHR"),
3762 Self::TILE_OFFSET_QCOM => write!(f, "TileOffsetQCOM"),
3763 Self::TILE_DIMENSION_QCOM => write!(f, "TileDimensionQCOM"),
3764 Self::TILE_APRON_SIZE_QCOM => write!(f, "TileApronSizeQCOM"),
3765 Self::BARY_COORD_NO_PERSP_AMD => write!(f, "BaryCoordNoPerspAMD"),
3766 Self::BARY_COORD_NO_PERSP_CENTROID_AMD => write!(f, "BaryCoordNoPerspCentroidAMD"),
3767 Self::BARY_COORD_NO_PERSP_SAMPLE_AMD => write!(f, "BaryCoordNoPerspSampleAMD"),
3768 Self::BARY_COORD_SMOOTH_AMD => write!(f, "BaryCoordSmoothAMD"),
3769 Self::BARY_COORD_SMOOTH_CENTROID_AMD => write!(f, "BaryCoordSmoothCentroidAMD"),
3770 Self::BARY_COORD_SMOOTH_SAMPLE_AMD => write!(f, "BaryCoordSmoothSampleAMD"),
3771 Self::BARY_COORD_PULL_MODEL_AMD => write!(f, "BaryCoordPullModelAMD"),
3772 Self::FRAG_STENCIL_REF_EXT => write!(f, "FragStencilRefEXT"),
3773 Self::REMAINING_RECURSION_LEVELS_AMDX => write!(f, "RemainingRecursionLevelsAMDX"),
3774 Self::SHADER_INDEX_AMDX => write!(f, "ShaderIndexAMDX"),
3775 Self::SAMPLER_HEAP_EXT => write!(f, "SamplerHeapEXT"),
3776 Self::RESOURCE_HEAP_EXT => write!(f, "ResourceHeapEXT"),
3777 Self::VIEWPORT_MASK_NV => write!(f, "ViewportMaskNV"),
3778 Self::SECONDARY_POSITION_NV => write!(f, "SecondaryPositionNV"),
3779 Self::SECONDARY_VIEWPORT_MASK_NV => write!(f, "SecondaryViewportMaskNV"),
3780 Self::POSITION_PER_VIEW_NV => write!(f, "PositionPerViewNV"),
3781 Self::VIEWPORT_MASK_PER_VIEW_NV => write!(f, "ViewportMaskPerViewNV"),
3782 Self::FULLY_COVERED_EXT => write!(f, "FullyCoveredEXT"),
3783 Self::TASK_COUNT_NV => write!(f, "TaskCountNV"),
3784 Self::PRIMITIVE_COUNT_NV => write!(f, "PrimitiveCountNV"),
3785 Self::PRIMITIVE_INDICES_NV => write!(f, "PrimitiveIndicesNV"),
3786 Self::CLIP_DISTANCE_PER_VIEW_NV => write!(f, "ClipDistancePerViewNV"),
3787 Self::CULL_DISTANCE_PER_VIEW_NV => write!(f, "CullDistancePerViewNV"),
3788 Self::LAYER_PER_VIEW_NV => write!(f, "LayerPerViewNV"),
3789 Self::MESH_VIEW_COUNT_NV => write!(f, "MeshViewCountNV"),
3790 Self::MESH_VIEW_INDICES_NV => write!(f, "MeshViewIndicesNV"),
3791 Self::BARY_COORD_KHR => write!(f, "BaryCoordKHR"),
3792 Self::BARY_COORD_NO_PERSP_KHR => write!(f, "BaryCoordNoPerspKHR"),
3793 Self::FRAG_SIZE_EXT => write!(f, "FragSizeEXT"),
3794 Self::FRAG_INVOCATION_COUNT_EXT => write!(f, "FragInvocationCountEXT"),
3795 Self::PRIMITIVE_POINT_INDICES_EXT => write!(f, "PrimitivePointIndicesEXT"),
3796 Self::PRIMITIVE_LINE_INDICES_EXT => write!(f, "PrimitiveLineIndicesEXT"),
3797 Self::PRIMITIVE_TRIANGLE_INDICES_EXT => write!(f, "PrimitiveTriangleIndicesEXT"),
3798 Self::CULL_PRIMITIVE_EXT => write!(f, "CullPrimitiveEXT"),
3799 Self::LAUNCH_ID_KHR => write!(f, "LaunchIdKHR"),
3800 Self::LAUNCH_SIZE_KHR => write!(f, "LaunchSizeKHR"),
3801 Self::WORLD_RAY_ORIGIN_KHR => write!(f, "WorldRayOriginKHR"),
3802 Self::WORLD_RAY_DIRECTION_KHR => write!(f, "WorldRayDirectionKHR"),
3803 Self::OBJECT_RAY_ORIGIN_KHR => write!(f, "ObjectRayOriginKHR"),
3804 Self::OBJECT_RAY_DIRECTION_KHR => write!(f, "ObjectRayDirectionKHR"),
3805 Self::RAY_TMIN_KHR => write!(f, "RayTminKHR"),
3806 Self::RAY_TMAX_KHR => write!(f, "RayTmaxKHR"),
3807 Self::INSTANCE_CUSTOM_INDEX_KHR => write!(f, "InstanceCustomIndexKHR"),
3808 Self::OBJECT_TO_WORLD_KHR => write!(f, "ObjectToWorldKHR"),
3809 Self::WORLD_TO_OBJECT_KHR => write!(f, "WorldToObjectKHR"),
3810 Self::HIT_TNV => write!(f, "HitTNV"),
3811 Self::HIT_KIND_KHR => write!(f, "HitKindKHR"),
3812 Self::CURRENT_RAY_TIME_NV => write!(f, "CurrentRayTimeNV"),
3813 Self::HIT_TRIANGLE_VERTEX_POSITIONS_KHR => write!(f, "HitTriangleVertexPositionsKHR"),
3814 Self::HIT_MICRO_TRIANGLE_VERTEX_POSITIONS_NV => {
3815 write!(f, "HitMicroTriangleVertexPositionsNV")
3816 }
3817 Self::HIT_MICRO_TRIANGLE_VERTEX_BARYCENTRICS_NV => {
3818 write!(f, "HitMicroTriangleVertexBarycentricsNV")
3819 }
3820 Self::INCOMING_RAY_FLAGS_KHR => write!(f, "IncomingRayFlagsKHR"),
3821 Self::RAY_GEOMETRY_INDEX_KHR => write!(f, "RayGeometryIndexKHR"),
3822 Self::HIT_IS_SPHERE_NV => write!(f, "HitIsSphereNV"),
3823 Self::HIT_IS_LSSNV => write!(f, "HitIsLSSNV"),
3824 Self::HIT_SPHERE_POSITION_NV => write!(f, "HitSpherePositionNV"),
3825 Self::WARPS_PER_SMNV => write!(f, "WarpsPerSMNV"),
3826 Self::SMCOUNT_NV => write!(f, "SMCountNV"),
3827 Self::WARP_IDNV => write!(f, "WarpIDNV"),
3828 Self::SMIDNV => write!(f, "SMIDNV"),
3829 Self::HIT_LSSPOSITIONS_NV => write!(f, "HitLSSPositionsNV"),
3830 Self::HIT_KIND_FRONT_FACING_MICRO_TRIANGLE_NV => {
3831 write!(f, "HitKindFrontFacingMicroTriangleNV")
3832 }
3833 Self::HIT_KIND_BACK_FACING_MICRO_TRIANGLE_NV => {
3834 write!(f, "HitKindBackFacingMicroTriangleNV")
3835 }
3836 Self::HIT_SPHERE_RADIUS_NV => write!(f, "HitSphereRadiusNV"),
3837 Self::HIT_LSSRADII_NV => write!(f, "HitLSSRadiiNV"),
3838 Self::CLUSTER_IDNV => write!(f, "ClusterIDNV"),
3839 Self::CULL_MASK_KHR => write!(f, "CullMaskKHR"),
3840 x => write!(f, "{x}"),
3841 }
3842 }
3843}
3844#[derive(Clone, Copy, PartialEq, Eq, Debug)]
3845pub struct Scope(pub(crate) u32);
3846impl Scope {
3847 pub const CROSS_DEVICE: Self = Self(0u32);
3848 pub const DEVICE: Self = Self(1u32);
3849 pub const WORKGROUP: Self = Self(2u32);
3850 pub const SUBGROUP: Self = Self(3u32);
3851 pub const INVOCATION: Self = Self(4u32);
3852 pub const QUEUE_FAMILY: Self = Self(5u32);
3853 pub const SHADER_CALL_KHR: Self = Self(6u32);
3854}
3855impl Word for Scope {
3856 #[inline]
3857 fn from_word(word: u32) -> Self {
3858 Self(word)
3859 }
3860}
3861impl Display for Scope {
3862 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3863 match *self {
3864 Self::CROSS_DEVICE => write!(f, "CrossDevice"),
3865 Self::DEVICE => write!(f, "Device"),
3866 Self::WORKGROUP => write!(f, "Workgroup"),
3867 Self::SUBGROUP => write!(f, "Subgroup"),
3868 Self::INVOCATION => write!(f, "Invocation"),
3869 Self::QUEUE_FAMILY => write!(f, "QueueFamily"),
3870 Self::SHADER_CALL_KHR => write!(f, "ShaderCallKHR"),
3871 x => write!(f, "{x}"),
3872 }
3873 }
3874}
3875#[derive(Clone, Copy, PartialEq, Eq, Debug)]
3876pub struct GroupOperation(pub(crate) u32);
3877impl GroupOperation {
3878 pub const REDUCE: Self = Self(0u32);
3879 pub const INCLUSIVE_SCAN: Self = Self(1u32);
3880 pub const EXCLUSIVE_SCAN: Self = Self(2u32);
3881 pub const CLUSTERED_REDUCE: Self = Self(3u32);
3882 pub const PARTITIONED_REDUCE_EXT: Self = Self(6u32);
3883 pub const PARTITIONED_INCLUSIVE_SCAN_EXT: Self = Self(7u32);
3884 pub const PARTITIONED_EXCLUSIVE_SCAN_EXT: Self = Self(8u32);
3885}
3886impl Word for GroupOperation {
3887 #[inline]
3888 fn from_word(word: u32) -> Self {
3889 Self(word)
3890 }
3891}
3892impl Display for GroupOperation {
3893 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3894 match *self {
3895 Self::REDUCE => write!(f, "Reduce"),
3896 Self::INCLUSIVE_SCAN => write!(f, "InclusiveScan"),
3897 Self::EXCLUSIVE_SCAN => write!(f, "ExclusiveScan"),
3898 Self::CLUSTERED_REDUCE => write!(f, "ClusteredReduce"),
3899 Self::PARTITIONED_REDUCE_EXT => write!(f, "PartitionedReduceEXT"),
3900 Self::PARTITIONED_INCLUSIVE_SCAN_EXT => write!(f, "PartitionedInclusiveScanEXT"),
3901 Self::PARTITIONED_EXCLUSIVE_SCAN_EXT => write!(f, "PartitionedExclusiveScanEXT"),
3902 x => write!(f, "{x}"),
3903 }
3904 }
3905}
3906#[derive(Clone, Copy, PartialEq, Eq, Debug)]
3907pub struct KernelEnqueueFlags(pub(crate) u32);
3908impl KernelEnqueueFlags {
3909 pub const NO_WAIT: Self = Self(0u32);
3910 pub const WAIT_KERNEL: Self = Self(1u32);
3911 pub const WAIT_WORK_GROUP: Self = Self(2u32);
3912}
3913impl Word for KernelEnqueueFlags {
3914 #[inline]
3915 fn from_word(word: u32) -> Self {
3916 Self(word)
3917 }
3918}
3919impl Display for KernelEnqueueFlags {
3920 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3921 match *self {
3922 Self::NO_WAIT => write!(f, "NoWait"),
3923 Self::WAIT_KERNEL => write!(f, "WaitKernel"),
3924 Self::WAIT_WORK_GROUP => write!(f, "WaitWorkGroup"),
3925 x => write!(f, "{x}"),
3926 }
3927 }
3928}
3929#[derive(Clone, Copy, PartialEq, Eq, Debug)]
3930pub struct Capability(pub(crate) u32);
3931impl Capability {
3932 pub const MATRIX: Self = Self(0u32);
3933 pub const SHADER: Self = Self(1u32);
3934 pub const GEOMETRY: Self = Self(2u32);
3935 pub const TESSELLATION: Self = Self(3u32);
3936 pub const ADDRESSES: Self = Self(4u32);
3937 pub const LINKAGE: Self = Self(5u32);
3938 pub const KERNEL: Self = Self(6u32);
3939 pub const VECTOR16: Self = Self(7u32);
3940 pub const FLOAT16_BUFFER: Self = Self(8u32);
3941 pub const FLOAT16: Self = Self(9u32);
3942 pub const FLOAT64: Self = Self(10u32);
3943 pub const INT64: Self = Self(11u32);
3944 pub const INT64_ATOMICS: Self = Self(12u32);
3945 pub const IMAGE_BASIC: Self = Self(13u32);
3946 pub const IMAGE_READ_WRITE: Self = Self(14u32);
3947 pub const IMAGE_MIPMAP: Self = Self(15u32);
3948 pub const PIPES: Self = Self(17u32);
3949 pub const GROUPS: Self = Self(18u32);
3950 pub const DEVICE_ENQUEUE: Self = Self(19u32);
3951 pub const LITERAL_SAMPLER: Self = Self(20u32);
3952 pub const ATOMIC_STORAGE: Self = Self(21u32);
3953 pub const INT16: Self = Self(22u32);
3954 pub const TESSELLATION_POINT_SIZE: Self = Self(23u32);
3955 pub const GEOMETRY_POINT_SIZE: Self = Self(24u32);
3956 pub const IMAGE_GATHER_EXTENDED: Self = Self(25u32);
3957 pub const STORAGE_IMAGE_MULTISAMPLE: Self = Self(27u32);
3958 pub const UNIFORM_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = Self(28u32);
3959 pub const SAMPLED_IMAGE_ARRAY_DYNAMIC_INDEXING: Self = Self(29u32);
3960 pub const STORAGE_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = Self(30u32);
3961 pub const STORAGE_IMAGE_ARRAY_DYNAMIC_INDEXING: Self = Self(31u32);
3962 pub const CLIP_DISTANCE: Self = Self(32u32);
3963 pub const CULL_DISTANCE: Self = Self(33u32);
3964 pub const IMAGE_CUBE_ARRAY: Self = Self(34u32);
3965 pub const SAMPLE_RATE_SHADING: Self = Self(35u32);
3966 pub const IMAGE_RECT: Self = Self(36u32);
3967 pub const SAMPLED_RECT: Self = Self(37u32);
3968 pub const GENERIC_POINTER: Self = Self(38u32);
3969 pub const INT8: Self = Self(39u32);
3970 pub const INPUT_ATTACHMENT: Self = Self(40u32);
3971 pub const SPARSE_RESIDENCY: Self = Self(41u32);
3972 pub const MIN_LOD: Self = Self(42u32);
3973 pub const SAMPLED1_D: Self = Self(43u32);
3974 pub const IMAGE1_D: Self = Self(44u32);
3975 pub const SAMPLED_CUBE_ARRAY: Self = Self(45u32);
3976 pub const SAMPLED_BUFFER: Self = Self(46u32);
3977 pub const IMAGE_BUFFER: Self = Self(47u32);
3978 pub const IMAGE_MSARRAY: Self = Self(48u32);
3979 pub const STORAGE_IMAGE_EXTENDED_FORMATS: Self = Self(49u32);
3980 pub const IMAGE_QUERY: Self = Self(50u32);
3981 pub const DERIVATIVE_CONTROL: Self = Self(51u32);
3982 pub const INTERPOLATION_FUNCTION: Self = Self(52u32);
3983 pub const TRANSFORM_FEEDBACK: Self = Self(53u32);
3984 pub const GEOMETRY_STREAMS: Self = Self(54u32);
3985 pub const STORAGE_IMAGE_READ_WITHOUT_FORMAT: Self = Self(55u32);
3986 pub const STORAGE_IMAGE_WRITE_WITHOUT_FORMAT: Self = Self(56u32);
3987 pub const MULTI_VIEWPORT: Self = Self(57u32);
3988 pub const SUBGROUP_DISPATCH: Self = Self(58u32);
3989 pub const NAMED_BARRIER: Self = Self(59u32);
3990 pub const PIPE_STORAGE: Self = Self(60u32);
3991 pub const GROUP_NON_UNIFORM: Self = Self(61u32);
3992 pub const GROUP_NON_UNIFORM_VOTE: Self = Self(62u32);
3993 pub const GROUP_NON_UNIFORM_ARITHMETIC: Self = Self(63u32);
3994 pub const GROUP_NON_UNIFORM_BALLOT: Self = Self(64u32);
3995 pub const GROUP_NON_UNIFORM_SHUFFLE: Self = Self(65u32);
3996 pub const GROUP_NON_UNIFORM_SHUFFLE_RELATIVE: Self = Self(66u32);
3997 pub const GROUP_NON_UNIFORM_CLUSTERED: Self = Self(67u32);
3998 pub const GROUP_NON_UNIFORM_QUAD: Self = Self(68u32);
3999 pub const SHADER_LAYER: Self = Self(69u32);
4000 pub const SHADER_VIEWPORT_INDEX: Self = Self(70u32);
4001 pub const UNIFORM_DECORATION: Self = Self(71u32);
4002 pub const CORE_BUILTINS_ARM: Self = Self(4165u32);
4003 pub const TILE_IMAGE_COLOR_READ_ACCESS_EXT: Self = Self(4166u32);
4004 pub const TILE_IMAGE_DEPTH_READ_ACCESS_EXT: Self = Self(4167u32);
4005 pub const TILE_IMAGE_STENCIL_READ_ACCESS_EXT: Self = Self(4168u32);
4006 pub const TENSORS_ARM: Self = Self(4174u32);
4007 pub const STORAGE_TENSOR_ARRAY_DYNAMIC_INDEXING_ARM: Self = Self(4175u32);
4008 pub const STORAGE_TENSOR_ARRAY_NON_UNIFORM_INDEXING_ARM: Self = Self(4176u32);
4009 pub const GRAPH_ARM: Self = Self(4191u32);
4010 pub const COOPERATIVE_MATRIX_LAYOUTS_ARM: Self = Self(4201u32);
4011 pub const FLOAT8_EXT: Self = Self(4212u32);
4012 pub const FLOAT8_COOPERATIVE_MATRIX_EXT: Self = Self(4213u32);
4013 pub const FRAGMENT_SHADING_RATE_KHR: Self = Self(4422u32);
4014 pub const SUBGROUP_BALLOT_KHR: Self = Self(4423u32);
4015 pub const DRAW_PARAMETERS: Self = Self(4427u32);
4016 pub const WORKGROUP_MEMORY_EXPLICIT_LAYOUT_KHR: Self = Self(4428u32);
4017 pub const WORKGROUP_MEMORY_EXPLICIT_LAYOUT8_BIT_ACCESS_KHR: Self = Self(4429u32);
4018 pub const WORKGROUP_MEMORY_EXPLICIT_LAYOUT16_BIT_ACCESS_KHR: Self = Self(4430u32);
4019 pub const SUBGROUP_VOTE_KHR: Self = Self(4431u32);
4020 pub const STORAGE_BUFFER16_BIT_ACCESS: Self = Self(4433u32);
4021 pub const UNIFORM_AND_STORAGE_BUFFER16_BIT_ACCESS: Self = Self(4434u32);
4022 pub const STORAGE_PUSH_CONSTANT16: Self = Self(4435u32);
4023 pub const STORAGE_INPUT_OUTPUT16: Self = Self(4436u32);
4024 pub const DEVICE_GROUP: Self = Self(4437u32);
4025 pub const MULTI_VIEW: Self = Self(4439u32);
4026 pub const VARIABLE_POINTERS_STORAGE_BUFFER: Self = Self(4441u32);
4027 pub const VARIABLE_POINTERS: Self = Self(4442u32);
4028 pub const ATOMIC_STORAGE_OPS: Self = Self(4445u32);
4029 pub const SAMPLE_MASK_POST_DEPTH_COVERAGE: Self = Self(4447u32);
4030 pub const STORAGE_BUFFER8_BIT_ACCESS: Self = Self(4448u32);
4031 pub const UNIFORM_AND_STORAGE_BUFFER8_BIT_ACCESS: Self = Self(4449u32);
4032 pub const STORAGE_PUSH_CONSTANT8: Self = Self(4450u32);
4033 pub const DENORM_PRESERVE: Self = Self(4464u32);
4034 pub const DENORM_FLUSH_TO_ZERO: Self = Self(4465u32);
4035 pub const SIGNED_ZERO_INF_NAN_PRESERVE: Self = Self(4466u32);
4036 pub const ROUNDING_MODE_RTE: Self = Self(4467u32);
4037 pub const ROUNDING_MODE_RTZ: Self = Self(4468u32);
4038 pub const RAY_QUERY_PROVISIONAL_KHR: Self = Self(4471u32);
4039 pub const RAY_QUERY_KHR: Self = Self(4472u32);
4040 pub const UNTYPED_POINTERS_KHR: Self = Self(4473u32);
4041 pub const RAY_TRAVERSAL_PRIMITIVE_CULLING_KHR: Self = Self(4478u32);
4042 pub const RAY_TRACING_KHR: Self = Self(4479u32);
4043 pub const TEXTURE_SAMPLE_WEIGHTED_QCOM: Self = Self(4484u32);
4044 pub const TEXTURE_BOX_FILTER_QCOM: Self = Self(4485u32);
4045 pub const TEXTURE_BLOCK_MATCH_QCOM: Self = Self(4486u32);
4046 pub const TILE_SHADING_QCOM: Self = Self(4495u32);
4047 pub const COOPERATIVE_MATRIX_CONVERSION_QCOM: Self = Self(4496u32);
4048 pub const TEXTURE_BLOCK_MATCH2_QCOM: Self = Self(4498u32);
4049 pub const FLOAT16_IMAGE_AMD: Self = Self(5008u32);
4050 pub const IMAGE_GATHER_BIAS_LOD_AMD: Self = Self(5009u32);
4051 pub const FRAGMENT_MASK_AMD: Self = Self(5010u32);
4052 pub const STENCIL_EXPORT_EXT: Self = Self(5013u32);
4053 pub const IMAGE_READ_WRITE_LOD_AMD: Self = Self(5015u32);
4054 pub const INT64_IMAGE_EXT: Self = Self(5016u32);
4055 pub const SHADER_CLOCK_KHR: Self = Self(5055u32);
4056 pub const SHADER_ENQUEUE_AMDX: Self = Self(5067u32);
4057 pub const QUAD_CONTROL_KHR: Self = Self(5087u32);
4058 pub const INT4_TYPE_INTEL: Self = Self(5112u32);
4059 pub const INT4_COOPERATIVE_MATRIX_INTEL: Self = Self(5114u32);
4060 pub const BFLOAT16_TYPE_KHR: Self = Self(5116u32);
4061 pub const BFLOAT16_DOT_PRODUCT_KHR: Self = Self(5117u32);
4062 pub const BFLOAT16_COOPERATIVE_MATRIX_KHR: Self = Self(5118u32);
4063 pub const ABORT_KHR: Self = Self(5120u32);
4064 pub const DESCRIPTOR_HEAP_EXT: Self = Self(5128u32);
4065 pub const CONSTANT_DATA_KHR: Self = Self(5146u32);
4066 pub const POISON_FREEZE_KHR: Self = Self(5156u32);
4067 pub const SAMPLE_MASK_OVERRIDE_COVERAGE_NV: Self = Self(5249u32);
4068 pub const GEOMETRY_SHADER_PASSTHROUGH_NV: Self = Self(5251u32);
4069 pub const SHADER_VIEWPORT_INDEX_LAYER_EXT: Self = Self(5254u32);
4070 pub const SHADER_VIEWPORT_MASK_NV: Self = Self(5255u32);
4071 pub const SHADER_STEREO_VIEW_NV: Self = Self(5259u32);
4072 pub const PER_VIEW_ATTRIBUTES_NV: Self = Self(5260u32);
4073 pub const FRAGMENT_FULLY_COVERED_EXT: Self = Self(5265u32);
4074 pub const MESH_SHADING_NV: Self = Self(5266u32);
4075 pub const IMAGE_FOOTPRINT_NV: Self = Self(5282u32);
4076 pub const MESH_SHADING_EXT: Self = Self(5283u32);
4077 pub const FRAGMENT_BARYCENTRIC_KHR: Self = Self(5284u32);
4078 pub const COMPUTE_DERIVATIVE_GROUP_QUADS_KHR: Self = Self(5288u32);
4079 pub const FRAGMENT_DENSITY_EXT: Self = Self(5291u32);
4080 pub const GROUP_NON_UNIFORM_PARTITIONED_EXT: Self = Self(5297u32);
4081 pub const SHADER_NON_UNIFORM: Self = Self(5301u32);
4082 pub const RUNTIME_DESCRIPTOR_ARRAY: Self = Self(5302u32);
4083 pub const INPUT_ATTACHMENT_ARRAY_DYNAMIC_INDEXING: Self = Self(5303u32);
4084 pub const UNIFORM_TEXEL_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = Self(5304u32);
4085 pub const STORAGE_TEXEL_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = Self(5305u32);
4086 pub const UNIFORM_BUFFER_ARRAY_NON_UNIFORM_INDEXING: Self = Self(5306u32);
4087 pub const SAMPLED_IMAGE_ARRAY_NON_UNIFORM_INDEXING: Self = Self(5307u32);
4088 pub const STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING: Self = Self(5308u32);
4089 pub const STORAGE_IMAGE_ARRAY_NON_UNIFORM_INDEXING: Self = Self(5309u32);
4090 pub const INPUT_ATTACHMENT_ARRAY_NON_UNIFORM_INDEXING: Self = Self(5310u32);
4091 pub const UNIFORM_TEXEL_BUFFER_ARRAY_NON_UNIFORM_INDEXING: Self = Self(5311u32);
4092 pub const STORAGE_TEXEL_BUFFER_ARRAY_NON_UNIFORM_INDEXING: Self = Self(5312u32);
4093 pub const RAY_TRACING_POSITION_FETCH_KHR: Self = Self(5336u32);
4094 pub const RAY_TRACING_NV: Self = Self(5340u32);
4095 pub const RAY_TRACING_MOTION_BLUR_NV: Self = Self(5341u32);
4096 pub const VULKAN_MEMORY_MODEL: Self = Self(5345u32);
4097 pub const VULKAN_MEMORY_MODEL_DEVICE_SCOPE: Self = Self(5346u32);
4098 pub const PHYSICAL_STORAGE_BUFFER_ADDRESSES: Self = Self(5347u32);
4099 pub const COMPUTE_DERIVATIVE_GROUP_LINEAR_KHR: Self = Self(5350u32);
4100 pub const RAY_TRACING_PROVISIONAL_KHR: Self = Self(5353u32);
4101 pub const COOPERATIVE_MATRIX_NV: Self = Self(5357u32);
4102 pub const FRAGMENT_SHADER_SAMPLE_INTERLOCK_EXT: Self = Self(5363u32);
4103 pub const FRAGMENT_SHADER_SHADING_RATE_INTERLOCK_EXT: Self = Self(5372u32);
4104 pub const SHADER_SMBUILTINS_NV: Self = Self(5373u32);
4105 pub const FRAGMENT_SHADER_PIXEL_INTERLOCK_EXT: Self = Self(5378u32);
4106 pub const DEMOTE_TO_HELPER_INVOCATION: Self = Self(5379u32);
4107 pub const DISPLACEMENT_MICROMAP_NV: Self = Self(5380u32);
4108 pub const RAY_TRACING_OPACITY_MICROMAP_EXT: Self = Self(5381u32);
4109 pub const SHADER_INVOCATION_REORDER_NV: Self = Self(5383u32);
4110 pub const SHADER_INVOCATION_REORDER_EXT: Self = Self(5388u32);
4111 pub const BINDLESS_TEXTURE_NV: Self = Self(5390u32);
4112 pub const RAY_QUERY_POSITION_FETCH_KHR: Self = Self(5391u32);
4113 pub const COOPERATIVE_VECTOR_NV: Self = Self(5394u32);
4114 pub const ATOMIC_FLOAT16_VECTOR_NV: Self = Self(5404u32);
4115 pub const RAY_TRACING_DISPLACEMENT_MICROMAP_NV: Self = Self(5409u32);
4116 pub const RAW_ACCESS_CHAINS_NV: Self = Self(5414u32);
4117 pub const RAY_TRACING_SPHERES_GEOMETRY_NV: Self = Self(5418u32);
4118 pub const RAY_TRACING_LINEAR_SWEPT_SPHERES_GEOMETRY_NV: Self = Self(5419u32);
4119 pub const PUSH_CONSTANT_BANKS_NV: Self = Self(5423u32);
4120 pub const LONG_VECTOR_EXT: Self = Self(5425u32);
4121 pub const SHADER64_BIT_INDEXING_EXT: Self = Self(5426u32);
4122 pub const COOPERATIVE_MATRIX_REDUCTIONS_NV: Self = Self(5430u32);
4123 pub const COOPERATIVE_MATRIX_CONVERSIONS_NV: Self = Self(5431u32);
4124 pub const COOPERATIVE_MATRIX_PER_ELEMENT_OPERATIONS_NV: Self = Self(5432u32);
4125 pub const COOPERATIVE_MATRIX_TENSOR_ADDRESSING_NV: Self = Self(5433u32);
4126 pub const COOPERATIVE_MATRIX_BLOCK_LOADS_NV: Self = Self(5434u32);
4127 pub const COOPERATIVE_VECTOR_TRAINING_NV: Self = Self(5435u32);
4128 pub const RAY_TRACING_CLUSTER_ACCELERATION_STRUCTURE_NV: Self = Self(5437u32);
4129 pub const TENSOR_ADDRESSING_NV: Self = Self(5439u32);
4130 pub const SUBGROUP_SHUFFLE_INTEL: Self = Self(5568u32);
4131 pub const SUBGROUP_BUFFER_BLOCK_IOINTEL: Self = Self(5569u32);
4132 pub const SUBGROUP_IMAGE_BLOCK_IOINTEL: Self = Self(5570u32);
4133 pub const SUBGROUP_IMAGE_MEDIA_BLOCK_IOINTEL: Self = Self(5579u32);
4134 pub const ROUND_TO_INFINITY_INTEL: Self = Self(5582u32);
4135 pub const FLOATING_POINT_MODE_INTEL: Self = Self(5583u32);
4136 pub const INTEGER_FUNCTIONS2_INTEL: Self = Self(5584u32);
4137 pub const FUNCTION_POINTERS_INTEL: Self = Self(5603u32);
4138 pub const INDIRECT_REFERENCES_INTEL: Self = Self(5604u32);
4139 pub const ASM_INTEL: Self = Self(5606u32);
4140 pub const ATOMIC_FLOAT32_MIN_MAX_EXT: Self = Self(5612u32);
4141 pub const ATOMIC_FLOAT64_MIN_MAX_EXT: Self = Self(5613u32);
4142 pub const ATOMIC_FLOAT16_MIN_MAX_EXT: Self = Self(5616u32);
4143 pub const VECTOR_COMPUTE_INTEL: Self = Self(5617u32);
4144 pub const VECTOR_ANY_INTEL: Self = Self(5619u32);
4145 pub const EXPECT_ASSUME_KHR: Self = Self(5629u32);
4146 pub const SUBGROUP_AVC_MOTION_ESTIMATION_INTEL: Self = Self(5696u32);
4147 pub const SUBGROUP_AVC_MOTION_ESTIMATION_INTRA_INTEL: Self = Self(5697u32);
4148 pub const SUBGROUP_AVC_MOTION_ESTIMATION_CHROMA_INTEL: Self = Self(5698u32);
4149 pub const VARIABLE_LENGTH_ARRAY_INTEL: Self = Self(5817u32);
4150 pub const FUNCTION_FLOAT_CONTROL_INTEL: Self = Self(5821u32);
4151 pub const FPGAMEMORY_ATTRIBUTES_ALTERA: Self = Self(5824u32);
4152 pub const FPFAST_MATH_MODE_INTEL: Self = Self(5837u32);
4153 pub const ARBITRARY_PRECISION_INTEGERS_ALTERA: Self = Self(5844u32);
4154 pub const ARBITRARY_PRECISION_FLOATING_POINT_ALTERA: Self = Self(5845u32);
4155 pub const UNSTRUCTURED_LOOP_CONTROLS_INTEL: Self = Self(5886u32);
4156 pub const FPGALOOP_CONTROLS_ALTERA: Self = Self(5888u32);
4157 pub const KERNEL_ATTRIBUTES_INTEL: Self = Self(5892u32);
4158 pub const FPGAKERNEL_ATTRIBUTES_INTEL: Self = Self(5897u32);
4159 pub const FPGAMEMORY_ACCESSES_ALTERA: Self = Self(5898u32);
4160 pub const FPGACLUSTER_ATTRIBUTES_ALTERA: Self = Self(5904u32);
4161 pub const LOOP_FUSE_ALTERA: Self = Self(5906u32);
4162 pub const FPGADSPCONTROL_ALTERA: Self = Self(5908u32);
4163 pub const MEMORY_ACCESS_ALIASING_INTEL: Self = Self(5910u32);
4164 pub const FPGAINVOCATION_PIPELINING_ATTRIBUTES_ALTERA: Self = Self(5916u32);
4165 pub const FPGABUFFER_LOCATION_ALTERA: Self = Self(5920u32);
4166 pub const ARBITRARY_PRECISION_FIXED_POINT_ALTERA: Self = Self(5922u32);
4167 pub const USMSTORAGE_CLASSES_ALTERA: Self = Self(5935u32);
4168 pub const RUNTIME_ALIGNED_ATTRIBUTE_ALTERA: Self = Self(5939u32);
4169 pub const IOPIPES_ALTERA: Self = Self(5943u32);
4170 pub const BLOCKING_PIPES_ALTERA: Self = Self(5945u32);
4171 pub const FPGAREG_ALTERA: Self = Self(5948u32);
4172 pub const DOT_PRODUCT_INPUT_ALL: Self = Self(6016u32);
4173 pub const DOT_PRODUCT_INPUT4X8_BIT: Self = Self(6017u32);
4174 pub const DOT_PRODUCT_INPUT4X8_BIT_PACKED: Self = Self(6018u32);
4175 pub const DOT_PRODUCT: Self = Self(6019u32);
4176 pub const RAY_CULL_MASK_KHR: Self = Self(6020u32);
4177 pub const COOPERATIVE_MATRIX_KHR: Self = Self(6022u32);
4178 pub const REPLICATED_COMPOSITES_EXT: Self = Self(6024u32);
4179 pub const BIT_INSTRUCTIONS: Self = Self(6025u32);
4180 pub const GROUP_NON_UNIFORM_ROTATE_KHR: Self = Self(6026u32);
4181 pub const FLOAT_CONTROLS2: Self = Self(6029u32);
4182 pub const FMAKHR: Self = Self(6030u32);
4183 pub const ATOMIC_FLOAT32_ADD_EXT: Self = Self(6033u32);
4184 pub const ATOMIC_FLOAT64_ADD_EXT: Self = Self(6034u32);
4185 pub const LONG_COMPOSITES_INTEL: Self = Self(6089u32);
4186 pub const OPT_NONE_EXT: Self = Self(6094u32);
4187 pub const ATOMIC_FLOAT16_ADD_EXT: Self = Self(6095u32);
4188 pub const DEBUG_INFO_MODULE_INTEL: Self = Self(6114u32);
4189 pub const BFLOAT16_CONVERSION_INTEL: Self = Self(6115u32);
4190 pub const SPLIT_BARRIER_INTEL: Self = Self(6141u32);
4191 pub const ARITHMETIC_FENCE_EXT: Self = Self(6144u32);
4192 pub const FPGACLUSTER_ATTRIBUTES_V2_ALTERA: Self = Self(6150u32);
4193 pub const FPGAKERNEL_ATTRIBUTESV2_INTEL: Self = Self(6161u32);
4194 pub const TASK_SEQUENCE_ALTERA: Self = Self(6162u32);
4195 pub const FPMAX_ERROR_INTEL: Self = Self(6169u32);
4196 pub const FPGALATENCY_CONTROL_ALTERA: Self = Self(6171u32);
4197 pub const FPGAARGUMENT_INTERFACES_ALTERA: Self = Self(6174u32);
4198 pub const GLOBAL_VARIABLE_HOST_ACCESS_INTEL: Self = Self(6187u32);
4199 pub const GLOBAL_VARIABLE_FPGADECORATIONS_ALTERA: Self = Self(6189u32);
4200 pub const SUBGROUP_BUFFER_PREFETCH_INTEL: Self = Self(6220u32);
4201 pub const SUBGROUP2_DBLOCK_IOINTEL: Self = Self(6228u32);
4202 pub const SUBGROUP2_DBLOCK_TRANSFORM_INTEL: Self = Self(6229u32);
4203 pub const SUBGROUP2_DBLOCK_TRANSPOSE_INTEL: Self = Self(6230u32);
4204 pub const SUBGROUP_MATRIX_MULTIPLY_ACCUMULATE_INTEL: Self = Self(6236u32);
4205 pub const TERNARY_BITWISE_FUNCTION_INTEL: Self = Self(6241u32);
4206 pub const UNTYPED_VARIABLE_LENGTH_ARRAY_INTEL: Self = Self(6243u32);
4207 pub const SPEC_CONDITIONAL_INTEL: Self = Self(6245u32);
4208 pub const FUNCTION_VARIANTS_INTEL: Self = Self(6246u32);
4209 pub const GROUP_UNIFORM_ARITHMETIC_KHR: Self = Self(6400u32);
4210 pub const TENSOR_FLOAT32_ROUNDING_INTEL: Self = Self(6425u32);
4211 pub const MASKED_GATHER_SCATTER_INTEL: Self = Self(6427u32);
4212 pub const CACHE_CONTROLS_INTEL: Self = Self(6441u32);
4213 pub const REGISTER_LIMITS_INTEL: Self = Self(6460u32);
4214 pub const BINDLESS_IMAGES_INTEL: Self = Self(6528u32);
4215 pub const DOT_PRODUCT_FLOAT16_ACC_FLOAT32_VALVE: Self = Self(6912u32);
4216 pub const DOT_PRODUCT_FLOAT16_ACC_FLOAT16_VALVE: Self = Self(6913u32);
4217 pub const DOT_PRODUCT_BFLOAT16_ACC_VALVE: Self = Self(6914u32);
4218 pub const DOT_PRODUCT_FLOAT8_ACC_FLOAT32_VALVE: Self = Self(6915u32);
4219}
4220impl Word for Capability {
4221 #[inline]
4222 fn from_word(word: u32) -> Self {
4223 Self(word)
4224 }
4225}
4226impl Display for Capability {
4227 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4228 match *self {
4229 Self::MATRIX => write!(f, "Matrix"),
4230 Self::SHADER => write!(f, "Shader"),
4231 Self::GEOMETRY => write!(f, "Geometry"),
4232 Self::TESSELLATION => write!(f, "Tessellation"),
4233 Self::ADDRESSES => write!(f, "Addresses"),
4234 Self::LINKAGE => write!(f, "Linkage"),
4235 Self::KERNEL => write!(f, "Kernel"),
4236 Self::VECTOR16 => write!(f, "Vector16"),
4237 Self::FLOAT16_BUFFER => write!(f, "Float16Buffer"),
4238 Self::FLOAT16 => write!(f, "Float16"),
4239 Self::FLOAT64 => write!(f, "Float64"),
4240 Self::INT64 => write!(f, "Int64"),
4241 Self::INT64_ATOMICS => write!(f, "Int64Atomics"),
4242 Self::IMAGE_BASIC => write!(f, "ImageBasic"),
4243 Self::IMAGE_READ_WRITE => write!(f, "ImageReadWrite"),
4244 Self::IMAGE_MIPMAP => write!(f, "ImageMipmap"),
4245 Self::PIPES => write!(f, "Pipes"),
4246 Self::GROUPS => write!(f, "Groups"),
4247 Self::DEVICE_ENQUEUE => write!(f, "DeviceEnqueue"),
4248 Self::LITERAL_SAMPLER => write!(f, "LiteralSampler"),
4249 Self::ATOMIC_STORAGE => write!(f, "AtomicStorage"),
4250 Self::INT16 => write!(f, "Int16"),
4251 Self::TESSELLATION_POINT_SIZE => write!(f, "TessellationPointSize"),
4252 Self::GEOMETRY_POINT_SIZE => write!(f, "GeometryPointSize"),
4253 Self::IMAGE_GATHER_EXTENDED => write!(f, "ImageGatherExtended"),
4254 Self::STORAGE_IMAGE_MULTISAMPLE => write!(f, "StorageImageMultisample"),
4255 Self::UNIFORM_BUFFER_ARRAY_DYNAMIC_INDEXING => {
4256 write!(f, "UniformBufferArrayDynamicIndexing")
4257 }
4258 Self::SAMPLED_IMAGE_ARRAY_DYNAMIC_INDEXING => {
4259 write!(f, "SampledImageArrayDynamicIndexing")
4260 }
4261 Self::STORAGE_BUFFER_ARRAY_DYNAMIC_INDEXING => {
4262 write!(f, "StorageBufferArrayDynamicIndexing")
4263 }
4264 Self::STORAGE_IMAGE_ARRAY_DYNAMIC_INDEXING => {
4265 write!(f, "StorageImageArrayDynamicIndexing")
4266 }
4267 Self::CLIP_DISTANCE => write!(f, "ClipDistance"),
4268 Self::CULL_DISTANCE => write!(f, "CullDistance"),
4269 Self::IMAGE_CUBE_ARRAY => write!(f, "ImageCubeArray"),
4270 Self::SAMPLE_RATE_SHADING => write!(f, "SampleRateShading"),
4271 Self::IMAGE_RECT => write!(f, "ImageRect"),
4272 Self::SAMPLED_RECT => write!(f, "SampledRect"),
4273 Self::GENERIC_POINTER => write!(f, "GenericPointer"),
4274 Self::INT8 => write!(f, "Int8"),
4275 Self::INPUT_ATTACHMENT => write!(f, "InputAttachment"),
4276 Self::SPARSE_RESIDENCY => write!(f, "SparseResidency"),
4277 Self::MIN_LOD => write!(f, "MinLod"),
4278 Self::SAMPLED1_D => write!(f, "Sampled1D"),
4279 Self::IMAGE1_D => write!(f, "Image1D"),
4280 Self::SAMPLED_CUBE_ARRAY => write!(f, "SampledCubeArray"),
4281 Self::SAMPLED_BUFFER => write!(f, "SampledBuffer"),
4282 Self::IMAGE_BUFFER => write!(f, "ImageBuffer"),
4283 Self::IMAGE_MSARRAY => write!(f, "ImageMSArray"),
4284 Self::STORAGE_IMAGE_EXTENDED_FORMATS => write!(f, "StorageImageExtendedFormats"),
4285 Self::IMAGE_QUERY => write!(f, "ImageQuery"),
4286 Self::DERIVATIVE_CONTROL => write!(f, "DerivativeControl"),
4287 Self::INTERPOLATION_FUNCTION => write!(f, "InterpolationFunction"),
4288 Self::TRANSFORM_FEEDBACK => write!(f, "TransformFeedback"),
4289 Self::GEOMETRY_STREAMS => write!(f, "GeometryStreams"),
4290 Self::STORAGE_IMAGE_READ_WITHOUT_FORMAT => write!(f, "StorageImageReadWithoutFormat"),
4291 Self::STORAGE_IMAGE_WRITE_WITHOUT_FORMAT => write!(f, "StorageImageWriteWithoutFormat"),
4292 Self::MULTI_VIEWPORT => write!(f, "MultiViewport"),
4293 Self::SUBGROUP_DISPATCH => write!(f, "SubgroupDispatch"),
4294 Self::NAMED_BARRIER => write!(f, "NamedBarrier"),
4295 Self::PIPE_STORAGE => write!(f, "PipeStorage"),
4296 Self::GROUP_NON_UNIFORM => write!(f, "GroupNonUniform"),
4297 Self::GROUP_NON_UNIFORM_VOTE => write!(f, "GroupNonUniformVote"),
4298 Self::GROUP_NON_UNIFORM_ARITHMETIC => write!(f, "GroupNonUniformArithmetic"),
4299 Self::GROUP_NON_UNIFORM_BALLOT => write!(f, "GroupNonUniformBallot"),
4300 Self::GROUP_NON_UNIFORM_SHUFFLE => write!(f, "GroupNonUniformShuffle"),
4301 Self::GROUP_NON_UNIFORM_SHUFFLE_RELATIVE => write!(f, "GroupNonUniformShuffleRelative"),
4302 Self::GROUP_NON_UNIFORM_CLUSTERED => write!(f, "GroupNonUniformClustered"),
4303 Self::GROUP_NON_UNIFORM_QUAD => write!(f, "GroupNonUniformQuad"),
4304 Self::SHADER_LAYER => write!(f, "ShaderLayer"),
4305 Self::SHADER_VIEWPORT_INDEX => write!(f, "ShaderViewportIndex"),
4306 Self::UNIFORM_DECORATION => write!(f, "UniformDecoration"),
4307 Self::CORE_BUILTINS_ARM => write!(f, "CoreBuiltinsARM"),
4308 Self::TILE_IMAGE_COLOR_READ_ACCESS_EXT => write!(f, "TileImageColorReadAccessEXT"),
4309 Self::TILE_IMAGE_DEPTH_READ_ACCESS_EXT => write!(f, "TileImageDepthReadAccessEXT"),
4310 Self::TILE_IMAGE_STENCIL_READ_ACCESS_EXT => write!(f, "TileImageStencilReadAccessEXT"),
4311 Self::TENSORS_ARM => write!(f, "TensorsARM"),
4312 Self::STORAGE_TENSOR_ARRAY_DYNAMIC_INDEXING_ARM => {
4313 write!(f, "StorageTensorArrayDynamicIndexingARM")
4314 }
4315 Self::STORAGE_TENSOR_ARRAY_NON_UNIFORM_INDEXING_ARM => {
4316 write!(f, "StorageTensorArrayNonUniformIndexingARM")
4317 }
4318 Self::GRAPH_ARM => write!(f, "GraphARM"),
4319 Self::COOPERATIVE_MATRIX_LAYOUTS_ARM => write!(f, "CooperativeMatrixLayoutsARM"),
4320 Self::FLOAT8_EXT => write!(f, "Float8EXT"),
4321 Self::FLOAT8_COOPERATIVE_MATRIX_EXT => write!(f, "Float8CooperativeMatrixEXT"),
4322 Self::FRAGMENT_SHADING_RATE_KHR => write!(f, "FragmentShadingRateKHR"),
4323 Self::SUBGROUP_BALLOT_KHR => write!(f, "SubgroupBallotKHR"),
4324 Self::DRAW_PARAMETERS => write!(f, "DrawParameters"),
4325 Self::WORKGROUP_MEMORY_EXPLICIT_LAYOUT_KHR => {
4326 write!(f, "WorkgroupMemoryExplicitLayoutKHR")
4327 }
4328 Self::WORKGROUP_MEMORY_EXPLICIT_LAYOUT8_BIT_ACCESS_KHR => {
4329 write!(f, "WorkgroupMemoryExplicitLayout8BitAccessKHR")
4330 }
4331 Self::WORKGROUP_MEMORY_EXPLICIT_LAYOUT16_BIT_ACCESS_KHR => {
4332 write!(f, "WorkgroupMemoryExplicitLayout16BitAccessKHR")
4333 }
4334 Self::SUBGROUP_VOTE_KHR => write!(f, "SubgroupVoteKHR"),
4335 Self::STORAGE_BUFFER16_BIT_ACCESS => write!(f, "StorageBuffer16BitAccess"),
4336 Self::UNIFORM_AND_STORAGE_BUFFER16_BIT_ACCESS => {
4337 write!(f, "UniformAndStorageBuffer16BitAccess")
4338 }
4339 Self::STORAGE_PUSH_CONSTANT16 => write!(f, "StoragePushConstant16"),
4340 Self::STORAGE_INPUT_OUTPUT16 => write!(f, "StorageInputOutput16"),
4341 Self::DEVICE_GROUP => write!(f, "DeviceGroup"),
4342 Self::MULTI_VIEW => write!(f, "MultiView"),
4343 Self::VARIABLE_POINTERS_STORAGE_BUFFER => write!(f, "VariablePointersStorageBuffer"),
4344 Self::VARIABLE_POINTERS => write!(f, "VariablePointers"),
4345 Self::ATOMIC_STORAGE_OPS => write!(f, "AtomicStorageOps"),
4346 Self::SAMPLE_MASK_POST_DEPTH_COVERAGE => write!(f, "SampleMaskPostDepthCoverage"),
4347 Self::STORAGE_BUFFER8_BIT_ACCESS => write!(f, "StorageBuffer8BitAccess"),
4348 Self::UNIFORM_AND_STORAGE_BUFFER8_BIT_ACCESS => {
4349 write!(f, "UniformAndStorageBuffer8BitAccess")
4350 }
4351 Self::STORAGE_PUSH_CONSTANT8 => write!(f, "StoragePushConstant8"),
4352 Self::DENORM_PRESERVE => write!(f, "DenormPreserve"),
4353 Self::DENORM_FLUSH_TO_ZERO => write!(f, "DenormFlushToZero"),
4354 Self::SIGNED_ZERO_INF_NAN_PRESERVE => write!(f, "SignedZeroInfNanPreserve"),
4355 Self::ROUNDING_MODE_RTE => write!(f, "RoundingModeRTE"),
4356 Self::ROUNDING_MODE_RTZ => write!(f, "RoundingModeRTZ"),
4357 Self::RAY_QUERY_PROVISIONAL_KHR => write!(f, "RayQueryProvisionalKHR"),
4358 Self::RAY_QUERY_KHR => write!(f, "RayQueryKHR"),
4359 Self::UNTYPED_POINTERS_KHR => write!(f, "UntypedPointersKHR"),
4360 Self::RAY_TRAVERSAL_PRIMITIVE_CULLING_KHR => {
4361 write!(f, "RayTraversalPrimitiveCullingKHR")
4362 }
4363 Self::RAY_TRACING_KHR => write!(f, "RayTracingKHR"),
4364 Self::TEXTURE_SAMPLE_WEIGHTED_QCOM => write!(f, "TextureSampleWeightedQCOM"),
4365 Self::TEXTURE_BOX_FILTER_QCOM => write!(f, "TextureBoxFilterQCOM"),
4366 Self::TEXTURE_BLOCK_MATCH_QCOM => write!(f, "TextureBlockMatchQCOM"),
4367 Self::TILE_SHADING_QCOM => write!(f, "TileShadingQCOM"),
4368 Self::COOPERATIVE_MATRIX_CONVERSION_QCOM => {
4369 write!(f, "CooperativeMatrixConversionQCOM")
4370 }
4371 Self::TEXTURE_BLOCK_MATCH2_QCOM => write!(f, "TextureBlockMatch2QCOM"),
4372 Self::FLOAT16_IMAGE_AMD => write!(f, "Float16ImageAMD"),
4373 Self::IMAGE_GATHER_BIAS_LOD_AMD => write!(f, "ImageGatherBiasLodAMD"),
4374 Self::FRAGMENT_MASK_AMD => write!(f, "FragmentMaskAMD"),
4375 Self::STENCIL_EXPORT_EXT => write!(f, "StencilExportEXT"),
4376 Self::IMAGE_READ_WRITE_LOD_AMD => write!(f, "ImageReadWriteLodAMD"),
4377 Self::INT64_IMAGE_EXT => write!(f, "Int64ImageEXT"),
4378 Self::SHADER_CLOCK_KHR => write!(f, "ShaderClockKHR"),
4379 Self::SHADER_ENQUEUE_AMDX => write!(f, "ShaderEnqueueAMDX"),
4380 Self::QUAD_CONTROL_KHR => write!(f, "QuadControlKHR"),
4381 Self::INT4_TYPE_INTEL => write!(f, "Int4TypeINTEL"),
4382 Self::INT4_COOPERATIVE_MATRIX_INTEL => write!(f, "Int4CooperativeMatrixINTEL"),
4383 Self::BFLOAT16_TYPE_KHR => write!(f, "BFloat16TypeKHR"),
4384 Self::BFLOAT16_DOT_PRODUCT_KHR => write!(f, "BFloat16DotProductKHR"),
4385 Self::BFLOAT16_COOPERATIVE_MATRIX_KHR => write!(f, "BFloat16CooperativeMatrixKHR"),
4386 Self::ABORT_KHR => write!(f, "AbortKHR"),
4387 Self::DESCRIPTOR_HEAP_EXT => write!(f, "DescriptorHeapEXT"),
4388 Self::CONSTANT_DATA_KHR => write!(f, "ConstantDataKHR"),
4389 Self::POISON_FREEZE_KHR => write!(f, "PoisonFreezeKHR"),
4390 Self::SAMPLE_MASK_OVERRIDE_COVERAGE_NV => write!(f, "SampleMaskOverrideCoverageNV"),
4391 Self::GEOMETRY_SHADER_PASSTHROUGH_NV => write!(f, "GeometryShaderPassthroughNV"),
4392 Self::SHADER_VIEWPORT_INDEX_LAYER_EXT => write!(f, "ShaderViewportIndexLayerEXT"),
4393 Self::SHADER_VIEWPORT_MASK_NV => write!(f, "ShaderViewportMaskNV"),
4394 Self::SHADER_STEREO_VIEW_NV => write!(f, "ShaderStereoViewNV"),
4395 Self::PER_VIEW_ATTRIBUTES_NV => write!(f, "PerViewAttributesNV"),
4396 Self::FRAGMENT_FULLY_COVERED_EXT => write!(f, "FragmentFullyCoveredEXT"),
4397 Self::MESH_SHADING_NV => write!(f, "MeshShadingNV"),
4398 Self::IMAGE_FOOTPRINT_NV => write!(f, "ImageFootprintNV"),
4399 Self::MESH_SHADING_EXT => write!(f, "MeshShadingEXT"),
4400 Self::FRAGMENT_BARYCENTRIC_KHR => write!(f, "FragmentBarycentricKHR"),
4401 Self::COMPUTE_DERIVATIVE_GROUP_QUADS_KHR => write!(f, "ComputeDerivativeGroupQuadsKHR"),
4402 Self::FRAGMENT_DENSITY_EXT => write!(f, "FragmentDensityEXT"),
4403 Self::GROUP_NON_UNIFORM_PARTITIONED_EXT => write!(f, "GroupNonUniformPartitionedEXT"),
4404 Self::SHADER_NON_UNIFORM => write!(f, "ShaderNonUniform"),
4405 Self::RUNTIME_DESCRIPTOR_ARRAY => write!(f, "RuntimeDescriptorArray"),
4406 Self::INPUT_ATTACHMENT_ARRAY_DYNAMIC_INDEXING => {
4407 write!(f, "InputAttachmentArrayDynamicIndexing")
4408 }
4409 Self::UNIFORM_TEXEL_BUFFER_ARRAY_DYNAMIC_INDEXING => {
4410 write!(f, "UniformTexelBufferArrayDynamicIndexing")
4411 }
4412 Self::STORAGE_TEXEL_BUFFER_ARRAY_DYNAMIC_INDEXING => {
4413 write!(f, "StorageTexelBufferArrayDynamicIndexing")
4414 }
4415 Self::UNIFORM_BUFFER_ARRAY_NON_UNIFORM_INDEXING => {
4416 write!(f, "UniformBufferArrayNonUniformIndexing")
4417 }
4418 Self::SAMPLED_IMAGE_ARRAY_NON_UNIFORM_INDEXING => {
4419 write!(f, "SampledImageArrayNonUniformIndexing")
4420 }
4421 Self::STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING => {
4422 write!(f, "StorageBufferArrayNonUniformIndexing")
4423 }
4424 Self::STORAGE_IMAGE_ARRAY_NON_UNIFORM_INDEXING => {
4425 write!(f, "StorageImageArrayNonUniformIndexing")
4426 }
4427 Self::INPUT_ATTACHMENT_ARRAY_NON_UNIFORM_INDEXING => {
4428 write!(f, "InputAttachmentArrayNonUniformIndexing")
4429 }
4430 Self::UNIFORM_TEXEL_BUFFER_ARRAY_NON_UNIFORM_INDEXING => {
4431 write!(f, "UniformTexelBufferArrayNonUniformIndexing")
4432 }
4433 Self::STORAGE_TEXEL_BUFFER_ARRAY_NON_UNIFORM_INDEXING => {
4434 write!(f, "StorageTexelBufferArrayNonUniformIndexing")
4435 }
4436 Self::RAY_TRACING_POSITION_FETCH_KHR => write!(f, "RayTracingPositionFetchKHR"),
4437 Self::RAY_TRACING_NV => write!(f, "RayTracingNV"),
4438 Self::RAY_TRACING_MOTION_BLUR_NV => write!(f, "RayTracingMotionBlurNV"),
4439 Self::VULKAN_MEMORY_MODEL => write!(f, "VulkanMemoryModel"),
4440 Self::VULKAN_MEMORY_MODEL_DEVICE_SCOPE => write!(f, "VulkanMemoryModelDeviceScope"),
4441 Self::PHYSICAL_STORAGE_BUFFER_ADDRESSES => write!(f, "PhysicalStorageBufferAddresses"),
4442 Self::COMPUTE_DERIVATIVE_GROUP_LINEAR_KHR => {
4443 write!(f, "ComputeDerivativeGroupLinearKHR")
4444 }
4445 Self::RAY_TRACING_PROVISIONAL_KHR => write!(f, "RayTracingProvisionalKHR"),
4446 Self::COOPERATIVE_MATRIX_NV => write!(f, "CooperativeMatrixNV"),
4447 Self::FRAGMENT_SHADER_SAMPLE_INTERLOCK_EXT => {
4448 write!(f, "FragmentShaderSampleInterlockEXT")
4449 }
4450 Self::FRAGMENT_SHADER_SHADING_RATE_INTERLOCK_EXT => {
4451 write!(f, "FragmentShaderShadingRateInterlockEXT")
4452 }
4453 Self::SHADER_SMBUILTINS_NV => write!(f, "ShaderSMBuiltinsNV"),
4454 Self::FRAGMENT_SHADER_PIXEL_INTERLOCK_EXT => {
4455 write!(f, "FragmentShaderPixelInterlockEXT")
4456 }
4457 Self::DEMOTE_TO_HELPER_INVOCATION => write!(f, "DemoteToHelperInvocation"),
4458 Self::DISPLACEMENT_MICROMAP_NV => write!(f, "DisplacementMicromapNV"),
4459 Self::RAY_TRACING_OPACITY_MICROMAP_EXT => write!(f, "RayTracingOpacityMicromapEXT"),
4460 Self::SHADER_INVOCATION_REORDER_NV => write!(f, "ShaderInvocationReorderNV"),
4461 Self::SHADER_INVOCATION_REORDER_EXT => write!(f, "ShaderInvocationReorderEXT"),
4462 Self::BINDLESS_TEXTURE_NV => write!(f, "BindlessTextureNV"),
4463 Self::RAY_QUERY_POSITION_FETCH_KHR => write!(f, "RayQueryPositionFetchKHR"),
4464 Self::COOPERATIVE_VECTOR_NV => write!(f, "CooperativeVectorNV"),
4465 Self::ATOMIC_FLOAT16_VECTOR_NV => write!(f, "AtomicFloat16VectorNV"),
4466 Self::RAY_TRACING_DISPLACEMENT_MICROMAP_NV => {
4467 write!(f, "RayTracingDisplacementMicromapNV")
4468 }
4469 Self::RAW_ACCESS_CHAINS_NV => write!(f, "RawAccessChainsNV"),
4470 Self::RAY_TRACING_SPHERES_GEOMETRY_NV => write!(f, "RayTracingSpheresGeometryNV"),
4471 Self::RAY_TRACING_LINEAR_SWEPT_SPHERES_GEOMETRY_NV => {
4472 write!(f, "RayTracingLinearSweptSpheresGeometryNV")
4473 }
4474 Self::PUSH_CONSTANT_BANKS_NV => write!(f, "PushConstantBanksNV"),
4475 Self::LONG_VECTOR_EXT => write!(f, "LongVectorEXT"),
4476 Self::SHADER64_BIT_INDEXING_EXT => write!(f, "Shader64BitIndexingEXT"),
4477 Self::COOPERATIVE_MATRIX_REDUCTIONS_NV => write!(f, "CooperativeMatrixReductionsNV"),
4478 Self::COOPERATIVE_MATRIX_CONVERSIONS_NV => write!(f, "CooperativeMatrixConversionsNV"),
4479 Self::COOPERATIVE_MATRIX_PER_ELEMENT_OPERATIONS_NV => {
4480 write!(f, "CooperativeMatrixPerElementOperationsNV")
4481 }
4482 Self::COOPERATIVE_MATRIX_TENSOR_ADDRESSING_NV => {
4483 write!(f, "CooperativeMatrixTensorAddressingNV")
4484 }
4485 Self::COOPERATIVE_MATRIX_BLOCK_LOADS_NV => write!(f, "CooperativeMatrixBlockLoadsNV"),
4486 Self::COOPERATIVE_VECTOR_TRAINING_NV => write!(f, "CooperativeVectorTrainingNV"),
4487 Self::RAY_TRACING_CLUSTER_ACCELERATION_STRUCTURE_NV => {
4488 write!(f, "RayTracingClusterAccelerationStructureNV")
4489 }
4490 Self::TENSOR_ADDRESSING_NV => write!(f, "TensorAddressingNV"),
4491 Self::SUBGROUP_SHUFFLE_INTEL => write!(f, "SubgroupShuffleINTEL"),
4492 Self::SUBGROUP_BUFFER_BLOCK_IOINTEL => write!(f, "SubgroupBufferBlockIOINTEL"),
4493 Self::SUBGROUP_IMAGE_BLOCK_IOINTEL => write!(f, "SubgroupImageBlockIOINTEL"),
4494 Self::SUBGROUP_IMAGE_MEDIA_BLOCK_IOINTEL => write!(f, "SubgroupImageMediaBlockIOINTEL"),
4495 Self::ROUND_TO_INFINITY_INTEL => write!(f, "RoundToInfinityINTEL"),
4496 Self::FLOATING_POINT_MODE_INTEL => write!(f, "FloatingPointModeINTEL"),
4497 Self::INTEGER_FUNCTIONS2_INTEL => write!(f, "IntegerFunctions2INTEL"),
4498 Self::FUNCTION_POINTERS_INTEL => write!(f, "FunctionPointersINTEL"),
4499 Self::INDIRECT_REFERENCES_INTEL => write!(f, "IndirectReferencesINTEL"),
4500 Self::ASM_INTEL => write!(f, "AsmINTEL"),
4501 Self::ATOMIC_FLOAT32_MIN_MAX_EXT => write!(f, "AtomicFloat32MinMaxEXT"),
4502 Self::ATOMIC_FLOAT64_MIN_MAX_EXT => write!(f, "AtomicFloat64MinMaxEXT"),
4503 Self::ATOMIC_FLOAT16_MIN_MAX_EXT => write!(f, "AtomicFloat16MinMaxEXT"),
4504 Self::VECTOR_COMPUTE_INTEL => write!(f, "VectorComputeINTEL"),
4505 Self::VECTOR_ANY_INTEL => write!(f, "VectorAnyINTEL"),
4506 Self::EXPECT_ASSUME_KHR => write!(f, "ExpectAssumeKHR"),
4507 Self::SUBGROUP_AVC_MOTION_ESTIMATION_INTEL => {
4508 write!(f, "SubgroupAvcMotionEstimationINTEL")
4509 }
4510 Self::SUBGROUP_AVC_MOTION_ESTIMATION_INTRA_INTEL => {
4511 write!(f, "SubgroupAvcMotionEstimationIntraINTEL")
4512 }
4513 Self::SUBGROUP_AVC_MOTION_ESTIMATION_CHROMA_INTEL => {
4514 write!(f, "SubgroupAvcMotionEstimationChromaINTEL")
4515 }
4516 Self::VARIABLE_LENGTH_ARRAY_INTEL => write!(f, "VariableLengthArrayINTEL"),
4517 Self::FUNCTION_FLOAT_CONTROL_INTEL => write!(f, "FunctionFloatControlINTEL"),
4518 Self::FPGAMEMORY_ATTRIBUTES_ALTERA => write!(f, "FPGAMemoryAttributesALTERA"),
4519 Self::FPFAST_MATH_MODE_INTEL => write!(f, "FPFastMathModeINTEL"),
4520 Self::ARBITRARY_PRECISION_INTEGERS_ALTERA => {
4521 write!(f, "ArbitraryPrecisionIntegersALTERA")
4522 }
4523 Self::ARBITRARY_PRECISION_FLOATING_POINT_ALTERA => {
4524 write!(f, "ArbitraryPrecisionFloatingPointALTERA")
4525 }
4526 Self::UNSTRUCTURED_LOOP_CONTROLS_INTEL => write!(f, "UnstructuredLoopControlsINTEL"),
4527 Self::FPGALOOP_CONTROLS_ALTERA => write!(f, "FPGALoopControlsALTERA"),
4528 Self::KERNEL_ATTRIBUTES_INTEL => write!(f, "KernelAttributesINTEL"),
4529 Self::FPGAKERNEL_ATTRIBUTES_INTEL => write!(f, "FPGAKernelAttributesINTEL"),
4530 Self::FPGAMEMORY_ACCESSES_ALTERA => write!(f, "FPGAMemoryAccessesALTERA"),
4531 Self::FPGACLUSTER_ATTRIBUTES_ALTERA => write!(f, "FPGAClusterAttributesALTERA"),
4532 Self::LOOP_FUSE_ALTERA => write!(f, "LoopFuseALTERA"),
4533 Self::FPGADSPCONTROL_ALTERA => write!(f, "FPGADSPControlALTERA"),
4534 Self::MEMORY_ACCESS_ALIASING_INTEL => write!(f, "MemoryAccessAliasingINTEL"),
4535 Self::FPGAINVOCATION_PIPELINING_ATTRIBUTES_ALTERA => {
4536 write!(f, "FPGAInvocationPipeliningAttributesALTERA")
4537 }
4538 Self::FPGABUFFER_LOCATION_ALTERA => write!(f, "FPGABufferLocationALTERA"),
4539 Self::ARBITRARY_PRECISION_FIXED_POINT_ALTERA => {
4540 write!(f, "ArbitraryPrecisionFixedPointALTERA")
4541 }
4542 Self::USMSTORAGE_CLASSES_ALTERA => write!(f, "USMStorageClassesALTERA"),
4543 Self::RUNTIME_ALIGNED_ATTRIBUTE_ALTERA => write!(f, "RuntimeAlignedAttributeALTERA"),
4544 Self::IOPIPES_ALTERA => write!(f, "IOPipesALTERA"),
4545 Self::BLOCKING_PIPES_ALTERA => write!(f, "BlockingPipesALTERA"),
4546 Self::FPGAREG_ALTERA => write!(f, "FPGARegALTERA"),
4547 Self::DOT_PRODUCT_INPUT_ALL => write!(f, "DotProductInputAll"),
4548 Self::DOT_PRODUCT_INPUT4X8_BIT => write!(f, "DotProductInput4x8Bit"),
4549 Self::DOT_PRODUCT_INPUT4X8_BIT_PACKED => write!(f, "DotProductInput4x8BitPacked"),
4550 Self::DOT_PRODUCT => write!(f, "DotProduct"),
4551 Self::RAY_CULL_MASK_KHR => write!(f, "RayCullMaskKHR"),
4552 Self::COOPERATIVE_MATRIX_KHR => write!(f, "CooperativeMatrixKHR"),
4553 Self::REPLICATED_COMPOSITES_EXT => write!(f, "ReplicatedCompositesEXT"),
4554 Self::BIT_INSTRUCTIONS => write!(f, "BitInstructions"),
4555 Self::GROUP_NON_UNIFORM_ROTATE_KHR => write!(f, "GroupNonUniformRotateKHR"),
4556 Self::FLOAT_CONTROLS2 => write!(f, "FloatControls2"),
4557 Self::FMAKHR => write!(f, "FMAKHR"),
4558 Self::ATOMIC_FLOAT32_ADD_EXT => write!(f, "AtomicFloat32AddEXT"),
4559 Self::ATOMIC_FLOAT64_ADD_EXT => write!(f, "AtomicFloat64AddEXT"),
4560 Self::LONG_COMPOSITES_INTEL => write!(f, "LongCompositesINTEL"),
4561 Self::OPT_NONE_EXT => write!(f, "OptNoneEXT"),
4562 Self::ATOMIC_FLOAT16_ADD_EXT => write!(f, "AtomicFloat16AddEXT"),
4563 Self::DEBUG_INFO_MODULE_INTEL => write!(f, "DebugInfoModuleINTEL"),
4564 Self::BFLOAT16_CONVERSION_INTEL => write!(f, "BFloat16ConversionINTEL"),
4565 Self::SPLIT_BARRIER_INTEL => write!(f, "SplitBarrierINTEL"),
4566 Self::ARITHMETIC_FENCE_EXT => write!(f, "ArithmeticFenceEXT"),
4567 Self::FPGACLUSTER_ATTRIBUTES_V2_ALTERA => write!(f, "FPGAClusterAttributesV2ALTERA"),
4568 Self::FPGAKERNEL_ATTRIBUTESV2_INTEL => write!(f, "FPGAKernelAttributesv2INTEL"),
4569 Self::TASK_SEQUENCE_ALTERA => write!(f, "TaskSequenceALTERA"),
4570 Self::FPMAX_ERROR_INTEL => write!(f, "FPMaxErrorINTEL"),
4571 Self::FPGALATENCY_CONTROL_ALTERA => write!(f, "FPGALatencyControlALTERA"),
4572 Self::FPGAARGUMENT_INTERFACES_ALTERA => write!(f, "FPGAArgumentInterfacesALTERA"),
4573 Self::GLOBAL_VARIABLE_HOST_ACCESS_INTEL => write!(f, "GlobalVariableHostAccessINTEL"),
4574 Self::GLOBAL_VARIABLE_FPGADECORATIONS_ALTERA => {
4575 write!(f, "GlobalVariableFPGADecorationsALTERA")
4576 }
4577 Self::SUBGROUP_BUFFER_PREFETCH_INTEL => write!(f, "SubgroupBufferPrefetchINTEL"),
4578 Self::SUBGROUP2_DBLOCK_IOINTEL => write!(f, "Subgroup2DBlockIOINTEL"),
4579 Self::SUBGROUP2_DBLOCK_TRANSFORM_INTEL => write!(f, "Subgroup2DBlockTransformINTEL"),
4580 Self::SUBGROUP2_DBLOCK_TRANSPOSE_INTEL => write!(f, "Subgroup2DBlockTransposeINTEL"),
4581 Self::SUBGROUP_MATRIX_MULTIPLY_ACCUMULATE_INTEL => {
4582 write!(f, "SubgroupMatrixMultiplyAccumulateINTEL")
4583 }
4584 Self::TERNARY_BITWISE_FUNCTION_INTEL => write!(f, "TernaryBitwiseFunctionINTEL"),
4585 Self::UNTYPED_VARIABLE_LENGTH_ARRAY_INTEL => {
4586 write!(f, "UntypedVariableLengthArrayINTEL")
4587 }
4588 Self::SPEC_CONDITIONAL_INTEL => write!(f, "SpecConditionalINTEL"),
4589 Self::FUNCTION_VARIANTS_INTEL => write!(f, "FunctionVariantsINTEL"),
4590 Self::GROUP_UNIFORM_ARITHMETIC_KHR => write!(f, "GroupUniformArithmeticKHR"),
4591 Self::TENSOR_FLOAT32_ROUNDING_INTEL => write!(f, "TensorFloat32RoundingINTEL"),
4592 Self::MASKED_GATHER_SCATTER_INTEL => write!(f, "MaskedGatherScatterINTEL"),
4593 Self::CACHE_CONTROLS_INTEL => write!(f, "CacheControlsINTEL"),
4594 Self::REGISTER_LIMITS_INTEL => write!(f, "RegisterLimitsINTEL"),
4595 Self::BINDLESS_IMAGES_INTEL => write!(f, "BindlessImagesINTEL"),
4596 Self::DOT_PRODUCT_FLOAT16_ACC_FLOAT32_VALVE => {
4597 write!(f, "DotProductFloat16AccFloat32VALVE")
4598 }
4599 Self::DOT_PRODUCT_FLOAT16_ACC_FLOAT16_VALVE => {
4600 write!(f, "DotProductFloat16AccFloat16VALVE")
4601 }
4602 Self::DOT_PRODUCT_BFLOAT16_ACC_VALVE => write!(f, "DotProductBFloat16AccVALVE"),
4603 Self::DOT_PRODUCT_FLOAT8_ACC_FLOAT32_VALVE => {
4604 write!(f, "DotProductFloat8AccFloat32VALVE")
4605 }
4606 x => write!(f, "{x}"),
4607 }
4608 }
4609}
4610#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4611pub struct RayQueryIntersection(pub(crate) u32);
4612impl RayQueryIntersection {
4613 pub const RAY_QUERY_CANDIDATE_INTERSECTION_KHR: Self = Self(0u32);
4614 pub const RAY_QUERY_COMMITTED_INTERSECTION_KHR: Self = Self(1u32);
4615}
4616impl Word for RayQueryIntersection {
4617 #[inline]
4618 fn from_word(word: u32) -> Self {
4619 Self(word)
4620 }
4621}
4622impl Display for RayQueryIntersection {
4623 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4624 match *self {
4625 Self::RAY_QUERY_CANDIDATE_INTERSECTION_KHR => {
4626 write!(f, "RayQueryCandidateIntersectionKHR")
4627 }
4628 Self::RAY_QUERY_COMMITTED_INTERSECTION_KHR => {
4629 write!(f, "RayQueryCommittedIntersectionKHR")
4630 }
4631 x => write!(f, "{x}"),
4632 }
4633 }
4634}
4635#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4636pub struct RayQueryCommittedIntersectionType(pub(crate) u32);
4637impl RayQueryCommittedIntersectionType {
4638 pub const RAY_QUERY_COMMITTED_INTERSECTION_NONE_KHR: Self = Self(0u32);
4639 pub const RAY_QUERY_COMMITTED_INTERSECTION_TRIANGLE_KHR: Self = Self(1u32);
4640 pub const RAY_QUERY_COMMITTED_INTERSECTION_GENERATED_KHR: Self = Self(2u32);
4641}
4642impl Word for RayQueryCommittedIntersectionType {
4643 #[inline]
4644 fn from_word(word: u32) -> Self {
4645 Self(word)
4646 }
4647}
4648impl Display for RayQueryCommittedIntersectionType {
4649 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4650 match *self {
4651 Self::RAY_QUERY_COMMITTED_INTERSECTION_NONE_KHR => {
4652 write!(f, "RayQueryCommittedIntersectionNoneKHR")
4653 }
4654 Self::RAY_QUERY_COMMITTED_INTERSECTION_TRIANGLE_KHR => {
4655 write!(f, "RayQueryCommittedIntersectionTriangleKHR")
4656 }
4657 Self::RAY_QUERY_COMMITTED_INTERSECTION_GENERATED_KHR => {
4658 write!(f, "RayQueryCommittedIntersectionGeneratedKHR")
4659 }
4660 x => write!(f, "{x}"),
4661 }
4662 }
4663}
4664#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4665pub struct RayQueryCandidateIntersectionType(pub(crate) u32);
4666impl RayQueryCandidateIntersectionType {
4667 pub const RAY_QUERY_CANDIDATE_INTERSECTION_TRIANGLE_KHR: Self = Self(0u32);
4668 pub const RAY_QUERY_CANDIDATE_INTERSECTION_AABBKHR: Self = Self(1u32);
4669}
4670impl Word for RayQueryCandidateIntersectionType {
4671 #[inline]
4672 fn from_word(word: u32) -> Self {
4673 Self(word)
4674 }
4675}
4676impl Display for RayQueryCandidateIntersectionType {
4677 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4678 match *self {
4679 Self::RAY_QUERY_CANDIDATE_INTERSECTION_TRIANGLE_KHR => {
4680 write!(f, "RayQueryCandidateIntersectionTriangleKHR")
4681 }
4682 Self::RAY_QUERY_CANDIDATE_INTERSECTION_AABBKHR => {
4683 write!(f, "RayQueryCandidateIntersectionAABBKHR")
4684 }
4685 x => write!(f, "{x}"),
4686 }
4687 }
4688}
4689#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4690pub struct PackedVectorFormat(pub(crate) u32);
4691impl PackedVectorFormat {
4692 pub const PACKED_VECTOR_FORMAT4X8_BIT: Self = Self(0u32);
4693}
4694impl Word for PackedVectorFormat {
4695 #[inline]
4696 fn from_word(word: u32) -> Self {
4697 Self(word)
4698 }
4699}
4700impl Display for PackedVectorFormat {
4701 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4702 match *self {
4703 Self::PACKED_VECTOR_FORMAT4X8_BIT => write!(f, "PackedVectorFormat4x8Bit"),
4704 x => write!(f, "{x}"),
4705 }
4706 }
4707}
4708#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4709pub struct CooperativeMatrixOperands(pub(crate) u32);
4710impl CooperativeMatrixOperands {
4711 pub const NONE_KHR: Self = Self(0x0000);
4712 pub const MATRIX_ASIGNED_COMPONENTS_KHR: Self = Self(0x0001);
4713 pub const MATRIX_BSIGNED_COMPONENTS_KHR: Self = Self(0x0002);
4714 pub const MATRIX_CSIGNED_COMPONENTS_KHR: Self = Self(0x0004);
4715 pub const MATRIX_RESULT_SIGNED_COMPONENTS_KHR: Self = Self(0x0008);
4716 pub const SATURATING_ACCUMULATION_KHR: Self = Self(0x0010);
4717}
4718impl Word for CooperativeMatrixOperands {
4719 #[inline]
4720 fn from_word(word: u32) -> Self {
4721 Self(word)
4722 }
4723}
4724impl BitAnd for CooperativeMatrixOperands {
4725 type Output = Self;
4726 #[inline]
4727 fn bitand(self, rhs: Self) -> Self {
4728 Self(self.0 & rhs.0)
4729 }
4730}
4731impl BitOr for CooperativeMatrixOperands {
4732 type Output = Self;
4733 #[inline]
4734 fn bitor(self, rhs: Self) -> Self {
4735 Self(self.0 | rhs.0)
4736 }
4737}
4738impl Display for CooperativeMatrixOperands {
4739 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4740 if self.0 == 0 {
4741 return write!(f, "None");
4742 }
4743 let mut bitfmt = BitFmt(0);
4744 if *self & Self::MATRIX_ASIGNED_COMPONENTS_KHR == Self::MATRIX_ASIGNED_COMPONENTS_KHR {
4745 bitfmt.fmt(Self::MATRIX_ASIGNED_COMPONENTS_KHR.0, f)?;
4746 write!(f, "MatrixASignedComponentsKHR")?;
4747 }
4748 if *self & Self::MATRIX_BSIGNED_COMPONENTS_KHR == Self::MATRIX_BSIGNED_COMPONENTS_KHR {
4749 bitfmt.fmt(Self::MATRIX_BSIGNED_COMPONENTS_KHR.0, f)?;
4750 write!(f, "MatrixBSignedComponentsKHR")?;
4751 }
4752 if *self & Self::MATRIX_CSIGNED_COMPONENTS_KHR == Self::MATRIX_CSIGNED_COMPONENTS_KHR {
4753 bitfmt.fmt(Self::MATRIX_CSIGNED_COMPONENTS_KHR.0, f)?;
4754 write!(f, "MatrixCSignedComponentsKHR")?;
4755 }
4756 if *self & Self::MATRIX_RESULT_SIGNED_COMPONENTS_KHR
4757 == Self::MATRIX_RESULT_SIGNED_COMPONENTS_KHR
4758 {
4759 bitfmt.fmt(Self::MATRIX_RESULT_SIGNED_COMPONENTS_KHR.0, f)?;
4760 write!(f, "MatrixResultSignedComponentsKHR")?;
4761 }
4762 if *self & Self::SATURATING_ACCUMULATION_KHR == Self::SATURATING_ACCUMULATION_KHR {
4763 bitfmt.fmt(Self::SATURATING_ACCUMULATION_KHR.0, f)?;
4764 write!(f, "SaturatingAccumulationKHR")?;
4765 }
4766 Ok(())
4767 }
4768}
4769#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4770pub struct CooperativeMatrixLayout(pub(crate) u32);
4771impl CooperativeMatrixLayout {
4772 pub const ROW_MAJOR_KHR: Self = Self(0u32);
4773 pub const COLUMN_MAJOR_KHR: Self = Self(1u32);
4774 pub const ROW_BLOCKED_INTERLEAVED_ARM: Self = Self(4202u32);
4775 pub const COLUMN_BLOCKED_INTERLEAVED_ARM: Self = Self(4203u32);
4776}
4777impl Word for CooperativeMatrixLayout {
4778 #[inline]
4779 fn from_word(word: u32) -> Self {
4780 Self(word)
4781 }
4782}
4783impl Display for CooperativeMatrixLayout {
4784 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4785 match *self {
4786 Self::ROW_MAJOR_KHR => write!(f, "RowMajorKHR"),
4787 Self::COLUMN_MAJOR_KHR => write!(f, "ColumnMajorKHR"),
4788 Self::ROW_BLOCKED_INTERLEAVED_ARM => write!(f, "RowBlockedInterleavedARM"),
4789 Self::COLUMN_BLOCKED_INTERLEAVED_ARM => write!(f, "ColumnBlockedInterleavedARM"),
4790 x => write!(f, "{x}"),
4791 }
4792 }
4793}
4794#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4795pub struct CooperativeMatrixUse(pub(crate) u32);
4796impl CooperativeMatrixUse {
4797 pub const MATRIX_AKHR: Self = Self(0u32);
4798 pub const MATRIX_BKHR: Self = Self(1u32);
4799 pub const MATRIX_ACCUMULATOR_KHR: Self = Self(2u32);
4800}
4801impl Word for CooperativeMatrixUse {
4802 #[inline]
4803 fn from_word(word: u32) -> Self {
4804 Self(word)
4805 }
4806}
4807impl Display for CooperativeMatrixUse {
4808 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4809 match *self {
4810 Self::MATRIX_AKHR => write!(f, "MatrixAKHR"),
4811 Self::MATRIX_BKHR => write!(f, "MatrixBKHR"),
4812 Self::MATRIX_ACCUMULATOR_KHR => write!(f, "MatrixAccumulatorKHR"),
4813 x => write!(f, "{x}"),
4814 }
4815 }
4816}
4817#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4818pub struct CooperativeMatrixReduce(pub(crate) u32);
4819impl CooperativeMatrixReduce {
4820 pub const ROW: Self = Self(0x0001);
4821 pub const COLUMN: Self = Self(0x0002);
4822 pub const TYPE_2X2: Self = Self(0x0004);
4823}
4824impl Word for CooperativeMatrixReduce {
4825 #[inline]
4826 fn from_word(word: u32) -> Self {
4827 Self(word)
4828 }
4829}
4830impl BitAnd for CooperativeMatrixReduce {
4831 type Output = Self;
4832 #[inline]
4833 fn bitand(self, rhs: Self) -> Self {
4834 Self(self.0 & rhs.0)
4835 }
4836}
4837impl BitOr for CooperativeMatrixReduce {
4838 type Output = Self;
4839 #[inline]
4840 fn bitor(self, rhs: Self) -> Self {
4841 Self(self.0 | rhs.0)
4842 }
4843}
4844impl Display for CooperativeMatrixReduce {
4845 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4846 if self.0 == 0 {
4847 return write!(f, "None");
4848 }
4849 let mut bitfmt = BitFmt(0);
4850 if *self & Self::ROW == Self::ROW {
4851 bitfmt.fmt(Self::ROW.0, f)?;
4852 write!(f, "Row")?;
4853 }
4854 if *self & Self::COLUMN == Self::COLUMN {
4855 bitfmt.fmt(Self::COLUMN.0, f)?;
4856 write!(f, "Column")?;
4857 }
4858 if *self & Self::TYPE_2X2 == Self::TYPE_2X2 {
4859 bitfmt.fmt(Self::TYPE_2X2.0, f)?;
4860 write!(f, "2x2")?;
4861 }
4862 Ok(())
4863 }
4864}
4865#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4866pub struct TensorClampMode(pub(crate) u32);
4867impl TensorClampMode {
4868 pub const UNDEFINED: Self = Self(0u32);
4869 pub const CONSTANT: Self = Self(1u32);
4870 pub const CLAMP_TO_EDGE: Self = Self(2u32);
4871 pub const REPEAT: Self = Self(3u32);
4872 pub const REPEAT_MIRRORED: Self = Self(4u32);
4873}
4874impl Word for TensorClampMode {
4875 #[inline]
4876 fn from_word(word: u32) -> Self {
4877 Self(word)
4878 }
4879}
4880impl Display for TensorClampMode {
4881 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4882 match *self {
4883 Self::UNDEFINED => write!(f, "Undefined"),
4884 Self::CONSTANT => write!(f, "Constant"),
4885 Self::CLAMP_TO_EDGE => write!(f, "ClampToEdge"),
4886 Self::REPEAT => write!(f, "Repeat"),
4887 Self::REPEAT_MIRRORED => write!(f, "RepeatMirrored"),
4888 x => write!(f, "{x}"),
4889 }
4890 }
4891}
4892#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4893pub struct TensorAddressingOperands(pub(crate) u32);
4894impl TensorAddressingOperands {
4895 pub const NONE: Self = Self(0x0000);
4896 pub const TENSOR_VIEW: Self = Self(0x0001);
4897 pub const DECODE_FUNC: Self = Self(0x0002);
4898}
4899impl Word for TensorAddressingOperands {
4900 #[inline]
4901 fn from_word(word: u32) -> Self {
4902 Self(word)
4903 }
4904}
4905impl BitAnd for TensorAddressingOperands {
4906 type Output = Self;
4907 #[inline]
4908 fn bitand(self, rhs: Self) -> Self {
4909 Self(self.0 & rhs.0)
4910 }
4911}
4912impl BitOr for TensorAddressingOperands {
4913 type Output = Self;
4914 #[inline]
4915 fn bitor(self, rhs: Self) -> Self {
4916 Self(self.0 | rhs.0)
4917 }
4918}
4919impl Display for TensorAddressingOperands {
4920 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4921 if self.0 == 0 {
4922 return write!(f, "None");
4923 }
4924 let mut bitfmt = BitFmt(0);
4925 if *self & Self::TENSOR_VIEW == Self::TENSOR_VIEW {
4926 bitfmt.fmt(Self::TENSOR_VIEW.0, f)?;
4927 write!(f, "TensorView")?;
4928 }
4929 if *self & Self::DECODE_FUNC == Self::DECODE_FUNC {
4930 bitfmt.fmt(Self::DECODE_FUNC.0, f)?;
4931 write!(f, "DecodeFunc")?;
4932 }
4933 Ok(())
4934 }
4935}
4936#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4937pub struct InitializationModeQualifier(pub(crate) u32);
4938impl InitializationModeQualifier {
4939 pub const INIT_ON_DEVICE_REPROGRAM_ALTERA: Self = Self(0u32);
4940 pub const INIT_ON_DEVICE_RESET_ALTERA: Self = Self(1u32);
4941}
4942impl Word for InitializationModeQualifier {
4943 #[inline]
4944 fn from_word(word: u32) -> Self {
4945 Self(word)
4946 }
4947}
4948impl Display for InitializationModeQualifier {
4949 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4950 match *self {
4951 Self::INIT_ON_DEVICE_REPROGRAM_ALTERA => write!(f, "InitOnDeviceReprogramALTERA"),
4952 Self::INIT_ON_DEVICE_RESET_ALTERA => write!(f, "InitOnDeviceResetALTERA"),
4953 x => write!(f, "{x}"),
4954 }
4955 }
4956}
4957#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4958pub struct LoadCacheControl(pub(crate) u32);
4959impl LoadCacheControl {
4960 pub const UNCACHED_INTEL: Self = Self(0u32);
4961 pub const CACHED_INTEL: Self = Self(1u32);
4962 pub const STREAMING_INTEL: Self = Self(2u32);
4963 pub const INVALIDATE_AFTER_READ_INTEL: Self = Self(3u32);
4964 pub const CONST_CACHED_INTEL: Self = Self(4u32);
4965}
4966impl Word for LoadCacheControl {
4967 #[inline]
4968 fn from_word(word: u32) -> Self {
4969 Self(word)
4970 }
4971}
4972impl Display for LoadCacheControl {
4973 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4974 match *self {
4975 Self::UNCACHED_INTEL => write!(f, "UncachedINTEL"),
4976 Self::CACHED_INTEL => write!(f, "CachedINTEL"),
4977 Self::STREAMING_INTEL => write!(f, "StreamingINTEL"),
4978 Self::INVALIDATE_AFTER_READ_INTEL => write!(f, "InvalidateAfterReadINTEL"),
4979 Self::CONST_CACHED_INTEL => write!(f, "ConstCachedINTEL"),
4980 x => write!(f, "{x}"),
4981 }
4982 }
4983}
4984#[derive(Clone, Copy, PartialEq, Eq, Debug)]
4985pub struct StoreCacheControl(pub(crate) u32);
4986impl StoreCacheControl {
4987 pub const UNCACHED_INTEL: Self = Self(0u32);
4988 pub const WRITE_THROUGH_INTEL: Self = Self(1u32);
4989 pub const WRITE_BACK_INTEL: Self = Self(2u32);
4990 pub const STREAMING_INTEL: Self = Self(3u32);
4991}
4992impl Word for StoreCacheControl {
4993 #[inline]
4994 fn from_word(word: u32) -> Self {
4995 Self(word)
4996 }
4997}
4998impl Display for StoreCacheControl {
4999 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5000 match *self {
5001 Self::UNCACHED_INTEL => write!(f, "UncachedINTEL"),
5002 Self::WRITE_THROUGH_INTEL => write!(f, "WriteThroughINTEL"),
5003 Self::WRITE_BACK_INTEL => write!(f, "WriteBackINTEL"),
5004 Self::STREAMING_INTEL => write!(f, "StreamingINTEL"),
5005 x => write!(f, "{x}"),
5006 }
5007 }
5008}
5009#[derive(Clone, Copy, PartialEq, Eq, Debug)]
5010pub struct NamedMaximumNumberOfRegisters(pub(crate) u32);
5011impl NamedMaximumNumberOfRegisters {
5012 pub const AUTO_INTEL: Self = Self(0u32);
5013}
5014impl Word for NamedMaximumNumberOfRegisters {
5015 #[inline]
5016 fn from_word(word: u32) -> Self {
5017 Self(word)
5018 }
5019}
5020impl Display for NamedMaximumNumberOfRegisters {
5021 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5022 match *self {
5023 Self::AUTO_INTEL => write!(f, "AutoINTEL"),
5024 x => write!(f, "{x}"),
5025 }
5026 }
5027}
5028#[derive(Clone, Copy, PartialEq, Eq, Debug)]
5029pub struct MatrixMultiplyAccumulateOperands(pub(crate) u32);
5030impl MatrixMultiplyAccumulateOperands {
5031 pub const NONE: Self = Self(0x0);
5032 pub const MATRIX_ASIGNED_COMPONENTS_INTEL: Self = Self(0x1);
5033 pub const MATRIX_BSIGNED_COMPONENTS_INTEL: Self = Self(0x2);
5034 pub const MATRIX_CBFLOAT16_INTEL: Self = Self(0x4);
5035 pub const MATRIX_RESULT_BFLOAT16_INTEL: Self = Self(0x8);
5036 pub const MATRIX_APACKED_INT8_INTEL: Self = Self(0x10);
5037 pub const MATRIX_BPACKED_INT8_INTEL: Self = Self(0x20);
5038 pub const MATRIX_APACKED_INT4_INTEL: Self = Self(0x40);
5039 pub const MATRIX_BPACKED_INT4_INTEL: Self = Self(0x80);
5040 pub const MATRIX_ATF32_INTEL: Self = Self(0x100);
5041 pub const MATRIX_BTF32_INTEL: Self = Self(0x200);
5042 pub const MATRIX_APACKED_FLOAT16_INTEL: Self = Self(0x400);
5043 pub const MATRIX_BPACKED_FLOAT16_INTEL: Self = Self(0x800);
5044 pub const MATRIX_APACKED_BFLOAT16_INTEL: Self = Self(0x1000);
5045 pub const MATRIX_BPACKED_BFLOAT16_INTEL: Self = Self(0x2000);
5046}
5047impl Word for MatrixMultiplyAccumulateOperands {
5048 #[inline]
5049 fn from_word(word: u32) -> Self {
5050 Self(word)
5051 }
5052}
5053impl BitAnd for MatrixMultiplyAccumulateOperands {
5054 type Output = Self;
5055 #[inline]
5056 fn bitand(self, rhs: Self) -> Self {
5057 Self(self.0 & rhs.0)
5058 }
5059}
5060impl BitOr for MatrixMultiplyAccumulateOperands {
5061 type Output = Self;
5062 #[inline]
5063 fn bitor(self, rhs: Self) -> Self {
5064 Self(self.0 | rhs.0)
5065 }
5066}
5067impl Display for MatrixMultiplyAccumulateOperands {
5068 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5069 if self.0 == 0 {
5070 return write!(f, "None");
5071 }
5072 let mut bitfmt = BitFmt(0);
5073 if *self & Self::MATRIX_ASIGNED_COMPONENTS_INTEL == Self::MATRIX_ASIGNED_COMPONENTS_INTEL {
5074 bitfmt.fmt(Self::MATRIX_ASIGNED_COMPONENTS_INTEL.0, f)?;
5075 write!(f, "MatrixASignedComponentsINTEL")?;
5076 }
5077 if *self & Self::MATRIX_BSIGNED_COMPONENTS_INTEL == Self::MATRIX_BSIGNED_COMPONENTS_INTEL {
5078 bitfmt.fmt(Self::MATRIX_BSIGNED_COMPONENTS_INTEL.0, f)?;
5079 write!(f, "MatrixBSignedComponentsINTEL")?;
5080 }
5081 if *self & Self::MATRIX_CBFLOAT16_INTEL == Self::MATRIX_CBFLOAT16_INTEL {
5082 bitfmt.fmt(Self::MATRIX_CBFLOAT16_INTEL.0, f)?;
5083 write!(f, "MatrixCBFloat16INTEL")?;
5084 }
5085 if *self & Self::MATRIX_RESULT_BFLOAT16_INTEL == Self::MATRIX_RESULT_BFLOAT16_INTEL {
5086 bitfmt.fmt(Self::MATRIX_RESULT_BFLOAT16_INTEL.0, f)?;
5087 write!(f, "MatrixResultBFloat16INTEL")?;
5088 }
5089 if *self & Self::MATRIX_APACKED_INT8_INTEL == Self::MATRIX_APACKED_INT8_INTEL {
5090 bitfmt.fmt(Self::MATRIX_APACKED_INT8_INTEL.0, f)?;
5091 write!(f, "MatrixAPackedInt8INTEL")?;
5092 }
5093 if *self & Self::MATRIX_BPACKED_INT8_INTEL == Self::MATRIX_BPACKED_INT8_INTEL {
5094 bitfmt.fmt(Self::MATRIX_BPACKED_INT8_INTEL.0, f)?;
5095 write!(f, "MatrixBPackedInt8INTEL")?;
5096 }
5097 if *self & Self::MATRIX_APACKED_INT4_INTEL == Self::MATRIX_APACKED_INT4_INTEL {
5098 bitfmt.fmt(Self::MATRIX_APACKED_INT4_INTEL.0, f)?;
5099 write!(f, "MatrixAPackedInt4INTEL")?;
5100 }
5101 if *self & Self::MATRIX_BPACKED_INT4_INTEL == Self::MATRIX_BPACKED_INT4_INTEL {
5102 bitfmt.fmt(Self::MATRIX_BPACKED_INT4_INTEL.0, f)?;
5103 write!(f, "MatrixBPackedInt4INTEL")?;
5104 }
5105 if *self & Self::MATRIX_ATF32_INTEL == Self::MATRIX_ATF32_INTEL {
5106 bitfmt.fmt(Self::MATRIX_ATF32_INTEL.0, f)?;
5107 write!(f, "MatrixATF32INTEL")?;
5108 }
5109 if *self & Self::MATRIX_BTF32_INTEL == Self::MATRIX_BTF32_INTEL {
5110 bitfmt.fmt(Self::MATRIX_BTF32_INTEL.0, f)?;
5111 write!(f, "MatrixBTF32INTEL")?;
5112 }
5113 if *self & Self::MATRIX_APACKED_FLOAT16_INTEL == Self::MATRIX_APACKED_FLOAT16_INTEL {
5114 bitfmt.fmt(Self::MATRIX_APACKED_FLOAT16_INTEL.0, f)?;
5115 write!(f, "MatrixAPackedFloat16INTEL")?;
5116 }
5117 if *self & Self::MATRIX_BPACKED_FLOAT16_INTEL == Self::MATRIX_BPACKED_FLOAT16_INTEL {
5118 bitfmt.fmt(Self::MATRIX_BPACKED_FLOAT16_INTEL.0, f)?;
5119 write!(f, "MatrixBPackedFloat16INTEL")?;
5120 }
5121 if *self & Self::MATRIX_APACKED_BFLOAT16_INTEL == Self::MATRIX_APACKED_BFLOAT16_INTEL {
5122 bitfmt.fmt(Self::MATRIX_APACKED_BFLOAT16_INTEL.0, f)?;
5123 write!(f, "MatrixAPackedBFloat16INTEL")?;
5124 }
5125 if *self & Self::MATRIX_BPACKED_BFLOAT16_INTEL == Self::MATRIX_BPACKED_BFLOAT16_INTEL {
5126 bitfmt.fmt(Self::MATRIX_BPACKED_BFLOAT16_INTEL.0, f)?;
5127 write!(f, "MatrixBPackedBFloat16INTEL")?;
5128 }
5129 Ok(())
5130 }
5131}
5132#[derive(Clone, Copy, PartialEq, Eq, Debug)]
5133pub struct FPEncoding(pub(crate) u32);
5134impl FPEncoding {
5135 pub const BFLOAT16_KHR: Self = Self(0u32);
5136 pub const FLOAT8_E4_M3_EXT: Self = Self(4214u32);
5137 pub const FLOAT8_E5_M2_EXT: Self = Self(4215u32);
5138}
5139impl Word for FPEncoding {
5140 #[inline]
5141 fn from_word(word: u32) -> Self {
5142 Self(word)
5143 }
5144}
5145impl Display for FPEncoding {
5146 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5147 match *self {
5148 Self::BFLOAT16_KHR => write!(f, "BFloat16KHR"),
5149 Self::FLOAT8_E4_M3_EXT => write!(f, "Float8E4M3EXT"),
5150 Self::FLOAT8_E5_M2_EXT => write!(f, "Float8E5M2EXT"),
5151 x => write!(f, "{x}"),
5152 }
5153 }
5154}
5155#[derive(Clone, Copy, PartialEq, Eq, Debug)]
5156pub struct CooperativeVectorMatrixLayout(pub(crate) u32);
5157impl CooperativeVectorMatrixLayout {
5158 pub const ROW_MAJOR_NV: Self = Self(0u32);
5159 pub const COLUMN_MAJOR_NV: Self = Self(1u32);
5160 pub const INFERENCING_OPTIMAL_NV: Self = Self(2u32);
5161 pub const TRAINING_OPTIMAL_NV: Self = Self(3u32);
5162}
5163impl Word for CooperativeVectorMatrixLayout {
5164 #[inline]
5165 fn from_word(word: u32) -> Self {
5166 Self(word)
5167 }
5168}
5169impl Display for CooperativeVectorMatrixLayout {
5170 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5171 match *self {
5172 Self::ROW_MAJOR_NV => write!(f, "RowMajorNV"),
5173 Self::COLUMN_MAJOR_NV => write!(f, "ColumnMajorNV"),
5174 Self::INFERENCING_OPTIMAL_NV => write!(f, "InferencingOptimalNV"),
5175 Self::TRAINING_OPTIMAL_NV => write!(f, "TrainingOptimalNV"),
5176 x => write!(f, "{x}"),
5177 }
5178 }
5179}
5180#[derive(Clone, Copy, PartialEq, Eq, Debug)]
5181pub struct ComponentType(pub(crate) u32);
5182impl ComponentType {
5183 pub const FLOAT16_NV: Self = Self(0u32);
5184 pub const FLOAT32_NV: Self = Self(1u32);
5185 pub const FLOAT64_NV: Self = Self(2u32);
5186 pub const SIGNED_INT8_NV: Self = Self(3u32);
5187 pub const SIGNED_INT16_NV: Self = Self(4u32);
5188 pub const SIGNED_INT32_NV: Self = Self(5u32);
5189 pub const SIGNED_INT64_NV: Self = Self(6u32);
5190 pub const UNSIGNED_INT8_NV: Self = Self(7u32);
5191 pub const UNSIGNED_INT16_NV: Self = Self(8u32);
5192 pub const UNSIGNED_INT32_NV: Self = Self(9u32);
5193 pub const UNSIGNED_INT64_NV: Self = Self(10u32);
5194 pub const SIGNED_INT8_PACKED_NV: Self = Self(1000491000u32);
5195 pub const UNSIGNED_INT8_PACKED_NV: Self = Self(1000491001u32);
5196 pub const FLOAT_E4_M3_NV: Self = Self(1000491002u32);
5197 pub const FLOAT_E5_M2_NV: Self = Self(1000491003u32);
5198}
5199impl Word for ComponentType {
5200 #[inline]
5201 fn from_word(word: u32) -> Self {
5202 Self(word)
5203 }
5204}
5205impl Display for ComponentType {
5206 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5207 match *self {
5208 Self::FLOAT16_NV => write!(f, "Float16NV"),
5209 Self::FLOAT32_NV => write!(f, "Float32NV"),
5210 Self::FLOAT64_NV => write!(f, "Float64NV"),
5211 Self::SIGNED_INT8_NV => write!(f, "SignedInt8NV"),
5212 Self::SIGNED_INT16_NV => write!(f, "SignedInt16NV"),
5213 Self::SIGNED_INT32_NV => write!(f, "SignedInt32NV"),
5214 Self::SIGNED_INT64_NV => write!(f, "SignedInt64NV"),
5215 Self::UNSIGNED_INT8_NV => write!(f, "UnsignedInt8NV"),
5216 Self::UNSIGNED_INT16_NV => write!(f, "UnsignedInt16NV"),
5217 Self::UNSIGNED_INT32_NV => write!(f, "UnsignedInt32NV"),
5218 Self::UNSIGNED_INT64_NV => write!(f, "UnsignedInt64NV"),
5219 Self::SIGNED_INT8_PACKED_NV => write!(f, "SignedInt8PackedNV"),
5220 Self::UNSIGNED_INT8_PACKED_NV => write!(f, "UnsignedInt8PackedNV"),
5221 Self::FLOAT_E4_M3_NV => write!(f, "FloatE4M3NV"),
5222 Self::FLOAT_E5_M2_NV => write!(f, "FloatE5M2NV"),
5223 x => write!(f, "{x}"),
5224 }
5225 }
5226}
5227#[derive(Clone, Copy, PartialEq, Eq, Debug)]
5228pub struct TensorOperands(pub(crate) u32);
5229impl TensorOperands {
5230 pub const NONE_ARM: Self = Self(0x0000);
5231 pub const NONTEMPORAL_ARM: Self = Self(0x0001);
5232 pub const OUT_OF_BOUNDS_VALUE_ARM: Self = Self(0x0002);
5233 pub const MAKE_ELEMENT_AVAILABLE_ARM: Self = Self(0x0004);
5234 pub const MAKE_ELEMENT_VISIBLE_ARM: Self = Self(0x0008);
5235 pub const NON_PRIVATE_ELEMENT_ARM: Self = Self(0x0010);
5236}
5237impl Word for TensorOperands {
5238 #[inline]
5239 fn from_word(word: u32) -> Self {
5240 Self(word)
5241 }
5242}
5243impl BitAnd for TensorOperands {
5244 type Output = Self;
5245 #[inline]
5246 fn bitand(self, rhs: Self) -> Self {
5247 Self(self.0 & rhs.0)
5248 }
5249}
5250impl BitOr for TensorOperands {
5251 type Output = Self;
5252 #[inline]
5253 fn bitor(self, rhs: Self) -> Self {
5254 Self(self.0 | rhs.0)
5255 }
5256}
5257impl Display for TensorOperands {
5258 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5259 if self.0 == 0 {
5260 return write!(f, "None");
5261 }
5262 let mut bitfmt = BitFmt(0);
5263 if *self & Self::NONTEMPORAL_ARM == Self::NONTEMPORAL_ARM {
5264 bitfmt.fmt(Self::NONTEMPORAL_ARM.0, f)?;
5265 write!(f, "NontemporalARM")?;
5266 }
5267 if *self & Self::OUT_OF_BOUNDS_VALUE_ARM == Self::OUT_OF_BOUNDS_VALUE_ARM {
5268 bitfmt.fmt(Self::OUT_OF_BOUNDS_VALUE_ARM.0, f)?;
5269 write!(f, "OutOfBoundsValueARM")?;
5270 }
5271 if *self & Self::MAKE_ELEMENT_AVAILABLE_ARM == Self::MAKE_ELEMENT_AVAILABLE_ARM {
5272 bitfmt.fmt(Self::MAKE_ELEMENT_AVAILABLE_ARM.0, f)?;
5273 write!(f, "MakeElementAvailableARM")?;
5274 }
5275 if *self & Self::MAKE_ELEMENT_VISIBLE_ARM == Self::MAKE_ELEMENT_VISIBLE_ARM {
5276 bitfmt.fmt(Self::MAKE_ELEMENT_VISIBLE_ARM.0, f)?;
5277 write!(f, "MakeElementVisibleARM")?;
5278 }
5279 if *self & Self::NON_PRIVATE_ELEMENT_ARM == Self::NON_PRIVATE_ELEMENT_ARM {
5280 bitfmt.fmt(Self::NON_PRIVATE_ELEMENT_ARM.0, f)?;
5281 write!(f, "NonPrivateElementARM")?;
5282 }
5283 Ok(())
5284 }
5285}