LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Rendering Namespace Reference

Namespaces

namespace  Backends
 

Classes

class  Barrier
 A barrier used for GPU resource synchronization. More...
 
class  BufferAttribute
 Stores meta data about a buffer attribute, i.e. a member or field of a descriptor or buffer. More...
 
class  CommandBuffer
 Represents a command buffer, that buffers commands that should be submitted to a CommandQueue. More...
 
class  CommandQueue
 Represents a command queue. More...
 
class  ComputePipeline
 Represents a compute Pipeline. More...
 
class  DepthStencilState
 Stores the depth/stencil state of a see IRasterizer. More...
 
struct  DescriptorBinding
 Describes a resource binding to a descriptor or descriptor set. More...
 
struct  DescriptorBindingPoint
 Describes a single descriptor binding point within a IShaderModule. More...
 
class  DescriptorSet
 Defines a set of descriptors. More...
 
class  DescriptorSetLayout
 Describes the layout of a descriptor set. More...
 
class  DeviceState
 A class that can be used to manage the state of a IGraphicsDevice. More...
 
class  FrameBuffer
 Stores the images used by a RenderPass to either read from using input attachments or write to using render targets. More...
 
class  GraphicsDevice
 Represents the graphics device that a rendering back-end is doing work on. More...
 
struct  GraphicsDeviceFeatures
 Describes optional features that can be supported by a device. More...
 
class  GraphicsFactory
 Describes a factory that creates objects for a GraphicsDevice. More...
 
class  IAccelerationStructure
 Base interface for a ray tracing acceleration structure. More...
 
class  IBarrier
 The interface for a barrier. More...
 
class  IBottomLevelAccelerationStructure
 A structure that holds a singular entity of geometry for hardware ray-tracing. More...
 
class  IBuffer
 Base interface for buffer objects. More...
 
class  IBufferLayout
 Describes a buffer layout. More...
 
class  ICommandBuffer
 The interface for a command buffer. More...
 
class  ICommandQueue
 The interface for a command queue. More...
 
class  IComputePipeline
 The interface for a compute pipeline. More...
 
class  IDescriptorLayout
 Describes a the layout of a single descriptor within a DescriptorSet. More...
 
class  IDescriptorSet
 The interface for a descriptor set. More...
 
class  IDescriptorSetLayout
 The interface for a descriptor set layout. More...
 
class  IDeviceMemory
 Describes a chunk of device memory. More...
 
class  IFrameBuffer
 The interface for a frame buffer. More...
 
class  IGraphicsAdapter
 Represents a physical graphics adapter. More...
 
class  IGraphicsDevice
 The interface for a graphics device that. More...
 
class  IGraphicsFactory
 The interface for a graphics factory. More...
 
class  IImage
 Describes a generic image. More...
 
class  IIndexBuffer
 The interface for an index buffer. More...
 
class  IIndexBufferLayout
 Describes a index buffer layout. More...
 
class  IInputAssembler
 The interface for an input assembler state. More...
 
class  IMappable
 Allows for data to be mapped into the object. More...
 
class  IndexBuffer
 Describes an index buffer. More...
 
class  InputAssembler
 Represents a the input assembler state of a RenderPipeline. More...
 
class  IPipeline
 The interface for a pipeline. More...
 
class  IPipelineLayout
 The interface for a pipeline layout. More...
 
class  IPushConstantsLayout
 The interface for a push constants layout. More...
 
class  IPushConstantsRange
 Describes a range within a IPushConstantsLayout. More...
 
class  IRasterizer
 Represents the rasterizer state of a RenderPipeline. More...
 
class  IRayTracingPipeline
 The interface for a ray tracing pipeline. More...
 
class  IRenderBackend
 The interface to access a render backend. More...
 
class  IRenderPass
 The interface for a render pass. More...
 
class  IRenderPipeline
 The interface for a render pipeline. More...
 
class  IRenderTarget
 Represents a render target, i.e. an abstract view of the output of an RenderPass. More...
 
class  ISampler
 Describes a texture sampler. More...
 
class  IScissor
 The interface of a scissor. More...
 
class  IShaderModule
 Represents a single shader module, i.e. a part of a IShaderProgram. More...
 
class  IShaderProgram
 The interface for a shader program. More...
 
struct  IShaderRecord
 Describes a record within a shader binding table. More...
 
class  IStateResource
 The interface for a state resource. More...
 
class  ISurface
 Represents a surface to render to. More...
 
class  ISwapChain
 Interface for a swap chain. More...
 
class  ITopLevelAccelerationStructure
 A structure that stores the instance data for a IBottomLevelAccelerationStructure. More...
 
class  IVertexBuffer
 The interface for a vertex buffer. More...
 
class  IVertexBufferLayout
 Describes a vertex buffer layout. More...
 
class  IViewport
 Interface for a viewport. More...
 
class  Pipeline
 Represents a pipeline state. More...
 
class  PipelineLayout
 Represents a the layout of a RenderPipeline, ComputePipeline or RayTracingPipeline. More...
 
class  PushConstantsLayout
 Describes the layout of the pipelines push constant ranges. More...
 
class  Rasterizer
 Implements a IRasterizer. More...
 
class  RayTracingPipeline
 Represents a ray-tracing Pipeline. More...
 
class  RenderBackend
 Defines a back-end, that provides a device instance for a certain surface and graphics adapter. More...
 
class  RenderPass
 Represents a render pass. More...
 
class  RenderPassDependency
 Represents a mapping between a set of RenderTarget instances and the input attachments of a IRenderPass. More...
 
class  RenderPipeline
 Represents a graphics Pipeline. More...
 
class  RenderTarget
 Implements a render target. More...
 
class  Scissor
 Implements a scissor. More...
 
struct  ShaderBindingTableOffsets
 Describes the offsets and sizes of a shader group within a shader binding table buffer. More...
 
class  ShaderProgram
 Represents a shader program, consisting of multiple IShaderModules. More...
 
struct  ShaderRecord
 Defines a generic shader record. More...
 
struct  ShaderRecord< TLocalData >
 Denotes a shader record containing shader-local data. More...
 
struct  ShaderRecord<>
 Denotes a shader record containing no shader-local data. More...
 
class  ShaderRecordCollection
 Stores a set of IShaderRecords in that later form a shader binding table used for ray-tracing. More...
 
class  StateResource
 Base class for a resource that can be identified by a name string within a DeviceState. More...
 
class  SwapChain
 Represents a swap chain, i.e. a chain of multiple IImage instances, that can be presented to a ISurface. More...
 
class  TimingEvent
 An event that is used to measure timestamps in a command queue. More...
 
class  VertexBuffer
 Describes a vertex buffer. More...
 
class  Viewport
 Implements a viewport. More...
 

Concepts

concept  render_backend
 Concept that can be used to refer to render backend implementations.
 

Enumerations

enum class  GraphicsAdapterType { None = 0x00000000 , GPU = 0x00000001 , CPU = 0x00000002 , Other = 0x7FFFFFFF }
 Defines different types of graphics adapters. More...
 
enum class  QueueType : UInt32 {
  None = 0x00000000 , Graphics = 0x00000001 , Compute = 0x00000002 , Transfer = 0x00000004 ,
  VideoDecode = 0x00000010 , VideoEncode = 0x00000020 , Other = 0x7FFFFFFF
}
 Represents the type of a CommandQueue. More...
 
enum class  QueuePriority { Normal = 33 , High = 66 , Realtime = 100 }
 Specifies the priority with which a queue is scheduled on the GPU. More...
 
