Expand description
Sierra is Vulkan-lite API, focused on ease of use while maintaining high level of control.
While resembles Vulkan in most ways,
sierra does both memory and descriptor allocation automatically.
Additionally sierra tracks resources usage to free them once no references left.
Sierra provides rich proc-macro system for declarative descriptor sets and render passes.
Re-exports§
pub use self::backend::Device;
pub use self::backend::Graphics;
pub use crate::backend::AccelerationStructure;
pub use crate::backend::Buffer;
pub use crate::backend::BufferView;
pub use crate::backend::MappableBuffer;
pub use crate::backend::DescriptorSetLayout;
pub use crate::backend::DescriptorSet;
pub use crate::backend::WritableDescriptorSet;
pub use crate::backend::CommandBuffer;
pub use crate::backend::Fence;
pub use crate::backend::Framebuffer;
pub use crate::backend::Image;
pub use crate::backend::PhysicalDevice;
pub use crate::backend::ComputePipeline;
pub use crate::backend::GraphicsPipeline;
pub use crate::backend::RayTracingPipeline;
pub use crate::backend::PipelineLayout;
pub use crate::backend::Queue;
pub use crate::backend::RenderPass;
pub use crate::backend::Sampler;
pub use crate::backend::Semaphore;
pub use crate::backend::ShaderModule;
pub use crate::backend::Surface;
pub use crate::backend::ImageView;
pub use self::Samples::*;
Modules§
- backend
- Contains backend specific types. Most of the type user would use re-exports in the crate root.
Macros§
- binding_
flags - debug
- descriptor_
set_ layout - descriptor_
set_ layout_ bindings - error
- format
- graphics_
pipeline_ desc - info
- shader_
stages - sparse_
descriptors - swizzle
- trace
- warn
Structs§
- Aabb
Positions - Structure expected by device in buffer range specified by
AccelerationStructureGeometry::AABBs
. - Acceleration
Structure Build Flags - Bits which can be set in
AccelerationStructureInfo
specifying additional parameters for acceleration structure builds. - Acceleration
Structure Build Geometry Info - Data provided to acceleration structure build operation.
- Acceleration
Structure Build Sizes Info - Contains information about various size requirements for acceleration structure.
- Acceleration
Structure Info - Information required to create an instance of
AccelerationStructure
. - Acceleration
Structure Instance - Structure expected by device in buffer range specified by
AccelerationStructureGeometry::Instances
. - Access
- Specifies the access types for a resource.
- AnyHit
Shader - Aspect
Flags - Attachment
Info - Describes one attachment of a render pass.
- Blending
- Defines how color value from fragment shader’s color output should be blended with value stored in attachment.
- Bounds
- Buffer
Copy - Buffer
Image Copy - Buffer
Info - Information required to create a buffer.
- Buffer
Memory Barrier - Buffer
Range - Buffer range.
- Buffer
Range State - Buffer range handle that holds unsynchronized access. When used in operation, it is checked that no synchronization is required. Adding it to the synchronization command will synchronized access to it.
- Buffer
Usage - Flags to specify allowed usages for buffer.
- Buffer
View Info - Information required to create a buffer.
- Clear
Color - Clear
Depth - Clear
Depth Stencil - Clear
Stencil - Closest
HitShader - Combined
Image Sampler - Image view, layout and sampler.
Unlike [ImageViewDescriptor
] this descriptor contains a sampler. to do sampled reads. - Component
Mapping - Defines remapping of color components.
- Component
Mask - Flags for each of color components.
- Composite
Alpha Flags - Compute
Pipeline Info - Compute pipeline state definition.
- Compute
Shader - Depth
Test - Defines how depth testing is performed.
- Descriptor
Binding Flags - Flags that can be set in each
DescriptorSetLayoutBinding
to specify options for the corresponding descriptor set layout binding. Note that Vulkan 1.2 is required for any of these flags. That is, the only valid value prior Vulkan 1.2 isDescriptorBindingFlags::empty()
. - Descriptor
SetCopy - Descriptor
SetInfo - Contains information required to create
DescriptorSet
instance. - Descriptor
SetLayout Binding - Defines layout for one binding in descriptor set.
- Descriptor
SetLayout Flags - Flags that can be sed to
- Descriptor
SetLayout Info - Defines layout for descriptor sets.
- Descriptor
SetWrite - Device
Address - Device address is
u64
value pointing into device resource. - Device
Info - Contains descriptive information about device.
- Device
Lost - Error that may occur during execution on the device and then signalled on command submission or waiting operations.
- Dynamic
Graphics Pipeline - Encoder
- Command encoder that can encode commands outside render pass.
- Encoder
Common - Basis for encoding capabilities. Implements encoding of commands that can be inside and outside of render pass.
- Extent
- Multidimensional size.
- Family
- Family of queues created together with device.
- Family
Info - Information about one queue family.
- Format
Description - Fragment
Shader - Framebuffer
Info - Defines
Framebuffer
state. Can be used toDevice::create_framebuffer
. - Geometry
Flags - Bits specifying additional parameters for geometries in acceleration structure builds
- Geometry
Instance Flags - Possible values of flags in the instance modifying the behavior of that instance.
- Geometry
Shader - Graphics
Pipeline Desc - Graphics pipeline state definition. Fields are ordered to match pipeline stages, including fixed functions.
- Graphics
Pipeline Info - Image
Blit - Image
Copy - Image
Info - Information required to create an image.
- Image
Memory Barrier - Image
Subresource Range - Image
Subresource State - Image region with access mask, specifying how it may be accessed “before”.
- Image
Usage - Flags to specify allowed usages for image.
- Image
View Cache - Cache for image views
This cache uses eviction strategy of
ResourceCache
. But has convenience methods for fetching image views. - Image
View Info - Information required to create an image view.
- Image
View State - Image region with access mask, specifying how it may be accessed “before”.
- Instance
Custom Index AndMask - Instance
Shader Binding Offset AndFlags - Intersection
Shader - Layout
Transition - Memory
Usage - Memory usage type. Bits set define intended usage for requested memory.
- Minimal
Extent - Miss
Shader - Offset
- Multidimensional offset.
- OutOf
Memory - Error that may occur when allocation fails because of either device memory is exhausted.
- Padded
- Pipeline
Layout Info - Defines layout of pipeline inputs: all descriptor sets and push constants.
- Pipeline
Stages - Flags to specify set of pipeline stages.
- Presentation
Timing - Push
Constant - Queue
Capability Flags - Queue capability flags.
- QueueId
- Queue
NotFound - Could not find a queue with specified capabilities.
- Queues
Query Closure - Rasterizer
- RayTracing
Pipeline Info - Raygen
Shader - Rect
- Render
Pass Encoder - Command encoder that can encode commands inside render pass.
- Render
Pass Info - Defines render pass, its attachments and one implicit subpass.
- Rendering
Color Info - Rendering
Depth Info - Rendering
Depth Stencil Attachment Info - Rendering
Depth Stencil Info - Rendering
Encoder - Command encoder that can encode commands inside render pass.
- Rendering
Info - Rendering
Stencil Info - Resource
Cache - General purpose cache for sierra resources. This cache evicts resources based on their last used epoch. Each time a resource is used, its last used epoch is updated to the current. The cache evicts all resources that have not been used for a certain amount of epochs.
- Sampler
Info - Shader
- Shader module and entry point. Uniquely identifies shader for pipeline.
- Shader
Binding Table - Shader
Binding Table Info - Shader
Module Info - Defines layout for descriptor sets.
- Shader
Stage Flags - Flags for each of graphics shaders.
- Single
Queue Query - Query only one queue with specified capabilities.
- Sparse
Descriptor Set - Sparse
Descriptors - Descriptors input to be used in proc-macro pipelines.
- Sparse
Descriptors Instance - Descriptor instance with sparsely located resources.
- Sparse
Descriptors Layout - Descriptors layout for
SparseDescriptors
. - Spirv
- Valid SPIR-V shader code.
- Stencil
Test - Stencil
Tests - Strided
Buffer Range - Buffer range with specified stride value.
- Subpass
- Subpass
Dependency - Defines memory dependency between two subpasses or subpass and commands outside render pass.
- Subresource
- Subresorce of the image.
Unlike
SubresourceRange
it specifies only single mip-level and single array layer. - Subresource
Layers - Subresorce layers of the image.
Unlike
SubresourceRange
it specifies only single mip-level. Used in image copy operations. - Subresource
Range - Subresorce range of the image.
Used to create
ImageView
s. - Surface
Capabilities - Surface
Info - Surface
Transform Flags - Tessellation
Control Shader - Tessellation
Evaluation Shader - Transform
Matrix - Typed
Buffer - Update
Descriptor Set - Defines how to write descriptors into set.
- Vertex
Input Attribute - Vertex sub-range to attribute mapping.
- Vertex
Input Binding - Vertex buffer binding bahavior. Controls what subrange corresponds for vertex X of instance Y.
- Vertex
Shader - Viewport
- Viewport transformation.
- Width
- Width
Height - Width
Height Depth - Wrong
Shader Stage - X
- XY
- XYZ
- boolean
- POD replacement for
bool
.
Enums§
- Acceleration
Structure Geometry - Geometry data to build into acceleration structure.
- Acceleration
Structure Geometry Info - Specifies the shape of geometries that will be built into an acceleration structure.
- Acceleration
Structure Level - Acceleration structure level.
- BGR
- BGRA
- Blend
Factor - Defines how blend factor is calculated.
- BlendOp
- Blending operation to be applied between color value from fragment shader’s color output and value stored in attachment.
- Border
Color - Capability
- Capability a queue may have.
- Channels
- Clear
Value - Value for attachment load clear operation.
- Color
Attachment Optimal - Color
Blend - Defines how color stored in attachment should be blended with color output of fragment shader.
- Compare
Op - Const
Bits - Create
Buffer Error - Possible error which can be returned from
create_buffer_*
. - Create
Device Error - Create
Render Pass Error - Create
Shader Module Error - Create
Surface Error - Culling
- Polygione culling mode.
- D
- DS
- Depth
Stencil Attachment Optimal - Depth
Stencil Read Only Optimal - Descriptor
Slice - Collection of descriptors.
This type is used in [WriteDescriptorSet
] to specify descriptors to write. - Descriptor
Type - Types of descriptors.
- Descriptors
Allocation Error - AllocationError that may occur during descriptor sets allocation.
- Device
Kind - Kind of the device.
- Enumerate
Device Error - Error occured during device enumeration.
- Feature
- Features that optionally can be supported by devices.
- Filter
- Format
- Texel format. Images can have different texel formats. Some of which are color or depth and/or stencil. Format defines components, number of bits, layout and representation of texels.
- Framebuffer
Error - Front
Face - Polygon front face definition.
- General
- Graphics
Pipeline Rendering Info - Defines rendering info for the pipeline creation.
- Image
Extent - Extent of the image.
- Image
View Kind - Kind of image view.
- Index
Data - Index
Type - Invalid
Shader - Layout
- Image layout defines how texel are placed in memory. Operations can be used in one or more layouts. User is responsible to insert layout transition commands to ensure that the image is in valid layout for each operation. Pipeline barriers can be used to change layouts. Additionally render pass can change layout of its attachments.
- LoadOp
- Specifies how render pass treats attachment content at the beginning.
- LogicOp
- Logical operation to be applied between color value from fragment shader’s color output and value stored in attachment.
- MapError
- Possible error that may occur during memory mapping.
- Mipmap
Mode - Ownership
- Pipeline
Stage - Enum to specify one pipeline stage.
- Polygon
Mode - PolygonMode rasterization mode.
- Present
- Present
Error - Present
Mode - Present
Ok - Primitive
Topology - Topology of primitives.
- Queue
Error - R
- RG
- RGB
- RGBA
- RawDisplay
Handle Kind - Kind of raw window handles
- RawWindow
Handle Kind - Kind of raw window handles
- RayTracing
Shader Group Info - S
- Sampler
Address Mode - Samples
- Number of samples for an image.
- Sfloat
- Shader
Language - Shader language.
- Shader
Read Only Optimal - Shader
Stage - Sint
- Snorm
- Srgb
- Sscaled
- State
- Wrapper for pipeline states that can be either static or dynamic.
- Std140
- Default layout for [
Repr
]. Can be used for both uniforms storage buffers. - Std430
- Can be used only for storage buffers.
- Stencil
Op - Defines what operation should be peformed on value in stencil buffer.
- StoreOp
- Surface
Error - Swizzle
- Defines remapping of a color component.
- Transfer
DstOptimal - Transfer
SrcOptimal - Type
- Uint
- Unorm
- Uscaled
- Vertex
Input Rate - Controls vertex input iteration frequency.
- Wrong
Number OfElements
Traits§
- Attachment
- Trait for types that can be used for attachments in declarative render-pass.
- Descriptor
Binding - Trait for all types that can be used as a descriptor.
- Descriptor
Binding Array - Trait for all types that can be used as a descriptor array.
- Descriptors
- Input structures for descriptors implement this trait.
- Descriptors
Instance - Trait for descriptors instance.
- Descriptors
Layout - Trait for descriptor layouts.
- Padding
- Safety
- Pass
- Pipeline
Input - Pipeline
Input Layout PipelineLayout
for specificPipelineInput
.- Pipeline
Push Constants - Extension trait for push constants, specifying stages, offset and size in the typed pipeline.
- Queues
Query - Trait for querying command queues.
- Render
Pass Instance - Shader
Native - Type that can be represented in shader natively. i.e. with matching layout, and can be copied as-is.
- Shader
Repr - Type that can be represented in shader.
- Static
Format - Static
Layout - Updated
Descriptors - Trait for descriptors updated and ready to be bound to pipeline.
- Updated
Pipeline Descriptors - Extension trait for updated descriptors, specifying offset in typed pipeline.
- Valid
Layout
Functions§
- align_
down - Returns maximal aligned integer not greater than value.
- align_
offset - align_
up - Returns minimal aligned integer not smaller than value.
- host_
memory_ space_ overflow - Handles host OOM the same way global allocator does. This function should be called on host OOM error returned from Vulkan API.
- minimal_
extent - next_
offset - out_
of_ host_ memory - Handles host OOM the same way global allocator does. This function should be called on host OOM error returned from Vulkan API.
- pad_
size
Type Aliases§
- Extent1
- Extent2
- Extent3
- Image
Offset - Image offset is defined to
i32
which is standard for graphics API today. - Image
Size - Image size is defined to
u32
which is standard for graphics API of today. - Offset1
- Offset2
- Offset3
- bmat2
- bmat3
- bmat4
- bmat2x2
- bmat2x3
- bmat2x4
- bmat3x2
- bmat3x3
- bmat3x4
- bmat4x2
- bmat4x3
- bmat4x4
- bvec2
- bvec3
- bvec4
- dmat2
- dmat3
- dmat4
- dmat2x2
- dmat2x3
- dmat2x4
- dmat3x2
- dmat3x3
- dmat3x4
- dmat4x2
- dmat4x3
- dmat4x4
- dvec2
- dvec3
- dvec4
- imat2
- imat3
- imat4
- imat2x2
- imat2x3
- imat2x4
- imat3x2
- imat3x3
- imat3x4
- imat4x2
- imat4x3
- imat4x4
- ivec2
- ivec3
- ivec4
- mat2
- mat3
- mat4
- mat2x2
- mat2x3
- mat2x4
- mat3x2
- mat3x3
- mat3x4
- mat4x2
- mat4x3
- mat4x4
- umat2
- umat3
- umat4
- umat2x2
- umat2x3
- umat2x4
- umat3x2
- umat3x3
- umat3x4
- umat4x2
- umat4x3
- umat4x4
- uvec2
- uvec3
- uvec4
- vec2
- Vector with 2-elements.
- vec3
- Vector with 3-elements.
- vec4
- Vector with 4-elements.