Crate sierra[][src]

Sierra is Vulkan-lite API.

While resembles Vulkan in most ways,
sierra does both memory and descriptor allocation. And tracks resources usage to reclaim them automatically once no references left.

Re-exports

pub use self::Samples::*;
pub use self::State::Dynamic;
pub use self::State::Static;

Modules

backend

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

Macros

descriptor_set_layout
descriptor_set_layout_bindings
graphics_pipeline_info

Convenient macro to build GraphicsPipelineInfo. Allows to skip fields when their default values are sufficient. The only required fields are:

rasterizer

Convenient macro to build Rasterizer. Allows to skip fields when their default values are sufficient.

Structs

AabbPositions
AccelerationStructure

Bottom-level acceleration structure.

AccelerationStructureBuildFlags

Bits which can be set in AccelerationStructureInfo specifying additional parameters for acceleration structure builds.

AccelerationStructureBuildGeometryInfo

Data provided to acceleration structure build operation.

AccelerationStructureBuildSizesInfo

Contains information about various size requirements for acceleration structure.

AccelerationStructureInfo

Information required to create an instance of AccelerationStructure.

AccelerationStructureInstance
AccessFlags

Flags for access types.

AnyHitShader
AspectFlags
AttachmentInfo

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
BufferCopy
BufferImageCopy
BufferInfo

Information required to create a buffer.

BufferRegion

Buffer region.

BufferUsage
ClosestHitShader
CombinedImageSampler

Image view, layout and sampler.
Unlike ImageViewDescriptor this descriptor contains a sampler. to do sampled reads.

CommandBuffer
ComponentMask

Flags for each of color components.

ComputePipeline

Resource that describes whole compute pipeline state.

ComputePipelineInfo

Compute pipeline state definition.

ComputeShader
CopyDescriptorSet

Defines operation to copy descriptors range from one set to another.

DepthTest

Defines how depth testing is performed.

DescriptorBindingFlags

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().

DescriptorSet

Set of descriptors with specific layout.

DescriptorSetInfo

Contains information required to create DescriptorSet instance.

DescriptorSetLayout

Resource that describes layout for descriptor sets.

DescriptorSetLayoutBinding

Defines layout for one binding in descriptor set.

DescriptorSetLayoutFlags

Flags that can be sed to

DescriptorSetLayoutInfo

Defines layout for descriptor sets.

Device

Opaque value that represents graphics API device. It is used to manage (create, destroy, check state) most of the device resources.

DeviceAddress

Device address is u64 value pointing into device resource.

DeviceInfo

Contains descriptive information about device.

Encoder

Command encoder that can encode commands outside render pass.

EncoderCommon

Basis for encoding capabilities. Implements encoding of commands that can be inside and outside of render pass.

Extent2d

Two dimensional extent.

Extent3d

Three dimensional extent.

Family

Family of queues created together with device.

FamilyInfo

Information about one queue family.

Fence
FormatRepr
FragmentShader
Framebuffer

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.

FramebufferInfo
GeometryFlags

Bits specifying additional parameters for geometries in acceleration structure builds

GeometryInstanceFlags

Possible values of flags in the instance modifying the behavior of that instance.

GeometryShader
Glsl

Valid GLSL shader code.

Graphics

Root object of the erupt graphics system.

GraphicsPipeline

Resource that describes whole graphics pipeline state.

GraphicsPipelineInfo

Graphics pipeline state definition. Fields are ordered to match pipeline stages, including fixed functions.

Hlsl

Valid HLSL shader code.

Image
ImageBlit
ImageCopy
ImageInfo

Information required to create an image.

ImageLayoutTransition
ImageMemoryBarrier
ImageSubresource

Subresorce of the image. Unlike ImageSubresourceRange it specifies only single mip-level and single array layer.

ImageSubresourceLayers

Subresorce layers of the image. Unlike ImageSubresourceRange it specifies only single mip-level. Used in image copy operations.

ImageSubresourceRange

Subresorce range of the image. Used to create ImageViews.

ImageUsage
ImageView
ImageViewDescriptor

Image view and layout.
Accesses to this descriptor will assume that view is in that layout.

ImageViewInfo

Information required to create an image view.

InstanceCustomIndexAndMask
InstanceShaderBindingOffsetAndFlags
IntersectionShader
MappableBuffer
MemoryBarrier
MemoryUsage

Memory usage type. Bits set define intended usage for requested memory.

MissShader
Offset2d

Two dimensional offset.

Offset3d

Three dimensional offset.

OutOfMemory

Error that may occur when allocation fails because of either host or device memory is exhausted.

Padded
PhysicalDevice

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.

PipelineLayout

Resource that describes layout of a pipeline.

PipelineLayoutInfo

Defines layouts of all descriptor sets used with pipeline.

PipelineStageFlags

Flags to specify set of pipeline stages.

PushConstant
Queue
QueueCapabilityFlags

Queue capability flags.

QueueId
QueueNotFound

Could not find a queue with specified capabilities.

QueuesQueryClosure
Rasterizer
RayTracingPipeline

Resource that describes whole ray-tracing pipeline state.

RayTracingPipelineInfo
RaygenShader
Rect2d
RenderPass

Render pass represents collection of attachments, subpasses, and dependencies between subpasses, and describes how they are used over the course of the subpasses.

RenderPassEncoder