enum class  Format {
  None = 0x00000000 , R4G4_UNORM , R4G4B4A4_UNORM , B4G4R4A4_UNORM ,
  R5G6B5_UNORM , B5G6R5_UNORM , R5G5B5A1_UNORM , B5G5R5A1_UNORM ,
  A1R5G5B5_UNORM , R8_UNORM , R8_SNORM , R8_USCALED ,
  R8_SSCALED , R8_UINT , R8_SINT , R8_SRGB ,
  R8G8_UNORM , R8G8_SNORM , R8G8_USCALED , R8G8_SSCALED ,
  R8G8_UINT , R8G8_SINT , R8G8_SRGB , R8G8B8_UNORM ,
  R8G8B8_SNORM , R8G8B8_USCALED , R8G8B8_SSCALED , R8G8B8_UINT ,
  R8G8B8_SINT , R8G8B8_SRGB , B8G8R8_UNORM , B8G8R8_SNORM ,
  B8G8R8_USCALED , B8G8R8_SSCALED , B8G8R8_UINT , B8G8R8_SINT ,
  B8G8R8_SRGB , R8G8B8A8_UNORM , R8G8B8A8_SNORM , R8G8B8A8_USCALED ,
  R8G8B8A8_SSCALED , R8G8B8A8_UINT , R8G8B8A8_SINT , R8G8B8A8_SRGB ,
  B8G8R8A8_UNORM , B8G8R8A8_SNORM , B8G8R8A8_USCALED , B8G8R8A8_SSCALED ,
  B8G8R8A8_UINT , B8G8R8A8_SINT , B8G8R8A8_SRGB , A8B8G8R8_UNORM ,
  A8B8G8R8_SNORM , A8B8G8R8_USCALED , A8B8G8R8_SSCALED , A8B8G8R8_UINT ,
  A8B8G8R8_SINT , A8B8G8R8_SRGB , A2R10G10B10_UNORM , A2R10G10B10_SNORM ,
  A2R10G10B10_USCALED , A2R10G10B10_SSCALED , A2R10G10B10_UINT , A2R10G10B10_SINT ,
  A2B10G10R10_UNORM , A2B10G10R10_SNORM , A2B10G10R10_USCALED , A2B10G10R10_SSCALED ,
  A2B10G10R10_UINT , A2B10G10R10_SINT , R16_UNORM , R16_SNORM ,
  R16_USCALED , R16_SSCALED , R16_UINT , R16_SINT ,
  R16_SFLOAT , R16G16_UNORM , R16G16_SNORM , R16G16_USCALED ,
  R16G16_SSCALED , R16G16_UINT , R16G16_SINT , R16G16_SFLOAT ,
  R16G16B16_UNORM , R16G16B16_SNORM , R16G16B16_USCALED , R16G16B16_SSCALED ,
  R16G16B16_UINT , R16G16B16_SINT , R16G16B16_SFLOAT , R16G16B16A16_UNORM ,
  R16G16B16A16_SNORM , R16G16B16A16_USCALED , R16G16B16A16_SSCALED , R16G16B16A16_UINT ,
  R16G16B16A16_SINT , R16G16B16A16_SFLOAT , R32_UINT , R32_SINT ,
  R32_SFLOAT , R32G32_UINT , R32G32_SINT , R32G32_SFLOAT ,
  R32G32B32_UINT , R32G32B32_SINT , R32G32B32_SFLOAT , R32G32B32A32_UINT ,
  R32G32B32A32_SINT , R32G32B32A32_SFLOAT , R64_UINT , R64_SINT ,
  R64_SFLOAT , R64G64_UINT , R64G64_SINT , R64G64_SFLOAT ,
  R64G64B64_UINT , R64G64B64_SINT , R64G64B64_SFLOAT , R64G64B64A64_UINT ,
  R64G64B64A64_SINT , R64G64B64A64_SFLOAT , B10G11R11_UFLOAT , E5B9G9R9_UFLOAT ,
  D16_UNORM , X8_D24_UNORM , D32_SFLOAT , S8_UINT ,
  D16_UNORM_S8_UINT , D24_UNORM_S8_UINT , D32_SFLOAT_S8_UINT , BC1_RGB_UNORM ,
  BC1_RGB_SRGB , BC1_RGBA_UNORM , BC1_RGBA_SRGB , BC2_UNORM ,
  BC2_SRGB , BC3_UNORM , BC3_SRGB , BC4_UNORM ,
  BC4_SNORM , BC5_UNORM , BC5_SNORM , BC6H_UFLOAT ,
  BC6H_SFLOAT , BC7_UNORM , BC7_SRGB , Other = 0x7FFFFFFF
}
 Describes a texel format. More...
 
enum class  BufferFormat : UInt32 {
  None = 0x00000000 , X16F = 0x10000101 , X16I = 0x10000201 , X16U = 0x10000401 ,
  XY16F = 0x10000102 , XY16I = 0x10000202 , XY16U = 0x10000402 , XYZ16F = 0x10000103 ,
  XYZ16I = 0x10000203 , XYZ16U = 0x10000403 , XYZW16F = 0x10000104 , XYZW16I = 0x10000204 ,
  XYZW16U = 0x10000404 , X32F = 0x20000101 , X32I = 0x20000201 , X32U = 0x20000401 ,
  XY32F = 0x20000102 , XY32I = 0x20000202 , XY32U = 0x20000402 , XYZ32F = 0x20000103 ,
  XYZ32I = 0x20000203 , XYZ32U = 0x20000403 , XYZW32F = 0x20000104 , XYZW32I = 0x20000204 ,
  XYZW32U = 0x20000404
}
 Describes a buffer attribute format. More...
 
enum class  AttributeSemantic : UInt32 {
  Binormal = 0x00000001 , BlendIndices = 0x00000002 , BlendWeight = 0x00000003 , Color = 0x00000004 ,
  Normal = 0x00000005 , Position = 0x00000006 , TransformedPosition = 0x00000007 , PointSize = 0x00000008 ,
  Tangent = 0x00000009 , TextureCoordinate = 0x0000000A , Unknown = 0x7FFFFFFF
}
 Describes the semantic of a buffer attribute. More...
 
enum class  DescriptorType {
  ConstantBuffer = 0x00000001 , StructuredBuffer = 0x00000002 , RWStructuredBuffer = 0x00000012 , Texture = 0x00000003 ,
  RWTexture = 0x00000013 , Sampler = 0x00000004 , InputAttachment = 0x00000005 , Buffer = 0x00000006 ,
  RWBuffer = 0x00000016 , ByteAddressBuffer = 0x00000007 , RWByteAddressBuffer = 0x00000017 , AccelerationStructure = 0x00000008
}
 Describes the type of a IDescriptor. More...
 
enum class  BufferType {
  Vertex = 0x00000001 , Index = 0x00000002 , Uniform = 0x00000003 , Storage = 0x00000004 ,
  Texel = 0x00000005 , AccelerationStructure = 0x00000006 , ShaderBindingTable = 0x00000007 , Indirect = 0x00000008 ,
  Other = 0x7FFFFFFF
}
 Describes the type of a IBuffer. More...
 
enum class  ResourceHeap { Staging = 0x00000001 , Resource = 0x00000002 , Dynamic = 0x00000010 , Readback = 0x00000100 }
 Defines where a resource (buffer or image) memory is located and from where it can be accessed. More...
 
enum class  ResourceUsage {
  None = 0x0000 , AllowWrite = 0x0001 , TransferSource = 0x0010 , TransferDestination = 0x0020 ,
  RenderTarget = 0x0040 , AccelerationStructureBuildInput = 0x0100 , Default = TransferSource | TransferDestination , FrameBufferImage = TransferSource | RenderTarget
}
 Describes the intended usage for a resource. More...
 
enum class  IndexType : UInt32 { UInt16 = 0x00000010 , UInt32 = 0x00000020 }
 Describes the element type of an index buffer. More...
 
enum class  PrimitiveTopology {
  PointList = 0x00010001 , LineList = 0x00020001 , TriangleList = 0x00040001 , LineStrip = 0x00020002 ,
  TriangleStrip = 0x00040002
}
 Describes the topology of a mesh primitive. More...
 
enum class  ShaderStage : UInt32 {
  Vertex = 0x00000001 , TessellationControl = 0x00000002 , TessellationEvaluation = 0x00000004 , Geometry = 0x00000008 ,
  Fragment = 0x00000010 , Compute = 0x00000020 , Task = 0x00000040 , Mesh = 0x00000080 ,
  RayGeneration = 0x00000100 , AnyHit = 0x00000200 , ClosestHit = 0x00000400 , Miss = 0x00000800 ,
  Intersection = 0x00001000 , Callable = 0x00002000 , RasterizationPipeline = Vertex | Geometry | TessellationControl | TessellationEvaluation | Fragment , MeshPipeline = Task | Mesh | Fragment ,
  RayTracingPipeline = RayGeneration | AnyHit | ClosestHit | Miss | Intersection | Callable , Any = Vertex | TessellationControl | TessellationEvaluation | Geometry | Fragment | Compute | Task | Mesh | RayGeneration | AnyHit | ClosestHit | Miss | Intersection | Callable , Other = 0x7FFFFFFF
}
 Describes the valid shader stages of a graphics pipeline. More...
 
enum class  ShaderRecordType {
  RayGeneration = 0x01 , HitGroup = 0x02 , Intersection = 0x03 , Miss = 0x04 ,
  Callable = 0x05 , Invalid = 0x7FFFFFFF
}
 Describes the type of a shader module record within a shader collection or shader binting table. More...
 
enum class  ShaderBindingGroup : UInt32 {
  RayGeneration = 0x01 , HitGroup = 0x02 , Miss = 0x04 , Callable = 0x08 ,
  All = RayGeneration | HitGroup | Miss | Callable
}
 Describes a group or combination of groups of a shader binding table. More...
 
enum class  PolygonMode { Solid = 0x00000001 , Wireframe = 0x00000002 , Point = 0x00000004 }
 Describes the draw mode for polygons. More...
 
enum class  CullMode { FrontFaces = 0x00000001 , BackFaces = 0x00000002 , Both = 0x00000004 , Disabled = 0x0000000F }
 Describes which faces are culled by the Rasterizer stage. More...
 
