pub enum Variable {
Input {
name: Option<String>,
location: InterfaceLocation,
ty: Type,
},
Output {
name: Option<String>,
location: InterfaceLocation,
ty: Type,
},
Descriptor {
name: Option<String>,
desc_bind: DescriptorBinding,
desc_ty: DescriptorType,
ty: Type,
nbind: u32,
},
PushConstant {
name: Option<String>,
ty: Type,
},
SpecConstant {
name: Option<String>,
spec_id: SpecId,
ty: Type,
},
}Expand description
A SPIR-V variable - interface variables, descriptor resources and push constants.
Variants§
Input
Input interface variable.
Fields
§
location: InterfaceLocationOutput
Output interface variable.
Fields
§
location: InterfaceLocationDescriptor
Descriptor resource.
Fields
§
desc_bind: DescriptorBinding§
desc_ty: DescriptorTypeDescriptor resource type matching VkDescriptorType.
§
nbind: u32Number of bindings at the binding point. All descriptors can have multiple binding points. If the multi-binding is dynamic, 0 will be returned.
For more information about dynamic multi-binding, please refer to
Vulkan extension VK_EXT_descriptor_indexing, GLSL extension
GL_EXT_nonuniform_qualifier and SPIR-V extension
SPV_EXT_descriptor_indexing. Dynamic multi-binding is only
supported in Vulkan 1.2.
PushConstant
Push constant.
SpecConstant
Specialization constant.
Implementations§
Trait Implementations§
impl Eq for Variable
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
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