Command encoder that can encode commands inside render pass.

RenderPassInfo

Defines render pass, its attachments and one implicit subpass.

Sampler
SamplerInfo
Semaphore
Shader

Shader module and entry point. Uniquely identifies shader for pipeline.

ShaderBindingTable
ShaderBindingTableInfo
ShaderModule

Resource that describes layout for descriptor sets.

ShaderModuleInfo

Defines layout for descriptor sets.

ShaderStageFlags

Flags for each of graphics shaders.

SingleQueueQuery

Query only one queue with specified capabilities.

Spirv

Valid SPIR-V shader code.

StencilTest
StencilTests
StridedBufferRegion

Buffer region with specified stride value.

Subpass
SubpassDependency

Defines memory dependency between two subpasses or subpass and commands outside render pass.

Surface
SurfaceCapabilities
SurfaceInfo
Swapchain
SwapchainImage
SwapchainImageInfo
TessellationControlShader
TessellationEvaluationShader
TransformMatrix
VertexInputAttribute

Vertex sub-range to attribute mapping.

VertexInputBinding

Vertex buffer binding bahavior. Controls what subrange corresponds for vertex X of instance Y.

VertexShader
Viewport

Viewport transformation.

WriteDescriptorSet

Defines how to write descriptors into set.

WrongShaderStage
boolean

POD replacement for bool.

Enums

AccelerationStructureGeometry

Geometry data to build into acceleration structure.

AccelerationStructureGeometryInfo

Specifies the shape of geometries that will be built into an acceleration structure.

AccelerationStructureLevel

Acceleration structure level.

AttachmentLoadOp

Specifies how render pass treats attachment content at the beginning.

AttachmentStoreOp
BlendFactor

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.

BorderColor
Capability

Capability a queue may have.

ClearValue

Value for attachment load clear operation.

ColorBlend

Defines how color stored in attachment should be blended with color output of fragment shader.

Command
CompareOp
CreateBufferError

Possible error which can be returned from create_buffer_*.

CreateDeviceError
CreateImageError

Possible error which can be returned from create_image_*).

CreateShaderModuleError
CreateSurfaceError
Culling

Polygione culling mode.

DescriptorType

Types of descriptors.

Descriptors

Collection of descriptors.
This type is used in WriteDescriptorSet to specify descriptors to write.

DeviceKind

Kind of the device.

EnumerateDeviceError

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.

FormatDescription
FormatType
FrontFace

Polygon front face definition.

ImageExtent

Extent of the image.

ImageViewKind

Kind of image view.

IndexData
IndexType
InvalidShader
Layout

Image layout defines how texels 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.

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.

MipmapMode
PipelineStage

Enum to specify one pipeline stage.

PolygonMode

PolygonMode rasterization mode.

PresentError
PresentMode
PresentOk
PrimitiveTopology

Topology of primitives.

RawWindowHandleKind

Kind of raw window handles

RayTracingShaderGroupInfo
SamplerAddressMode
Samples

Number of samples for an image.

ShaderLanguage

Shader language.

ShaderStage
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.

StencilOp

Defines what operation should be peformed on value in stencil buffer.

SurfaceError
VertexInputRate

Controls vertex input iteration frequency.

Constants

RENDERPASS_SMALLVEC_ATTACHMENTS

Upper limit for smallvec array size for attachments.

SMALLVEC_SUBPASSES

Upper limit for smallvec array size for subpasses.

Traits

Align
DescriptorsInput
DescriptorsInstance
DescriptorsLayout
Padding
Pod

Marker trait for “plain old data”.

QueuesQuery

Trait for querying command queues.

ShaderNative

Type that can be represented in shader natively. i.e. with matching layout, and can be copied as-is.

ShaderRepr

Type that can be represented in shader.

Zeroable

Trait for types that can be safely created with zeroed.

Functions

align_down
align_up
host_memory_space_overlow

Handles host OOM the same way global allocator does. This function should be called on host OOM error returned from Vulkan API.

image_eq_view
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 Definitions

ImageOffset

Image offset is defiend to i32 which is standard for graphics API today.

ImageSize

Image size is defined to u32 which is standard for graphics API of today.

bmat2
bmat2x2
bmat2x3
bmat2x4
bmat3
bmat3x2
bmat3x3
bmat3x4
bmat4
bmat4x2
bmat4x3
bmat4x4
bvec2
bvec3
bvec4
dmat2
dmat2x2
dmat2x3
dmat2x4
dmat3
dmat3x2
dmat3x3
dmat3x4
dmat4
dmat4x2
dmat4x3
dmat4x4
dvec2
dvec3
dvec4
imat2
imat2x2
imat2x3
imat2x4
imat3
imat3x2
imat3x3
imat3x4
imat4
imat4x2
imat4x3
imat4x4
ivec2
ivec3
ivec4
mat2
mat2x2
mat2x3
mat2x4
mat3
mat3x2
mat3x3
mat3x4
mat4
mat4x2
mat4x3
mat4x4
umat2
umat2x2
umat2x3
umat2x4
umat3
umat3x2
umat3x3
umat3x4
umat4
umat4x2
umat4x3
umat4x4
uvec2
uvec3
uvec4
vec2

Vector with 2-elements.

vec3

Vector with 3-elements.

vec4

Vector with 4-elements.

Attribute Macros

descriptors
shader_repr