enum class  CullOrder { ClockWise = 0x00000001 , CounterClockWise = 0x00000002 }
 Describes the order or vertex winding, that is used to determine, whether a polygon is facing towards or away from the camera. More...
 
enum class  RenderTargetType { Color = 0x00000001 , DepthStencil = 0x00000002 , Present = 0x00000004 }
 Describes the type of a render target. More...
 
enum class  RenderTargetFlags { None = 0x00 , Clear = 0x01 , ClearStencil = 0x02 , Volatile = 0x04 }
 Describes the behavior of render targets. More...
 
enum class  ImageDimensions { DIM_1 = 0x01 , DIM_2 = 0x02 , DIM_3 = 0x03 , CUBE = 0x04 }
 Describes the dimensions of a image resource, i.e. the dimensions that are required to access a texel or describe the image extent. More...
 
enum class  MultiSamplingLevel : UInt32 {
  x1 = 0x00000001 , x2 = 0x00000002 , x4 = 0x00000004 , x8 = 0x00000008 ,
  x16 = 0x00000010 , x32 = 0x00000020 , x64 = 0x00000040
}
 Describes the number of samples with which a IImage is sampled. More...
 
enum class  FilterMode { Nearest = 0x00000001 , Linear = 0x00000002 }
 Describes the filter operation when accessing a pixel from a texture coordinate. More...
 
enum class  MipMapMode { Nearest = 0x00000001 , Linear = 0x00000002 }
 Describes the filter operation between two mip-map levels. More...
 
enum class  BorderMode {
  Repeat = 0x00000001 , RepeatMirrored = 0x00010001 , ClampToEdge = 0x00000002 , ClampToEdgeMirrored = 0x00010002 ,
  ClampToBorder = 0x00000003
}
 Describes how to treat texture coordinates that are outside the domain [0..1]. More...
 
enum class  CompareOperation {
  Never = 0x00000000 , Less = 0x00000001 , Greater = 0x0000002 , Equal = 0x00000003 ,
  LessEqual = 0x00000004 , GreaterEqual = 0x00000005 , NotEqual = 0x00000006 , Always = 0x00000007
}
 Describes the operation used to compare depth or stencil values during depth/stencil tests. More...
 
enum class  StencilOperation {
  Keep = 0x00000000 , Zero = 0x00000001 , Replace = 0x00000002 , IncrementClamp = 0x00000003 ,
  DecrementClamp = 0x00000004 , Invert = 0x00000005 , IncrementWrap = 0x00000006 , DecrementWrap = 0x00000007
}
 An operation that is applied to the stencil buffer. More...
 
enum class  BlendFactor {
  Zero = 0 , One = 1 , SourceColor = 2 , OneMinusSourceColor = 3 ,
  DestinationColor = 4 , OneMinusDestinationColor = 5 , SourceAlpha = 6 , OneMinusSourceAlpha = 7 ,
  DestinationAlpha = 8 , OneMinusDestinationAlpha = 9 , ConstantColor = 10 , OneMinusConstantColor = 11 ,
  ConstantAlpha = 12 , OneMinusConstantAlpha = 13 , SourceAlphaSaturate = 14 , Source1Color = 15 ,
  OneMinusSource1Color = 16 , Source1Alpha = 17 , OneMinusSource1Alpha = 18
}
 Specifies a blend factor. More...
 
enum class  WriteMask { R = 0x01 , G = 0x02 , B = 0x04 , A = 0x08 }
 Specifies a write mask for a color buffer. More...
 
enum class  BlendOperation {
  Add = 0x01 , Subtract = 0x02 , ReverseSubtract = 0x03 , Minimum = 0x04 ,
  Maximum = 0x05
}
 Specifies a blend operation. More...
 
enum class  PipelineStage {
  None = 0x00000000 , All = 0x00000001 , Draw = 0x00000002 , InputAssembly = 0x00000004 ,
  Vertex = 0x00000006 , TessellationControl = 0x00000008 , TessellationEvaluation = 0x00000010 , Geometry = 0x00000020 ,
  Fragment = 0x00000040 , DepthStencil = 0x00000080 , Indirect = 0x00000100 , RenderTarget = 0x00000200 ,
  Compute = 0x00000400 , Transfer = 0x00000800 , Resolve = 0x00001000 , AccelerationStructureBuild = 0x00010000 ,
  AccelerationStructureCopy = 0x00020000 , Raytracing = 0x00040000
}
 Defines pipeline stages as points where synchronization may occur. More...
 
enum class  ResourceAccess {
  None = 0x7FFFFFFF , VertexBuffer = 0x00000001 , IndexBuffer = 0x00000002 , UniformBuffer = 0x00000004 ,
  RenderTarget = 0x00000008 , DepthStencilRead = 0x00000010 , DepthStencilWrite = 0x00000020 , ShaderRead = 0x00000040 ,
  ShaderReadWrite = 0x00000080 , Indirect = 0x00000100 , TransferRead = 0x00000200 , TransferWrite = 0x00000400 ,
  ResolveRead = 0x00000800 , ResolveWrite = 0x00001000 , Common = 0x00002000 , AccelerationStructureRead = 0x00010000 ,
  AccelerationStructureWrite = 0x00020000
}
 Defines how a IBuffer or IImage resource is accessed. More...
 
enum class  ImageLayout {
  Common = 0x00000001 , ShaderResource = 0x00000002 , ReadWrite = 0x00000003 , CopySource = 0x00000010 ,
  CopyDestination = 0x00000011 , RenderTarget = 0x00000020 , DepthRead = 0x00000021 , DepthWrite = 0x00000022 ,
  Present = 0x00000023 , ResolveSource = 0x00000024 , ResolveDestination = 0x00000025 , Undefined = 0x7FFFFFFF
}
 Specifies the layout of an IImage resource. More...
 
enum class  GeometryFlags { None = 0x00 , Opaque = 0x01 , OneShotAnyHit = 0x02 }
 Controls how a geometry that is part of a bottom-level acceleration structure (BLAS) behaves during ray-tracing. More...
 
enum class  AccelerationStructureFlags {
  None = 0x0000 , AllowUpdate = 0x0001 , AllowCompaction = 0x0002 , PreferFastTrace = 0x0004 ,
  PreferFastBuild = 0x0008 , MinimizeMemory = 0x0010
}
 Controls how an acceleration structure should be built. More...
 
enum class  InstanceFlags {
  None = 0x00 , DisableCull = 0x01 , FlipWinding = 0x02 , ForceOpaque = 0x04 ,
  ForceNonOpaque = 0x08
}
 Controls how an instance within a ITopLevelAccelerationStructure behaves during ray-tracing. More...
 

Functions

 LITEFX_DEFINE_FLAGS (QueueType)
 
 LITEFX_DEFINE_FLAGS (ShaderStage)
 
 LITEFX_DEFINE_FLAGS (PipelineStage)
 
 LITEFX_DEFINE_FLAGS (ResourceAccess)
 
 LITEFX_DEFINE_FLAGS (BufferFormat)
 
 LITEFX_DEFINE_FLAGS (WriteMask)
 
 LITEFX_DEFINE_FLAGS (RenderTargetFlags)
 
 LITEFX_DEFINE_FLAGS (GeometryFlags)
 
 LITEFX_DEFINE_FLAGS (ResourceUsage)
 
 LITEFX_DEFINE_FLAGS (AccelerationStructureFlags)
 
 LITEFX_DEFINE_FLAGS (InstanceFlags)
 
 LITEFX_DEFINE_FLAGS (ShaderBindingGroup)
 
constexpr UInt32 getBufferFormatChannels (BufferFormat format)
 Returns the number of channels for a buffer format.
 
constexpr UInt32 getBufferFormatChannelSize (BufferFormat format)
 Returns the number of bytes used by a channel of a buffer format.
 
constexpr UInt32 getBufferFormatType (BufferFormat format)
 Returns the underlying data type of a buffer format.
 
constexpr size_t getSize (Format format)
 Returns the size of an element of a specified format.
 
constexpr bool hasDepth (Format format) noexcept
 Returns true, if the format contains a depth channel.
 
constexpr bool hasStencil (Format format) noexcept
 Returns true, if the format contains a stencil channel.
 
struct LITEFX_RENDERING_API alignas (16) IndirectBatch
 An indirect batch used to execute an standard draw call.
 

Variables

const size_t SHADER_RECORD_LOCAL_DATA_ALIGNMENT { 8 }
 The size (in bytes) to which shader record local data must be aligned.
 

Enumeration Type Documentation

◆ AccelerationStructureFlags

Controls how an acceleration structure should be built.

See also
IBottomLevelAccelerationStructure, ITopLevelAccelerationStructure
Enumerator
None 

Use default options for building the acceleration structure.

AllowUpdate 

Allow the acceleration structure to be updated.

AllowCompaction 

Allow the acceleration structure to be compacted.

PreferFastTrace 

