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: u32,
ty: Type,
},
}
Expand description
A SPIR-V variable - interface variables, descriptor resources and push constants.
Variants§
Input
Input interface variable.
Fields
§
location: InterfaceLocation
Output
Output interface variable.
Fields
§
location: InterfaceLocation
Descriptor
Descriptor resource.
Fields
§
desc_bind: DescriptorBinding
§
desc_ty: DescriptorType
Descriptor resource type matching VkDescriptorType
.
§
nbind: u32
Number 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§
source§impl PartialEq for Variable
impl PartialEq for Variable
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