Crate sierra

source ·
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::Samples::*;

Modules

Contains backend specific types. Most of the type user would use re-exports in the crate root.

Macros

Structs

Structure expected by device in buffer range specified by AccelerationStructureGeometry::AABBs.
Bottom-level acceleration structure.
Bits which can be set in AccelerationStructureInfo specifying additional parameters for acceleration structure builds.
Data provided to acceleration structure build operation.
Contains information about various size requirements for acceleration structure.
Information required to create an instance of AccelerationStructure.
Structure expected by device in buffer range specified by AccelerationStructureGeometry::Instances.
Specifies the access types for a resource.
Describes one attachment of a render pass.
Defines how color value from fragment shader’s color output should be blended with value stored in attachment.
Handle for GPU buffer object. GPU buffer is an object representing contiguous array of bytes accessible by GPU operations.
Information required to create a buffer.
Buffer range.
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.
Flags to specify allowed usages for buffer.
Handle to GPU image view object.
Information required to create a buffer.
Image view, layout and sampler.
Unlike [ImageViewDescriptor] this descriptor contains a sampler. to do sampled reads.
Defines remapping of color components.
Flags for each of color components.
Resource that describes whole compute pipeline state.
Compute pipeline state definition.
Defines how depth testing is performed.
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 is DescriptorBindingFlags::empty().
Set of descriptors with specific layout.
Contains information required to create DescriptorSet instance.
Handle for GPU descriptor set layout object.
Defines layout for one binding in descriptor set.
Flags that can be sed to
Defines layout for descriptor sets.
Handle to abstract device that can execute graphics, compute and ray-tracing pipelines.
Device address is u64 value pointing into device resource.
Contains descriptive information about device.
Error that may occur during execution on the device and then signalled on command submission or waiting operations.
Command encoder that can encode commands outside render pass.
Basis for encoding capabilities. Implements encoding of commands that can be inside and outside of render pass.
Multidimensional size.
Family of queues created together with device.
Information about one queue family.
Handle to GPU fence object.
Framebuffer is a collection of attachments for render pass. Images format and sample count should match attachment definitions. All image views must be 2D with 1 mip level and 1 array level.
Bits specifying additional parameters for geometries in acceleration structure builds
Possible values of flags in the instance modifying the behavior of that instance.
Root object of the erupt graphics system.
Resource that describes whole graphics pipeline state.
Graphics pipeline state definition. Fields are ordered to match pipeline stages, including fixed functions.
Handle to GPU image object.
Information required to create an image.
Image region with access mask, specifying how it may be accessed “before”.
Flags to specify allowed usages for image.
Handle to GPU image view object.
Cache for image views This cache uses eviction strategy of ResourceCache. But has convenience methods for fetching image views.
Information required to create an image view.
Image region with access mask, specifying how it may be accessed “before”.
Handle to GPU buffer object.
Memory usage type. Bits set define intended usage for requested memory.
Multidimensional offset.
Error that may occur when allocation fails because of either device memory is exhausted.
Opaque value representing a device (software emulated of hardware). Can be used to fetch information about device, its support of the surface and create graphics device.
Handle for GPU pipeline layout object.
Defines layout of pipeline inputs: all descriptor sets and push constants.
Flags to specify set of pipeline stages.
Queue capability flags.
Could not find a queue with specified capabilities.
Resource that describes whole ray-tracing pipeline state.
Handle to GPU render pass object.
Command encoder that can encode commands inside render pass.
Defines render pass, its attachments and one implicit subpass.
Command encoder that can encode commands inside render pass.
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.
Handle for GPU semaphore object.
Shader module and entry point. Uniquely identifies shader for pipeline.
Handle fot GPU shader module object.
Defines layout for descriptor sets.
Flags for each of graphics shaders.
Query only one queue with specified capabilities.
Descriptors input to be used in proc-macro pipelines.
Descriptor instance with sparsely located resources.
Descriptors layout for SparseDescriptors.
Valid SPIR-V shader code.
Buffer range with specified stride value.
Defines memory dependency between two subpasses or subpass and commands outside render pass.
Subresorce of the image. Unlike SubresourceRange it specifies only single mip-level and single array layer.
Subresorce layers of the image. Unlike SubresourceRange it specifies only single mip-level. Used in image copy operations.
Subresorce range of the image. Used to create ImageViews.
Defines how to write descriptors into set.
Vertex sub-range to attribute mapping.
Vertex buffer binding bahavior. Controls what subrange corresponds for vertex X of instance Y.
Viewport transformation.
Set of descriptors with specific layout.
POD replacement for bool.

Enums

Geometry data to build into acceleration structure.
Specifies the shape of geometries that will be built into an acceleration structure.
Acceleration structure level.
Defines how blend factor is calculated.
Blending operation to be applied between color value from fragment shader’s color output and value stored in attachment.
Capability a queue may have.
Value for attachment load clear operation.
Defines how color stored in attachment should be blended with color output of fragment shader.
Possible error which can be returned from create_buffer_*.
Polygione culling mode.
Collection of descriptors.
This type is used in [WriteDescriptorSet] to specify descriptors to write.
Types of descriptors.
AllocationError that may occur during descriptor sets allocation.
Kind of the device.
Error occured during device enumeration.
Features that optionally can be supported by devices.
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.
Polygon front face definition.
Defines rendering info for the pipeline creation.
Extent of the image.
Kind of image view.
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.
Specifies how render pass treats attachment content at the beginning.
Logical operation to be applied between color value from fragment shader’s color output and value stored in attachment.
Possible error that may occur during memory mapping.
Enum to specify one pipeline stage.
PolygonMode rasterization mode.
Topology of primitives.
Kind of raw window handles
Kind of raw window handles
Number of samples for an image.
Shader language.
Wrapper for pipeline states that can be either static or dynamic.
Default layout for [Repr]. Can be used for both uniforms storage buffers.
Can be used only for storage buffers.
Defines what operation should be peformed on value in stencil buffer.
Defines remapping of a color component.
Controls vertex input iteration frequency.

Traits

Trait for types that can be used for attachments in declarative render-pass.
Trait for all types that can be used as a descriptor.
Trait for all types that can be used as a descriptor array.
Input structures for descriptors implement this trait.
Trait for descriptors instance.
Trait for descriptor layouts.
Safety
Extension trait for push constants, specifying stages, offset and size in the typed pipeline.
Trait for querying command queues.
Type that can be represented in shader natively. i.e. with matching layout, and can be copied as-is.
Type that can be represented in shader.
Trait for descriptors updated and ready to be bound to pipeline.
Extension trait for updated descriptors, specifying offset in typed pipeline.

Functions

Returns maximal aligned integer not greater than value.
Returns minimal aligned integer not smaller than value.
Handles host OOM the same way global allocator does. This function should be called on host OOM error returned from Vulkan API.
Handles host OOM the same way global allocator does. This function should be called on host OOM error returned from Vulkan API.

Type Definitions

Derive Macros