Prefer building a better performing acceleration structure, that possibly takes longer to build.

This flag cannot be combined with PreferFastBuild.

PreferFastBuild 

Prefer fast build times for the acceleration structure, but sacrifice ray-tracing performance.

This flag cannot be combined with PreferFastTrace.

MinimizeMemory 

Prefer to minimize the memory footprint of the acceleration structure, but at the cost of ray-tracing performance and build times.

◆ AttributeSemantic

Describes the semantic of a buffer attribute.

See also
BufferAttribute
Enumerator
Binormal 

The attribute contains a bi-normal vector.

BlendIndices 

The attribute contains blend indices.

BlendWeight 

The attribute contains blend weights.

Color 

The attribute contains a color value.

Normal 

The attribute contains a normal vector.

Position 

The attribute contains a position vector.

TransformedPosition 

The attribute contains a pre-transformed position vector.

PointSize 

The attribute contains a point size.

Tangent 

The attribute contains a tangent vector.

TextureCoordinate 

The attribute contains a texture coordinate.

Unknown 

The attribute is a generic, unknown semantic.

◆ BlendFactor

enum class LiteFX::Rendering::BlendFactor
strong

Specifies a blend factor.

See also
DepthStencilState
Enumerator
Zero 
One 
SourceColor 
OneMinusSourceColor 
DestinationColor 
OneMinusDestinationColor 
SourceAlpha 
OneMinusSourceAlpha 
DestinationAlpha 
OneMinusDestinationAlpha 
ConstantColor 
OneMinusConstantColor 
ConstantAlpha 
OneMinusConstantAlpha 
SourceAlphaSaturate 
Source1Color 
OneMinusSource1Color 
Source1Alpha 
OneMinusSource1Alpha 

◆ BlendOperation

Specifies a blend operation.

See also
DepthStencilState
Enumerator
Add 
Subtract 
ReverseSubtract 
Minimum 
Maximum 

◆ BorderMode

enum class LiteFX::Rendering::BorderMode
strong

Describes how to treat texture coordinates that are outside the domain [0..1].

Enumerator
Repeat 

Repeat the texture.

RepeatMirrored 

Mirror the texture.

ClampToEdge 

Take the closest edge texel.

ClampToEdgeMirrored 

Take the closest edge texel from the opposite site.

ClampToBorder 

Return a pre-specified border color.

◆ BufferFormat

Describes a buffer attribute format.

See also
getBufferFormatChannels, getBufferFormatChannelSize, getBufferFormatType
Enumerator
None 
X16F 
X16I 
X16U 
XY16F 
XY16I 
XY16U 
XYZ16F 
XYZ16I 
XYZ16U 
XYZW16F 
XYZW16I 
XYZW16U 
X32F 
X32I 
X32U 
XY32F 
XY32I 
XY32U 
XYZ32F 
XYZ32I 
XYZ32U 
XYZW32F 
XYZW32I 
XYZW32U 

◆ BufferType

enum class LiteFX::Rendering::BufferType
strong

Describes the type of a IBuffer.

See also
IBufferLayout
Enumerator
Vertex 

Describes a vertex buffer.

Index 

Describes an index buffer.

Uniform 

Describes an uniform buffer object (Vulkan) or constant buffer view (DirectX).

Buffers of this type can be bound to ConstantBuffer descriptors.

Storage 

Describes a shader storage buffer object (Vulkan) or unordered access view (DirectX).

Buffers of this type can be bound to StructuredBuffer/RWStructuredBuffer or ByteAddressBuffer/RWByteAddressBuffer descriptors.

Texel 

Describes a shader texel storage buffer object (Vulkan) or unordered access view (DirectX).

Buffers of this type can be bound to Buffer/RWBuffer descriptors.

AccelerationStructure 

Describes an acceleration structure buffer.

See also
ICommandBuffer::buildAccelerationStructure, IBottomLevelAccelerationStructure, ITopLevelAccelerationStructure
ShaderBindingTable 

Describes a shader binding table for ray-tracing.

Indirect 

Describes a buffer that stores data to generate indirect draw calls.

An indirect buffer refers to a buffer that contains a set of information used to generate dispatch or draw calls. A single dispatch or draw call in this context is referred to as a batch. An indirect buffer must only contain one type of batches, e.g., it is not allowed to mix indexed and non-indexed batches in a single indirect buffer. Batches need to be densely packed within the buffer, i.e., the stride between elements is always assumed to be 0.

Indirect buffers can be written from shaders, which enables use cases like GPU-culling, where a compute shader writes the batches in an indirect buffer, that is then passed to an indirect draw call. In such situations, the number of batches in the buffer is typically not known beforehand, so an additional buffer is used to store the number of draw calls in.

Note that indirect drawing support is currently limited in how data can be passed to draw calls. This is due to Vulkan not providing an adequate interface for describing per-draw bindings in the indirect signature. In DirectX 12, it is possible for batches to provide different vertex and index buffers, as well as resource bindings for each draw call. Vulkan does only support draw calls that target already bound descriptors. Due to this limitation, it is currently best practice to use bind-less descriptor arrays to pass per-draw data to draws and use a vertex attribute to index into the descriptor array.

Other 

Describes another type of buffer, such as samplers or images.

Buffers of this type must not be bound to any descriptor, but can be used as copy/transfer targets and sources.

◆ CompareOperation

Describes the operation used to compare depth or stencil values during depth/stencil tests.

See also
DepthStencilState
Enumerator
Never 

The test always fails.

Less 

The test succeeds, if the current value is less than the stencil ref or previous depth value.

Greater 

The test succeeds, if the current value is greater than the stencil ref or previous depth value.

Equal 

The test succeeds, if the current value is equal to the stencil ref or previous depth value.

LessEqual 

The test succeeds, if the current value is less or equal to the stencil ref or previous depth value.

GreaterEqual 

The test succeeds, if the current value is greater or equal to the stencil ref or previous depth value.

NotEqual 

The test succeeds, if the current value is not equal to the stencil ref or previous depth value.

Always 

The test always succeeds.

◆ CullMode

enum class LiteFX::Rendering::CullMode
strong

Describes which faces are culled by the Rasterizer stage.

See also
Rasterizer
Enumerator
FrontFaces 

The rasterizer will discard front-facing polygons.

BackFaces 

The rasterizer will discard back-facing polygons.

Both 

The rasterizer will discard front and back-facing polygons.

Disabled 

The rasterizer will not discard any polygons.

◆ CullOrder

enum class LiteFX::Rendering::CullOrder
strong

Describes the order or vertex winding, that is used to determine, whether a polygon is facing towards or away from the camera.

See also
CullMode, Rasterizer
Enumerator
ClockWise 

Vertices are evaluated in a clock-wise manner.

CounterClockWise 

Vertices are evaluated in a counter clock-wise manner.

◆ DescriptorType

Describes the type of a IDescriptor.

Note that, while in theory you can declare a writable descriptor in any format, the rendering back-end might not necessarily support writing in a specific format.

See also
IDescriptorLayout
Enumerator
ConstantBuffer 

A uniform buffer in Vulkan. Maps to a constant buffer in DirectX.

A uniform or constant buffer is read-only. In GLSL, use the uniform keyword to access a uniform buffer. In HLSL, use the ConstantBuffer keyword.

StructuredBuffer 

A shader storage buffer object in Vulkan. Maps to a structured buffer in DirectX.

A storage buffer is read-only by default. If you want to create a writable storage buffer, use instead. In GLSL, use the buffer keyword to access storage buffers. In HLSL, use the StructuredBuffer keyword. The difference between and storage buffers is, that storage buffers can have variable length. However, they are typically less efficient.

RWStructuredBuffer 

A writable shader storage object in Vulkan. Maps to a read/write structured buffer in DirectX.

In GLSL, use the buffer keyword to access storage buffers. In HLSL, use the RWStructuredBuffer keyword.

When using shader reflection on AppendStructuredBuffer/ConsumeStructuredBuffer, this descriptor type will be deduced, but support for those constructs is not implemented. Instead, use a separate RWByteAddressBuffer descriptor and call InterlockedAdd on it.

Texture 

A read-only sampled image.

Textures are read-only by default. If you want to create a writable texture, use the instead. In GLSL, use the uniform texture keywords to access the texture. In HLSL, use the Texture keywords. Note, that textures are typically not be accessed directly, but instead are sampled using a .

RWTexture 

A writable image.

In GLSL, use the uniform image keywords to access the texture. In HLSL, use the RWTexture keywords. </remaks>

Sampler 

A sampler state of a texture or image.

InputAttachment 

The result of a render target from an earlier render pass. Maps to a SubpassInput in HLSL.

Buffer 

Represents a read-only texel buffer (uniform texel buffer).

Use the uniform imageBuffer keyword in GLSL to access the buffer. In HLSL, use the Buffer keyword.

RWBuffer 

Represents a writable texel buffer (storage texel buffer).

