pub enum Section {
Prelude,
Debug,
Annotations,
Types,
Code,
}Expand description
Where an instruction goes in SPIR-V’s required logical layout.
The order of the variants is the order of the sections in the
emitted module, and Builder::finish concatenates them in
declaration order – so a section cannot be emitted out of place by
forgetting to sort.
Variants§
Prelude
Capabilities, memory model, entry points, execution modes.
Debug
OpName / OpMemberName. Stripped by nothing here, but they
make spirv-dis output readable, which is the only way to
review a hand-built module.
Annotations
OpDecorate / OpMemberDecorate.
Types
Types, constants, and every non-Function OpVariable.
Code
Function definitions.
Trait Implementations§
impl Copy for Section
impl Eq for Section
impl StructuralPartialEq for Section
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnsafeUnpin for Section
impl UnwindSafe for Section
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more