Use the uniform imageBuffer keyword in GLSL to access the buffer. In HLSL, use the RWBuffer keyword.

ByteAddressBuffer 

Represents an unformatted buffer.

In GLSL, use the buffer keyword to access byte address buffers. In HLSL, use the ByteAddressBuffer keyword.

RWByteAddressBuffer 

Represents an unformatted writable buffer.

In GLSL, use the buffer keyword to access byte address buffers. In HLSL, use the RWByteAddressBuffer keyword.

AccelerationStructure 

Represents a ray-tracing acceleration structure.

◆ FilterMode

enum class LiteFX::Rendering::FilterMode
strong

Describes the filter operation when accessing a pixel from a texture coordinate.

See also
IImage
Enumerator
Nearest 

Take the nearest texel with respect to the texture coordinate.

Linear 

Linearly interpolate between the two closest texels with respect to the texture coordinate.

◆ Format

enum class LiteFX::Rendering::Format
strong

Describes a texel format.

Enumerator
None 
R4G4_UNORM 
R4G4B4A4_UNORM 
B4G4R4A4_UNORM 
R5G6B5_UNORM 
B5G6R5_UNORM 
R5G5B5A1_UNORM 
B5G5R5A1_UNORM 
A1R5G5B5_UNORM 
R8_UNORM 
R8_SNORM 
R8_USCALED 
R8_SSCALED 
R8_UINT 
R8_SINT 
R8_SRGB 
R8G8_UNORM 
R8G8_SNORM 
R8G8_USCALED 
R8G8_SSCALED 
R8G8_UINT 
R8G8_SINT 
R8G8_SRGB 
R8G8B8_UNORM 
R8G8B8_SNORM 
R8G8B8_USCALED 
R8G8B8_SSCALED 
R8G8B8_UINT 
R8G8B8_SINT 
R8G8B8_SRGB 
B8G8R8_UNORM 
B8G8R8_SNORM 
B8G8R8_USCALED 
B8G8R8_SSCALED 
B8G8R8_UINT 
B8G8R8_SINT 
B8G8R8_SRGB 
R8G8B8A8_UNORM 
R8G8B8A8_SNORM 
R8G8B8A8_USCALED 
R8G8B8A8_SSCALED 
R8G8B8A8_UINT 
R8G8B8A8_SINT 
R8G8B8A8_SRGB 
B8G8R8A8_UNORM 
B8G8R8A8_SNORM 
B8G8R8A8_USCALED 
B8G8R8A8_SSCALED 
B8G8R8A8_UINT 
B8G8R8A8_SINT 
B8G8R8A8_SRGB 
A8B8G8R8_UNORM 
A8B8G8R8_SNORM 
A8B8G8R8_USCALED 
A8B8G8R8_SSCALED 
A8B8G8R8_UINT 
A8B8G8R8_SINT 
A8B8G8R8_SRGB 
A2R10G10B10_UNORM 
A2R10G10B10_SNORM 
A2R10G10B10_USCALED 
A2R10G10B10_SSCALED 
A2R10G10B10_UINT 
A2R10G10B10_SINT 
A2B10G10R10_UNORM 
A2B10G10R10_SNORM 
A2B10G10R10_USCALED 
A2B10G10R10_SSCALED 
A2B10G10R10_UINT 
A2B10G10R10_SINT 
R16_UNORM 
R16_SNORM 
R16_USCALED 
R16_SSCALED 
R16_UINT 
R16_SINT 
R16_SFLOAT 
R16G16_UNORM 
R16G16_SNORM 
R16G16_USCALED 
R16G16_SSCALED 
R16G16_UINT 
R16G16_SINT 
R16G16_SFLOAT 
R16G16B16_UNORM 
R16G16B16_SNORM 
R16G16B16_USCALED 
R16G16B16_SSCALED 
R16G16B16_UINT 
R16G16B16_SINT 
R16G16B16_SFLOAT 
R16G16B16A16_UNORM 
R16G16B16A16_SNORM 
R16G16B16A16_USCALED 
R16G16B16A16_SSCALED 
R16G16B16A16_UINT 
R16G16B16A16_SINT 
R16G16B16A16_SFLOAT 
R32_UINT 
R32_SINT 
R32_SFLOAT 
R32G32_UINT 
R32G32_SINT 
R32G32_SFLOAT 
R32G32B32_UINT 
R32G32B32_SINT 
R32G32B32_SFLOAT 
R32G32B32A32_UINT 
R32G32B32A32_SINT 
R32G32B32A32_SFLOAT 
R64_UINT 
R64_SINT 
R64_SFLOAT 
R64G64_UINT 
R64G64_SINT 
R64G64_SFLOAT 
R64G64B64_UINT 
R64G64B64_SINT 
R64G64B64_SFLOAT 
R64G64B64A64_UINT 
R64G64B64A64_SINT 
R64G64B64A64_SFLOAT 
B10G11R11_UFLOAT 
E5B9G9R9_UFLOAT 
D16_UNORM 
X8_D24_UNORM 
D32_SFLOAT 
S8_UINT 
D16_UNORM_S8_UINT 
D24_UNORM_S8_UINT 
D32_SFLOAT_S8_UINT 
BC1_RGB_UNORM 
BC1_RGB_SRGB 
BC1_RGBA_UNORM 
BC1_RGBA_SRGB 
BC2_UNORM 
BC2_SRGB 
BC3_UNORM 
BC3_SRGB 
BC4_UNORM 
BC4_SNORM 
BC5_UNORM 
BC5_SNORM 
BC6H_UFLOAT 
BC6H_SFLOAT 
BC7_UNORM 
BC7_SRGB 
Other 

◆ GeometryFlags

Controls how a geometry that is part of a bottom-level acceleration structure (BLAS) behaves during ray-tracing.

See also
IBottomLevelAccelerationStructure
Enumerator
None 

Implies no restrictions on the geometry.

Opaque 

If this flag is set, the any-hit shader for this geometry is never invoked, even if it is present within the hit group.

OneShotAnyHit 

If this flag is set, the any-hit shader for this geometry is only invoked once for each primitive of the geometry, even if it could be invoked multiple times during ray tracing.

◆ GraphicsAdapterType

Defines different types of graphics adapters.

Enumerator
None 

The adapter is not a valid graphics adapter.

GPU 

The adapter is a dedicated GPU or integrated CPU adapter.

CPU 

The adapter is a software driver.

Other 

The adapter type is not captured by this enum. This value is used internally to mark invalid adapters and should not be used.

◆ ImageDimensions

Describes the dimensions of a image resource, i.e. the dimensions that are required to access a texel or describe the image extent.

See also
IImage
Enumerator
DIM_1 

Represents a 1D image.

DIM_2 

Represents a 2D image.

DIM_3 

Represents a 3D image.

CUBE 

Represents a set of six 2D images that are used to build a cube map.

◆ ImageLayout

enum class LiteFX::Rendering::ImageLayout
strong

Specifies the layout of an IImage resource.

See also
IImage, IBarrier, ResourceAccess, PipelineStage
Enumerator
Common 

A common image layout that allows for all types of access (shader resource, transfer destination, transfer source).

This image layout translates to D3D12_BARRIER_LAYOUT_COMMON in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_GENERAL in the Vulkan 🌋 backend.

ShaderResource 

Indicates that the image is used as a read-only storage or texel buffer.

This image layout translates to D3D12_BARRIER_LAYOUT_SHADER_RESOURCE in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL in the Vulkan 🌋 backend.

ReadWrite 

Indicates that the image is used as a read-write storage or texel buffer.

This image layout translates to D3D12_BARRIER_LAYOUT_UNORDERED_ACCESS in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_GENERAL in the Vulkan 🌋 backend.

CopySource 

Allows the image to be used as a source for transfer operations.

This image layout translates to D3D12_BARRIER_LAYOUT_COPY_SOURCE in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL in the Vulkan 🌋 backend.

CopyDestination 

Allows the image to be used as a destination for transfer operations.

This image layout translates to D3D12_BARRIER_LAYOUT_COPY_DEST in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL in the Vulkan 🌋 backend.

RenderTarget 

Indicates that the image is used as a render target.

This image layout translates to D3D12_BARRIER_LAYOUT_RENDER_TARGET in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL in the Vulkan 🌋 backend.

DepthRead 

Indicates that image is used as a read-only depth/stencil target.

This image layout translates to D3D12_BARRIER_LAYOUT_DEPTH_STENCIL_READ in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the Vulkan 🌋 backend.

DepthWrite 

Indicates that the image is used as a write-only depth/stencil target.

This image layout translates to D3D12_BARRIER_LAYOUT_DEPTH_STENCIL_WRITE in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL in the Vulkan 🌋 backend.

Present 

Indicates that the image is presented on a swap chain.

This image layout translates to D3D12_BARRIER_LAYOUT_PRESENT in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_PRESENT_SRC_KHR in the Vulkan 🌋 backend.

Typically you do not want to manually transition a resource into this state. Render target transitions are automatically managed by RenderPasses.

ResolveSource 

Indicates that the image is resolved from a multi-sampled image.

This image layout translates to D3D12_BARRIER_LAYOUT_RESOLVE_SOURCE in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL in the Vulkan 🌋 backend.

ResolveDestination 

Indicates that the image is a render-target that a multi-sampled image is resolved into.

This image layout translates to D3D12_BARRIER_LAYOUT_RESOLVE_DEST in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL in the Vulkan 🌋 backend.

Undefined 

The layout of the image is not known by the engine.

Indicates that an image's layout is not known, which typically happens after creating image resources. It is not valid to transition any resource into this state.

This image layout translates to D3D12_BARRIER_LAYOUT_UNDEFINED in the DirectX 12 ❎ backend and VK_IMAGE_LAYOUT_UNDEFINED in the Vulkan 🌋 backend.

When using this layout as a source layout, the contents of the image may be discarded.

◆ IndexType

enum class LiteFX::Rendering::IndexType : UInt32
strong

Describes the element type of an index buffer.

Enumerator
UInt16 

Indices are stored as 2 byte unsigned integers.

UInt32 

Indices are stored as 4 byte unsigned integers.

◆ InstanceFlags

Controls how an instance within a ITopLevelAccelerationStructure behaves during ray-tracing.

Enumerator
None 

The instance uses default behavior.

DisableCull 

If this flag is set front- and backface culling is disabled for the instance.

FlipWinding 

If this flag is set, front- and backfaces flip their default cull order.

ForceOpaque 

If this flag is set, no geometry of the instance invokes the any-hit shader. This overwrites per-geometry flags.

This flag must not be set in combination with ForceNonOpaque.

See also
GeometryFlags::Opaque
ForceNonOpaque 

If this flag is set, each geometry of the instance will ignore the

See also
GeometryFlags::Opaque

setting.

This flag must not be set in combination with ForceOpaque.

See also
GeometryFlags::Opaque

◆ MipMapMode

enum class LiteFX::Rendering::MipMapMode
strong

Describes the filter operation between two mip-map levels.

See also
IImage, FilterMode
Enumerator
Nearest 

Take the texel from the mip-map level that is closest to the actual depth.

Linear 

Linearly interpolate between the texels of the two neighboring mip-map levels.

◆ MultiSamplingLevel

Describes the number of samples with which a IImage is sampled.

Enumerator
x1 

The default number of samples. Multi-sampling will be deactivated, if this sampling level is used.

x2 

Use 2 samples per pixel.

x4 

Use 4 samples per pixel.

x8 

Use 8 samples per pixel.

x16 

Use 16 samples per pixel.

x32 

Use 32 samples per pixel.

x64 

Use 64 samples per pixel.

◆ PipelineStage

Defines pipeline stages as points where synchronization may occur.

See also
IBarrier, ResourceAccess, ImageLayout
Enumerator
None 

Represents no-blocking behavior.

Translates to VK_PIPELINE_STAGE_NONE in Vulkan 🌋 and D3D12_BARRIER_SYNC_NONE in DirectX 12 ❎.

This stage flag is special, as it cannot be combined with other stage flags.

All 

Waits for all previous commands to be finished, or blocks all following commands until the barrier is executed.

Translates to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_ALL in DirectX 12 ❎.

This stage flag is special, as it cannot be combined with other stage flags.

Draw 

Waits for previous commands to finish all graphics stages, or blocks following commands until the graphics stages has finished.

Translates to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_DRAW in DirectX 12 ❎.

This stage flag is special, as it cannot be combined with other stage flags.

InputAssembly 

Waits for previous commands to finish the input assembly stage, or blocks following commands until the input assembly stage has finished.

Translates to VK_PIPELINE_STAGE_VERTEX_INPUT_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_INDEX_INPUT in DirectX 12 ❎.

Vertex 

Waits for previous commands to finish the vertex shader stage, or blocks following commands until the vertex shader stage has finished.

Translates to VK_PIPELINE_STAGE_VERTEX_SHADER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_VERTEX_SHADING in DirectX 12 ❎.

TessellationControl 

Waits for previous commands to finish the tessellation control/hull shader stage, or blocks following commands until the tessellation control/hull shader stage has finished.

Translates to VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_VERTEX_SHADING in DirectX 12 ❎.

TessellationEvaluation 

Waits for previous commands to finish the tessellation evaluation/domain shader stage, or blocks following commands until the tessellation evaluation/domain shader stage has finished.

Translates to VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_VERTEX_SHADING in DirectX 12 ❎.

Geometry 

Waits for previous commands to finish the geometry shader stage, or blocks following commands until the geometry shader stage has finished.

Translates to VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_VERTEX_SHADING in DirectX 12 ❎.

Fragment 

Waits for previous commands to finish the fragment/pixel shader stage, or blocks following commands until the fragment/pixel shader stage has finished.

Translates to VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_PIXEL_SHADING in DirectX 12 ❎.

DepthStencil 

Waits for previous commands to finish the depth/stencil stage, or blocks following commands until the depth/stencil stage has finished.

Translates to VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_DEPTH_STENCIL in DirectX 12 ❎.

Indirect 

Waits for previous commands to finish the draw indirect stage, or blocks following commands until the draw indirect stage has finished.

Translates to VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_EXECUTE_INDIRECT in DirectX 12 ❎.

RenderTarget 

Waits for previous commands to finish the output merger stage, or blocks following commands until the output merger stage has finished.

Translates to VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_RENDER_TARGET in DirectX 12 ❎.

Compute 

Waits for previous commands to finish the compute shader stage, or blocks following commands until the compute shader stage has finished.

Translates to VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_COMPUTE_SHADING in DirectX 12 ❎.

This stage flag is special, as it cannot be combined with other stage flags.

Transfer 

Waits for previous commands to finish the transfer stage, or blocks following commands until the transfer stage has finished.

Translates to VK_PIPELINE_STAGE_TRANSFER_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_COPY in DirectX 12 ❎.

Resolve 

Waits for previous commands to finish the multi-sampling resolution stage, or blocks following commands until the multi-sampling resolution stage has finished.

Translates to VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT in Vulkan 🌋 and D3D12_BARRIER_SYNC_RESOLVE in DirectX 12 ❎.

AccelerationStructureBuild 

Waits for previous commands to finish the building stage for an acceleration structure, or blocks the following commands until the building has finished.

This flag is only supported, if ray-tracing support is enabled. It translates to VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR in Vulkan 🌋 and D3D12_BARRIER_SYNC_BUILD_RAYTRACING_ACCELERATION_STRUCTURE in DirectX 12 ❎.

See also
IAccelerationStructure
AccelerationStructureCopy 

Waits for previous commands to finish the copying stage for an acceleration structure, or blocks the following commands until the copying has finished.

This flag is only supported, if ray-tracing support is enabled. It translates to VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR in Vulkan 🌋 and D3D12_BARRIER_SYNC_COPY_RAYTRACING_ACCELERATION_STRUCTURE in DirectX 12 ❎.

See also
IAccelerationStructure
Raytracing 

Waits for the previous commands to finish ray-tracing shader stages, or blocks the following commands until ray-tracing has finished.

This flag is only supported if ray-tracing support is enabled. It translates to VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR in Vulkan 🌋 and D3D12_BARRIER_SYNC_RAYTRACING in DirectX 12 ❎.

◆ PolygonMode

enum class LiteFX::Rendering::PolygonMode
strong

Describes the draw mode for polygons.

See also
InputAssembler
Enumerator
Solid 

Polygons are drawn as solid surfaces.

Wireframe 

Polygons are only drawn as wire-frames.

Point 

Polygons are drawn as points at the vertex positions.

◆ PrimitiveTopology

Describes the topology of a mesh primitive.

Enumerator
PointList 

A list of points where each vertex refers to an individual point.

LineList 

A list of lines where each vertex pair refers to the start and end points of a line.

See also
LineStrip
TriangleList 

A list of triangles, where each triplet of vertices refers to a whole triangle.

See also
TriangleStrip
LineStrip 

A strip of lines where each vertex (except the first one) refers to the end point for the next line segment.

See also
LineList
TriangleStrip 

A strip of triangles, where each vertex (except the first two) refers to the third vertex of the next triangle segment.

See also
TriangleList

◆ QueuePriority

Specifies the priority with which a queue is scheduled on the GPU.

Enumerator
Normal 

The default queue priority.

High 

A high queue priority.

Realtime 

The highest possible queue priority. Submitting work to this queue might block other queues.

Do not use this queue priority when creating queues, as it is reserved for the default (built-in) queues.

◆ QueueType

enum class LiteFX::Rendering::QueueType : UInt32
strong

Represents the type of a CommandQueue.

There are three major queue types: Graphics, Compute and Transfer. Each queue type has a larger subset of commands it is allowed to execute. For example, a graphics queue can be used to execute transfer or compute commands, whilst a compute queue may not execute graphics commands (such as draw).

You should always aim to use a queue that is dedicated for the workload you want to submit. For example, if you want to upload resources to the GPU, use the a dedicated transfer queue and synchronize access to the resource by waiting for the queue to finish at the point of time you need to access the resource. You can, however, also use the graphics queue for transfers. This can be more efficient, if you have resources that require to be updated with each frame. The performance impact of synchronizing two queues may be larger than simply using the graphics queue to begin with.

The advantage of using dedicated queues is, that they do not necessarily block execution. For example, when performing a compute or transfer workload on a graphics queue, you do not need to synchronize in order to wait for the result, however this also means that no rendering can take place until the workloads have finished.

Enumerator
None 

Describes an unspecified command queue. It is not valid to create a queue instance with this type.

Graphics 

Represents a queue that can execute graphics, compute and transfer workloads.

Compute 

Represents a queue that can execute compute and transfer workloads.

Transfer 

Represents a queue that can execute only transfer workloads.

VideoDecode 

Represents a queue that can perform hardware video decoding.

Video encoding/decoding is currently not a supported feature, but knowing all the capabilities of a queue is useful to select the best queue family for a particular task.

VideoEncode 

Represents a queue that can perform hardware video encoding.

Video encoding/decoding is currently a supported feature, but knowing all the capabilities of a queue is useful to select the best queue family for a particular task.

Other 

Represents an invalid queue type.

◆ RenderTargetFlags

Describes the behavior of render targets.

Enumerator
None 

No flags are enabled.

Clear 

If enabled, color or depth (depending on the render target type) are cleared when starting a render pass that renders to the render target.

ClearStencil 

If enabled and the render target format supports stencil storage, the stencil part is cleared when the render pass that renders to the render target is started.

Volatile 

If enabled, the render target is discarded after ending the render pass.

When this flag is set, the render target storage is freed after the render pass has finished. The main use of this is to have depth/stencil targets on a render pass that are only required during this render pass. It is not valid to attempt accessing the render target before or after the render pass.

◆ RenderTargetType

Describes the type of a render target.

Enumerator
Color 

Represents a color target.

DepthStencil 

Represents a depth/stencil target.

Present 

Represents a color target that should be presented.

This is similar to RenderTargetType::Color, but is used to optimize the memory layout of the target for it to be pushed to a swap chain.

◆ ResourceAccess

Defines how a IBuffer or IImage resource is accessed.

See also
IBarrier, IImage, IBuffer, PipelineStage, ImageLayout
Enumerator
None 

Indicates that a resource is not accessed.

This access mode translates to D3D12_BARRIER_ACCESS_NO_ACCESS in the DirectX 12 ❎ backend and VK_ACCESS_NONE in the Vulkan 🌋 backend.

This access flag is special, as it cannot be combined with other access flags.

VertexBuffer 

Indicates that a resource is accessed as a vertex buffer.

This access mode translates to D3D12_BARRIER_ACCESS_VERTEX_BUFFER in the DirectX 12 ❎ backend and VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT in the Vulkan 🌋 backend.

IndexBuffer 

Indicates that a resource is accessed as an index buffer.

This access mode translates to D3D12_BARRIER_ACCESS_INDEX_BUFFER in the DirectX 12 ❎ backend and VK_ACCESS_INDEX_READ_BIT in the Vulkan 🌋 backend.

UniformBuffer 

Indicates that a resource is accessed as an uniform/constant buffer.

This access mode translates to D3D12_BARRIER_ACCESS_CONSTANT_BUFFER in the DirectX 12 ❎ backend and VK_ACCESS_UNIFORM_READ_BIT in the Vulkan 🌋 backend.

RenderTarget 

Indicates that a resource is accessed as a render target.

This access mode translates to D3D12_BARRIER_ACCESS_RENDER_TARGET in the DirectX 12 ❎ backend and VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT in the Vulkan 🌋 backend.

DepthStencilRead 

Indicates that a resource is accessed as to read depth/stencil values.

This access mode translates to D3D12_BARRIER_ACCESS_DEPTH_STENCIL_READ in the DirectX 12 ❎ backend and VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT in the Vulkan 🌋 backend.

DepthStencilWrite 

Indicates that a resource is accessed as to write depth/stencil values.

This access mode translates to D3D12_BARRIER_ACCESS_DEPTH_STENCIL_WRITE in the DirectX 12 ❎ backend and VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT in the Vulkan 🌋 backend.

ShaderRead 

Indicates that a resource is accessed as a read-only shader resource.

This access mode translates to D3D12_BARRIER_ACCESS_SHADER_RESOURCE in the DirectX 12 ❎ backend and VK_ACCESS_SHADER_READ_BIT in the Vulkan 🌋 backend.

ShaderReadWrite 

Indicates that a resource is accessed as a read-write shader resource.

This access mode translates to D3D12_BARRIER_ACCESS_UNORDERED_ACCESS in the DirectX 12 ❎ backend and VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT in the Vulkan 🌋 backend.

Indirect 

Indicates that a resource is accessed as to read indirect draw commands.

This access mode translates to D3D12_BARRIER_ACCESS_INDIRECT_ARGUMENT in the DirectX 12 ❎ backend and VK_ACCESS_INDIRECT_COMMAND_READ_BIT in the Vulkan 🌋 backend.

TransferRead 

Indicates that a resource is accessed as to read during a transfer operation.

This access mode translates to D3D12_BARRIER_ACCESS_COPY_SOURCE in the DirectX 12 ❎ backend and VK_ACCESS_TRANSFER_READ_BIT in the Vulkan 🌋 backend.

TransferWrite 

Indicates that a resource is accessed as to write during a transfer operation.

This access mode translates to D3D12_BARRIER_ACCESS_COPY_DEST in the DirectX 12 ❎ backend and VK_ACCESS_TRANSFER_WRITE_BIT in the Vulkan 🌋 backend.

ResolveRead 

Indicates that a resource is accessed as to read during a resolve operation.

This access mode translates to D3D12_BARRIER_ACCESS_RESOLVE_SOURCE in the DirectX 12 ❎ backend and VK_ACCESS_MEMORY_READ_BIT in the Vulkan 🌋 backend.

ResolveWrite 

Indicates that a resource is accessed as to write during a resolve operation.

This access mode translates to D3D12_BARRIER_ACCESS_RESOLVE_DEST in the DirectX 12 ❎ backend and VK_ACCESS_MEMORY_WRITE_BIT in the Vulkan 🌋 backend.

Common 

Indicates that a resource can be accessed in any way, compatible to the layout.

Note that you have to ensure that you do not access the resource in an incompatible way manually.

This access mode translates to D3D12_BARRIER_ACCESS_COMMON in the DirectX 12 ❎ backend and VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT in the Vulkan 🌋 backend.

AccelerationStructureRead 

Indicates that a resources is accessed to read an acceleration structure.

This access mode flags is only supported if ray-tracing support is enabled. It translates D3D12_BARRIER_ACCESS_RAYTRACING_ACCELERATION_STRUCTURE_READ in the DirectX 12 ❎ backend and VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR in the Vulkan 🌋 backend.

AccelerationStructureWrite 

Indicates that a resources is accessed to write an acceleration structure.

This access mode flags is only supported if ray-tracing support is enabled. It translates D3D12_BARRIER_ACCESS_RAYTRACING_ACCELERATION_STRUCTURE_WRITE in the DirectX 12 ❎ backend and VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR in the Vulkan 🌋 backend.

◆ ResourceHeap

Defines where a resource (buffer or image) memory is located and from where it can be accessed.

There are three common memory usage scenarios that are supported by the engine:

  1. Static resources: such as vertex/index/constant buffers, textures or other infrequently updated buffers. In this case, the most efficient approach is to create a buffer using ResourceHeap::Staging and map it from the CPU. Create a second buffer using ResourceHeap::Resource and transfer the staging buffer into it.
  2. Dynamic resources: such as deformable meshes or buffers that need to be updated every frame. For such buffers use the ResourceHeap::Dynamic mode to prevent regular transfer overhead.
  3. Readbacks: or resources that are written on the GPU and read by the CPU. The usage mode ResourceHeap::Readback is designed to provide the best performance for this special case.

Note that image resources cannot be created on heaps different to ResourceHeap::Resource. For this very reason, the graphics factory does not allow to specify the resource heap when creating images or attachments.

See also
IGraphicsFactory, IBuffer
Enumerator
Staging 

Creates a resource that can be mapped from the CPU in order to be transferred to the GPU later.

The memory for the resource will be allocated in the DRAM (CPU or host memory). It can be optimally accessed by the CPU in order to be written. However, reading it from the GPU is not supported. This usage mode should be used to create a staging buffer, i.e. a buffer that is written infrequently and then transferred to another buffer, that uses ResourceHeap::Resource.

Resource 

Creates a resource that can be read by the GPU.

The memory for the resource will be allocated on the VRAM (GPU or device memory). It can be optimally accessed by the GPU in order to be read frequently. It can be written by a transfer call, but is inaccessible from the CPU.

Dynamic 

Creates a resource that can be mapped from the CPU and read by the GPU.

Dynamic buffers are used when the content is expected to be changed every frame. They do not require transfer calls, but may not be read as efficiently as ResourceHeap::Resource buffers.

Readback 

Creates a buffer that can be written on the GPU and read by the CPU.

◆ ResourceUsage

Describes the intended usage for a resource.

See also
IGraphicsFactory, IBuffer, IImage
Enumerator
None 

The resource is created without any special usage settings.

AllowWrite 

Allows the resource to be written to.

This flag is not allowed for vertex buffers (BufferType::Vertex), index buffers (BufferType::Index) and uniform buffers (BufferType::Uniform).

See also
IDeviceMemory::writable
TransferSource 

Allows the resource data to be copied into another resource.

This flag is implicitly set for resources created with ResourceHeap::Staging and for render target images (attachments).

TransferDestination 

Allows the resource data to be copied from another resource.

This flag is implicitly set for resources created with ResourceHeap::Readback and for render target images (attachments).

RenderTarget 

Allows the resource to be used as a render target.

AccelerationStructureBuildInput 

Allows the resource to be used to build acceleration structures.

This flag is not allowed for images and other acceleration structures (BufferType::AccelerationStructure).

See also
IAccelerationStructure
Default 

Shortcut for commonly used TransferSource | TransferDestination combination.

FrameBufferImage 

Default usage for frame buffer images.

See also
IFrameBuffer

◆ ShaderBindingGroup

Describes a group or combination of groups of a shader binding table.

See also
IRayTracingPipeline::allocateShaderBindingTable
Enumerator
RayGeneration 

Refers to the group of the shader binding table that stores the ray generation shader.

HitGroup 

Refers to the group of the shader binding table that stores the geometry hit shaders.

Miss 

Refers to the group of the shader binding table that stores the miss shaders.

Callable 

Refers to the group of the shader binding table that stores the callable shaders.

All 

Refers to a combination of all possible groups that can be stored in a shader binding table.

◆ ShaderRecordType

Describes the type of a shader module record within a shader collection or shader binting table.

See also
IShaderRecord
Enumerator
RayGeneration 

Represents a ray generation shader record.

HitGroup 

Represents a hit group shader record.

Intersection 

Represents an intersection shader record.

Miss 

Represents a miss shader record.

Callable 

Represents a callable shader record.

Invalid 

Represents a shader record that contains a module of an unsupported shader stage.

◆ ShaderStage

Describes the valid shader stages of a graphics pipeline.

Enumerator
Vertex 

Represents the vertex shader stage.

TessellationControl 

Represents the tessellation control or hull shader stage.

TessellationEvaluation 

Represents the tessellation evaluation or domain shader stage.

Geometry 

Represents the geometry shader stage.

Note that geometry shaders come with a performance penalty and might not be supported on all platforms. If you can, avoid using them.

Fragment 

Represents the fragment or pixel shader stage.

Compute 

Represents the compute shader stage.

Task 

Represents the task or amplification shader stage.

Mesh 

Represents the mesh shader stage.

RayGeneration 

Represents the ray generation shader stage.

AnyHit 

Represents the any-hit shader stage.

ClosestHit 

Represents the closest-hit shader stage.

Miss 

Represents the miss shader stage.

Intersection 

Represents the intersection shader stage.

Callable 

Represents the callable shader stage.

RasterizationPipeline 

Represents the complete rasterization pipeline.

MeshPipeline 

Represents the complete mesh shading pipeline.

RayTracingPipeline 

Represents the complete ray-tracing pipeline.

Any 

Enables all supported shader stages.

Other 

Represents an unknown shader stage.

◆ StencilOperation

An operation that is applied to the stencil buffer.

See also
DepthStencilState
Enumerator
Keep 

Keep the current stencil value.

Zero 

Set the stencil value to 0.

Replace 

Replace the current stencil value with the stencil ref.

IncrementClamp 

Increment the current stencil value.

DecrementClamp 

Decrement the current stencil value.

Invert 

Bitwise invert the current stencil value.

IncrementWrap 

Increment the current stencil value and wrap it, if it goes out of bounds.

DecrementWrap 

Decrement the current stencil value and wrap it, if it goes out of bounds.

◆ WriteMask

enum class LiteFX::Rendering::WriteMask
strong

Specifies a write mask for a color buffer.

See also
RenderTargetType
Enumerator

Write into the red channel.

Write into the green channel.

Write into the blue channel.

Write into the alpha channel.

Function Documentation

◆ alignas()

struct LITEFX_RENDERING_API LiteFX::Rendering::alignas ( 16 )

An indirect batch used to execute an standard draw call.

An indirect batch used to dispatch a compute shader kernel.

An indirect batch used to execute an indexed draw call.

See also
IndirectDispatchBatch, IndirectIndexedBatch
See also
IndirectDispatchBatch, IndirectBatch
See also
IndirectIndexedBatch, IndirectBatch

The number of vertices of the mesh.

See also
FirstVertex

The number of instances to draw of this mesh.

See also
FirstInstance

The index of the first vertex of the mesh in the vertex buffer.

See also
VertexCount

The index of the first index to draw. This value is added to each instance index before obtaining per-instance data from the vertex buffer.

See also
InstanceCount

The number of indices in the mesh index buffer.

See also
FirstIndex

The number of instances to draw of this mesh.

See also
FirstInstance

The first index in the index buffer used to draw the mesh.

See also
IndexCount

An offset added to each index to obtain a vertex.

The index of the first index to draw. This value is added to each instance index before obtaining per-instance data from the vertex buffer.

See also
InstanceCount

The number of threads into x-direction.

The number of threads into y-direction.

The number of threads into z-direction.

The number of indices in the mesh index buffer.

See also
FirstIndex

The number of instances to draw of this mesh.

See also
FirstInstance

The first index in the index buffer used to draw the mesh.

See also
IndexCount

An offset added to each index to obtain a vertex.

The index of the first index to draw. This value is added to each instance index before obtaining per-instance data from the vertex buffer.

See also
InstanceCount

The number of threads into x-direction.

The number of threads into y-direction.

The number of threads into z-direction.

◆ getBufferFormatChannels()

UInt32 LiteFX::Rendering::getBufferFormatChannels ( BufferFormat format)
constexpr

Returns the number of channels for a buffer format.

See also
BufferFormat

◆ getBufferFormatChannelSize()

UInt32 LiteFX::Rendering::getBufferFormatChannelSize ( BufferFormat format)
constexpr

Returns the number of bytes used by a channel of a buffer format.

See also
BufferFormat

◆ getBufferFormatType()

UInt32 LiteFX::Rendering::getBufferFormatType ( BufferFormat format)
constexpr

Returns the underlying data type of a buffer format.

See also
BufferFormat

◆ getSize()

size_t LiteFX::Rendering::getSize ( Format format)
constexpr

Returns the size of an element of a specified format.

◆ hasDepth()

bool LiteFX::Rendering::hasDepth ( Format format)
constexprnoexcept

Returns true, if the format contains a depth channel.

See also
DepthStencilState

◆ hasStencil()

bool LiteFX::Rendering::hasStencil ( Format format)
constexprnoexcept

Returns true, if the format contains a stencil channel.

See also
DepthStencilState

◆ LITEFX_DEFINE_FLAGS() [1/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( AccelerationStructureFlags )

◆ LITEFX_DEFINE_FLAGS() [2/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( BufferFormat )

◆ LITEFX_DEFINE_FLAGS() [3/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( GeometryFlags )

◆ LITEFX_DEFINE_FLAGS() [4/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( InstanceFlags )

◆ LITEFX_DEFINE_FLAGS() [5/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( PipelineStage )

◆ LITEFX_DEFINE_FLAGS() [6/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( QueueType )

◆ LITEFX_DEFINE_FLAGS() [7/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( RenderTargetFlags )

◆ LITEFX_DEFINE_FLAGS() [8/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( ResourceAccess )

◆ LITEFX_DEFINE_FLAGS() [9/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( ResourceUsage )

◆ LITEFX_DEFINE_FLAGS() [10/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( ShaderBindingGroup )

◆ LITEFX_DEFINE_FLAGS() [11/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( ShaderStage )

◆ LITEFX_DEFINE_FLAGS() [12/12]

LiteFX::Rendering::LITEFX_DEFINE_FLAGS ( WriteMask )

Variable Documentation

◆ SHADER_RECORD_LOCAL_DATA_ALIGNMENT

const size_t LiteFX::Rendering::SHADER_RECORD_LOCAL_DATA_ALIGNMENT { 8 }

The size (in bytes) to which shader record local data must be aligned.