Vireo  0.0
Vireo 3D Rendering Hardware Interface
vireo Namespace Reference

Classes

class  Buffer
 
struct  BufferCopyRegion
 
struct  BufferUploadInfo
 
union  ClearValue
 
struct  ColorBlendDesc
 
class  CommandAllocator
 
class  CommandList
 
class  ComputePipeline
 
struct  DepthClearValue
 
class  DescriptorLayout
 
class  DescriptorSet
 
class  Device
 
struct  DrawIndexedIndirectCommand
 
struct  DrawIndirectCommand
 
class  Exception
 
struct  Extent
 
class  Fence
 
class  GraphicPipeline
 
struct  GraphicPipelineConfiguration
 
class  Image
 
struct  ImageUploadInfo
 
class  Instance
 
class  PhysicalDevice
 
struct  PhysicalDeviceDesc
 
class  Pipeline
 
class  PipelineResources
 
struct  PushConstantsDesc
 
struct  Rect
 
class  RenderTarget
 
struct  RenderTargetDesc
 
struct  RenderingConfiguration
 
class  Sampler
 
class  Semaphore
 
class  ShaderModule
 
struct  StencilOpState
 
class  SubmitQueue
 
class  SwapChain
 
struct  VertexAttributeDesc
 
class  VertexInputLayout
 
struct  VideoMemoryAllocationDesc
 
struct  Viewport
 
class  Vireo
 

Typedefs

using DescriptorIndex = uint32_t
 
typedef union vireo::ClearValue ClearValue
 

Enums

enum class  Backend : uint8_t { UNDEFINED, DIRECTX, VULKAN }
 
enum class  Filter { NEAREST, LINEAR }
 
enum class  AddressMode { REPEAT, MIRRORED_REPEAT, CLAMP_TO_EDGE, CLAMP_TO_BORDER }
 
enum class  MipMapMode { NEAREST, LINEAR }
 
enum class  ImageFormat {
  R8_UNORM, R8_SNORM, R8_UINT, R8_SINT,
  R8G8_UNORM, R8G8_SNORM, R8G8_UINT, R8G8_SINT,
  R8G8B8A8_UNORM, R8G8B8A8_SNORM, R8G8B8A8_UINT, R8G8B8A8_SINT,
  R8G8B8A8_SRGB, B8G8R8A8_UNORM, B8G8R8A8_SRGB, B8G8R8X8_UNORM,
  B8G8R8X8_SRGB, A2B10G10R10_UNORM, A2B10G10R10_UINT, R16_UNORM,
  R16_SNORM, R16_UINT, R16_SINT, R16_SFLOAT,
  R16G16_UNORM, R16G16_SNORM, R16G16_UINT, R16G16_SINT,
  R16G16_SFLOAT, R16G16B16A16_UNORM, R16G16B16A16_SNORM, 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, D16_UNORM, D24_UNORM_S8_UINT,
  D32_SFLOAT, D32_SFLOAT_S8_UINT, BC1_UNORM, BC1_UNORM_SRGB,
  BC2_UNORM, BC2_UNORM_SRGB, BC3_UNORM, BC3_UNORM_SRGB,
  BC4_UNORM, BC4_SNORM, BC5_UNORM, BC5_SNORM,
  BC6H_UFLOAT, BC6H_SFLOAT, BC7_UNORM, BC7_UNORM_SRGB
}
 
enum class  BufferType {
  VERTEX, INDEX, INDIRECT, UNIFORM,
  STORAGE, DEVICE_STORAGE, READWRITE_STORAGE, BUFFER_UPLOAD,
  BUFFER_DOWNLOAD, IMAGE_UPLOAD, IMAGE_DOWNLOAD
}
 
enum class  IndexType { UINT16, UINT32 }
 
enum class  DescriptorType {
  UNIFORM, UNIFORM_DYNAMIC, STORAGE, DEVICE_STORAGE,
  READWRITE_STORAGE, SAMPLED_IMAGE, SAMPLER, READWRITE_IMAGE
}
 
enum class  CommandType { GRAPHIC, TRANSFER, COMPUTE }
 
enum class  AttributeFormat {
  R32_FLOAT, R32G32_FLOAT, R32G32B32_FLOAT, R32G32B32A32_FLOAT,
  R32_SINT, R32G32_SINT, R32G32B32_SINT, R32G32B32A32_SINT,
  R32_UINT, R32G32_UINT, R32G32B32_UINT, R32G32B32A32_UINT
}
 
enum class  RenderTargetType { COLOR, DEPTH, DEPTH_STENCIL }
 
enum class  CullMode { NONE, FRONT, BACK }
 
enum class  PrimitiveTopology {
  POINT_LIST, LINE_LIST, LINE_STRIP, TRIANGLE_LIST,
  TRIANGLE_STRIP
}
 
enum class  PolygonMode { FILL, WIREFRAME }
 
enum class  CompareOp {
  NEVER, LESS, EQUAL, LESS_OR_EQUAL,
  GREATER, NOT_EQUAL, GREATER_OR_EQUAL, ALWAYS
}
 
enum class  StencilOp {
  KEEP = 0, ZERO = 1, REPLACE = 2, INCREMENT_AND_CLAMP = 3,
  DECREMENT_AND_CLAMP = 4, INVERT = 5, INCREMENT_AND_WRAP = 6, DECREMENT_AND_WRAP = 7
}
 
enum class  BlendFactor {
  ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR,
  DST_COLOR, ONE_MINUS_DST_COLOR, SRC_ALPHA, ONE_MINUS_SRC_ALPHA,
  DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
  CONSTANT_ALPHA, ONE_MINUS_CONSTANT_ALPHA, SRC_ALPHA_SATURATE, SRC1_COLOR,
  ONE_MINUS_SRC1_COLOR, SRC1_ALPHA, ONE_MINUS_SRC1_ALPHA
}
 
enum class  BlendOp {
  ADD, SUBTRACT, REVERSE_SUBTRACT, MIN,
  MAX
}
 
enum class  LogicOp {
  CLEAR, SET, COPY, COPY_INVERTED,
  NOOP, INVERT, AND, NAND,
  OR, NOR, XOR, EQUIV,
  AND_REVERSE, AND_INVERTED, OR_REVERSE, OR_INVERTED
}
 
enum class  ColorWriteMask : uint8_t {
  RED = 0x00000001, GREEN = 0x00000002, BLUE = 0x00000004, ALPHA = 0x00000008,
  ALL = 0x0000000f
}
 
enum class  ShaderStage {
  ALL, VERTEX, FRAGMENT, HULL,
  DOMAIN, GEOMETRY, COMPUTE
}
 
enum class  WaitStage {
  NONE, PIPELINE_TOP, VERTEX_INPUT, VERTEX_SHADER,
  DEPTH_STENCIL_TEST_BEFORE_FRAGMENT_SHADER, FRAGMENT_SHADER, DEPTH_STENCIL_TEST_AFTER_FRAGMENT_SHADER, COLOR_OUTPUT,
  COMPUTE_SHADER, TRANSFER, PIPELINE_BOTTOM, ALL_GRAPHICS,
  ALL_COMMANDS, COPY, RESOLV, BLIT,
  CLEAR
}
 
enum class  ResourceState {
  UNDEFINED, GENERAL, RENDER_TARGET_COLOR, RENDER_TARGET_DEPTH,
  RENDER_TARGET_DEPTH_READ, RENDER_TARGET_DEPTH_STENCIL, RENDER_TARGET_DEPTH_STENCIL_READ, DISPATCH_TARGET,
  PRESENT, COPY_SRC, COPY_DST, SHADER_READ,
  COMPUTE_READ, COMPUTE_WRITE, INDIRECT_DRAW
}
 
enum class  MSAA {
  NONE = 0, X2 = 1, X4 = 2, X8 = 3,
  X16 = 4, X32 = 5, X64 = 6
}
 
enum class  PresentMode { IMMEDIATE = 0, VSYNC = 1 }
 
enum class  PipelineType { GRAPHIC, COMPUTE }
 
enum class  SemaphoreType { BINARY, TIMELINE }
 
enum class  VideoMemoryAllocationUsage { BUFFER, IMAGE }
 

Functions

consteval bool isMemoryUsageEnabled ()
 

Variables

constexpr bool ENABLE_VRAM_USAGE = true
 

Typedef Documentation

Structure specifying a clear value

Manual page : Render pass

using DescriptorIndex = uint32_t

Index type used for binding resources with a descriptor set

Manual page : Resources Descriptors

Enumeration Type Documentation

enum class AddressMode
strong

Possible values of the Vireo::createSampler addressMode* parameters, specifying the behavior of sampling with coordinates outside the range [0,1] for the respective u, v, or w coordinate.

Manual page : Image samplers

Enum ValuesDocumentation
REPEAT 

Repeat wrap mode.

MIRRORED_REPEAT 

Mirror repeat wrap mode.

CLAMP_TO_EDGE 

Clamp to edge wrap mode.

CLAMP_TO_BORDER 

Clamp to border wrap mode.

enum class AttributeFormat
strong

Size and type of a vertex attribute data

Manual page : Graphics Pipelines

Enum ValuesDocumentation
R32_FLOAT 

One signed float.

R32G32_FLOAT 

Two signed floats.

R32G32B32_FLOAT 

Three signed floats.

R32G32B32A32_FLOAT 

Four signed floats.

R32_SINT 

One signed int.

R32G32_SINT 

Two signed ints.

R32G32B32_SINT 

Three signed ints.

R32G32B32A32_SINT 

Four signed ints.

R32_UINT 

One unsigned int.

R32G32_UINT 

Two unsigned ints.

R32G32B32_UINT 

Three unsigned ints.

R32G32B32A32_UINT 

Four unsigned ints.

enum class Backend : uint8_t
strong

Type of supported backends

Manual page : The Vireo class

Enum ValuesDocumentation
UNDEFINED 

Not used.

DIRECTX 

Direct X 12.

VULKAN 

Vulkan 1.3.

enum class BlendFactor
strong

Framebuffer blending factors. cf. https://registry.khronos.org/vulkan/specs/latest/man/html/VkBlendFactor.html

Manual page : Graphics Pipelines

Enum ValuesDocumentation
ZERO 
ONE 
SRC_COLOR 
ONE_MINUS_SRC_COLOR 
DST_COLOR 
ONE_MINUS_DST_COLOR 
SRC_ALPHA 
ONE_MINUS_SRC_ALPHA 
DST_ALPHA 
ONE_MINUS_DST_ALPHA 
CONSTANT_COLOR 
ONE_MINUS_CONSTANT_COLOR 
CONSTANT_ALPHA 
ONE_MINUS_CONSTANT_ALPHA 
SRC_ALPHA_SATURATE 
SRC1_COLOR 
ONE_MINUS_SRC1_COLOR 
SRC1_ALPHA 
ONE_MINUS_SRC1_ALPHA 
enum class BlendOp
strong

Framebuffer blending operations. cf. https://registry.khronos.org/vulkan/specs/latest/man/html/VkBlendOp.html

Manual page : Graphics Pipelines

Enum ValuesDocumentation
ADD 
SUBTRACT 
REVERSE_SUBTRACT 
MIN 
MAX 
enum class BufferType
strong

VRAM Buffer use type

Manual page : Memory buffers

Enum ValuesDocumentation
VERTEX 

Used to store vertices (in GPU memory)

INDEX 

Used to store indices (in GPU memory)

INDIRECT 

Used to store draw commands for indirect drawing (in GPU memory)

UNIFORM 

Used for shader uniform (in host visible memory)

STORAGE 

Used for read-only shader storage (in host visible memory)

DEVICE_STORAGE 

Used for read-only shader storage (in GPU memory)

READWRITE_STORAGE 

Used for read/write shader storage (in GPU memory)

BUFFER_UPLOAD 

Used to copy data into the VRAM (from host visible memory to GPU memory)

BUFFER_DOWNLOAD 

Used to copy from the VRAM (from host visible memory to GPU memory)

IMAGE_UPLOAD 

Used for image copy operations (from host visible memory to GPU memory)

IMAGE_DOWNLOAD 

Used for image copy operations (from GPU memory to host visible)

enum class ColorWriteMask : uint8_t
strong
Enum ValuesDocumentation
RED 
GREEN 
BLUE 
ALPHA 
ALL 
enum class CommandType
strong

Type of command or submit queue

Manual pages : Command Lists, Submission queues

Enum ValuesDocumentation
GRAPHIC 

Command/Queue for a graphic pipeline.

TRANSFER 

Command/Queue for copy operations.

COMPUTE 

Command/Queue for a compute pipeline.

enum class CompareOp
strong

Comparison operator for depth, stencil, and sampler operations

Manual page : Graphics Pipelines

Enum ValuesDocumentation
NEVER 

Comparison always evaluates false.

LESS 

Comparison evaluates reference < test.

EQUAL 

Comparison evaluates reference = test.

LESS_OR_EQUAL 

Comparison evaluates reference ≤ test.

GREATER 

Comparison evaluates reference > test.

NOT_EQUAL 

Comparison evaluates reference ≠ test.

GREATER_OR_EQUAL 

Comparison evaluates reference ≥ test.

ALWAYS 

Comparison always evaluates true.

enum class CullMode
strong

Values controlling triangle culling. Triangle orientation is specified in the pipeline configuration.

Manual page : Graphics Pipelines

Enum ValuesDocumentation
NONE 

No triangles are discarded.

FRONT 

Front-facing triangles are discarded.

BACK 

Back-facing triangles are discarded.

enum class DescriptorType
strong

Type of data for shaders

Manual page : Resources Descriptors

Enum ValuesDocumentation
UNIFORM 

Uniform buffer.

UNIFORM_DYNAMIC 

Dynamic binding uniform buffer.

STORAGE 

Read-only storage buffer in host-visible memory.

DEVICE_STORAGE 

Read-only storage buffer in GPU memory.

READWRITE_STORAGE 

Read & write storage buffer.

SAMPLED_IMAGE 

Sampled texture (image only, no sampler)

SAMPLER 

Sampler for SAMPLED_IMAGE.

READWRITE_IMAGE 

Read/Write image for compute shaders.

enum class Filter
strong

Possible values of the Vireo::createSampler magFilter and minFilter parameters, specifying filters used for texture lookups

Manual page : Image samplers

Enum ValuesDocumentation
NEAREST 

Nearest filtering.

LINEAR 

Linear filtering.

enum class ImageFormat
strong

Available image formats. Only the common formats between the supported back ends are available.

Manual page : Images

Enum ValuesDocumentation
R8_UNORM 
R8_SNORM 
R8_UINT 
R8_SINT 
R8G8_UNORM 
R8G8_SNORM 
R8G8_UINT 
R8G8_SINT 
R8G8B8A8_UNORM 
R8G8B8A8_SNORM 
R8G8B8A8_UINT 
R8G8B8A8_SINT 
R8G8B8A8_SRGB 
B8G8R8A8_UNORM 
B8G8R8A8_SRGB 
B8G8R8X8_UNORM 
B8G8R8X8_SRGB 
A2B10G10R10_UNORM 
A2B10G10R10_UINT 
R16_UNORM 
R16_SNORM 
R16_UINT 
R16_SINT 
R16_SFLOAT 
R16G16_UNORM 
R16G16_SNORM 
R16G16_UINT 
R16G16_SINT 
R16G16_SFLOAT 
R16G16B16A16_UNORM 
R16G16B16A16_SNORM 
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 
D16_UNORM 
D24_UNORM_S8_UINT 
D32_SFLOAT 
D32_SFLOAT_S8_UINT 
BC1_UNORM 
BC1_UNORM_SRGB 
BC2_UNORM 
BC2_UNORM_SRGB 
BC3_UNORM 
BC3_UNORM_SRGB 
BC4_UNORM 
BC4_SNORM 
BC5_UNORM 
BC5_SNORM 
BC6H_UFLOAT 
BC6H_SFLOAT 
BC7_UNORM 
BC7_UNORM_SRGB 
enum class IndexType
strong

Index type for vertex indices

Manual page : Graphics Pipelines

Enum ValuesDocumentation
UINT16 

Two bytes unsigned int.

UINT32 

Four bytes unsigned int.

enum class LogicOp
strong

Framebuffer logical operations. cf. https://registry.khronos.org/vulkan/specs/latest/man/html/VkLogicOp.html

Manual page : Graphics Pipelines

Enum ValuesDocumentation
CLEAR 
SET 
COPY 
COPY_INVERTED 
NOOP 
INVERT 
AND 
NAND 
OR 
NOR 
XOR 
EQUIV 
AND_REVERSE 
AND_INVERTED 
OR_REVERSE 
OR_INVERTED 
enum class MipMapMode
strong

Possible values of the Vireo::createSampler mipmapMode parameter, specifying the mipmap mode used for texture lookups.

Manual page : Image samplers

Enum ValuesDocumentation
NEAREST 

Nearest filtering.

LINEAR 

Linear filtering.

enum class MSAA
strong

Sample counts supported for an image used for storage operations

Manual pages : Graphics Pipelines and Render pass

Enum ValuesDocumentation
NONE 
X2 

2x MSAA

X4 

4x MSAA

X8 

8x MSAA

X16 

16x MSAA

X32 

32x MSAA

X64 

64x MSAA

enum class PipelineType
strong

Pipeline type

Manual page : Pipelines

Enum ValuesDocumentation
GRAPHIC 
COMPUTE 
enum class PolygonMode
strong

Control polygon rasterization mode

Manual page : Graphics Pipelines

Enum ValuesDocumentation
FILL 

Polygon is filled.

WIREFRAME 

Polygon edges are drawn as line segments.

enum class PresentMode
strong

Presentation mode for a surface

Manual page : Swap Chains

Enum ValuesDocumentation
IMMEDIATE 

The presentation engine does not wait for a vertical blanking period to update the current image, meaning this mode may result in visible tearing.

VSYNC 

The presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed.

enum class PrimitiveTopology
strong

Supported primitive topologies

Manual page : Graphics Pipelines

Enum ValuesDocumentation
POINT_LIST 

A series of separate point primitives.

LINE_LIST 

A series of separate line primitives.

LINE_STRIP 

A series of connected line primitives with consecutive lines sharing a vertex.

TRIANGLE_LIST 

A series of separate triangle primitives.

TRIANGLE_STRIP 

A series of connected triangle primitives with consecutive triangles sharing an edge.

enum class RenderTargetType
strong

Use of a render target image

Manual page : Graphics Pipelines

Enum ValuesDocumentation
COLOR 

Used as a color attachment.

DEPTH 

Used as a depth attachment.

DEPTH_STENCIL 

Used as a depth and stencil attachment.

enum class ResourceState
strong

State/Layout of images for pipeline barriers

Manual page : Memory barriers

Enum ValuesDocumentation
UNDEFINED 

Unknown/general/common state.

GENERAL 

All types of device access.

RENDER_TARGET_COLOR 

Used as a color attachment in the graphics pipeline.

RENDER_TARGET_DEPTH 

Used as a depth attachment in the graphics pipeline.

RENDER_TARGET_DEPTH_READ 

Used as a depth attachment in the graphics pipeline.

RENDER_TARGET_DEPTH_STENCIL 

Used as a depth and stencil attachment in the graphics pipeline.

RENDER_TARGET_DEPTH_STENCIL_READ 

Used as a depth and stencil attachment in the graphics pipeline.

DISPATCH_TARGET 

Used as a read/write image with a compute pipeline.

PRESENT 

Used for presenting a presentable image for display.

COPY_SRC 

Used as a source of a transfer/copy/blit command.

COPY_DST 

Used as a destination of a transfer/copy/blit command.

SHADER_READ 

Read-only access for images and buffers.

COMPUTE_READ 

Read-only access in a compute shader.

COMPUTE_WRITE 

Read-write access in a compute shader.

INDIRECT_DRAW 

Buffer used as indirect draw datas.

enum class SemaphoreType
strong

Semaphores types.

Manual page : Semaphores

Enum ValuesDocumentation
BINARY 

Binary semaphores have two states - signaled and unsignaled.

TIMELINE 

Timeline semaphores have a strictly increasing 64-bit unsigned integer payload and are signaled with respect to a particular reference value.

enum class ShaderStage
strong

Pipeline stage

Manual page : Shaders

Enum ValuesDocumentation
ALL 

All shader stages supported by the device.

VERTEX 

Vertex shader stage.

FRAGMENT 

Fragment/pixel stage.

HULL 

Tessellation control/Hull stage.

DOMAIN 

Tessellation evaluation/Domain stage.

GEOMETRY 

Geometry stage.

COMPUTE 

Compute stage.

enum class StencilOp
strong
Enum ValuesDocumentation
KEEP 

Keeps the current value.

ZERO 

Sets the value to 0.

REPLACE 

Sets the value to the reference value.

INCREMENT_AND_CLAMP 

Increments the current value and clamps to the maximum representable unsigned value.

DECREMENT_AND_CLAMP 

Decrements the current value and clamps to 0.

INVERT 

Bitwise-inverts the current value.

INCREMENT_AND_WRAP 

Increments the current value and wraps to 0 when the maximum value would have been exceeded.

DECREMENT_AND_WRAP 

Decrements the current value and wraps to the maximum possible value when the value would go below 0.

enum class VideoMemoryAllocationUsage
strong

Use of memory allocation

Enum ValuesDocumentation
BUFFER 
IMAGE 
enum class WaitStage
strong

Semaphores wait stages

Manual page : Semaphores

Enum ValuesDocumentation
NONE 
PIPELINE_TOP 
VERTEX_INPUT 
VERTEX_SHADER 
DEPTH_STENCIL_TEST_BEFORE_FRAGMENT_SHADER 
FRAGMENT_SHADER 
DEPTH_STENCIL_TEST_AFTER_FRAGMENT_SHADER 
COLOR_OUTPUT 
COMPUTE_SHADER 
TRANSFER 
PIPELINE_BOTTOM 
ALL_GRAPHICS 
ALL_COMMANDS 
COPY 
RESOLV 
BLIT 
CLEAR 

Function Documentation

consteval bool vireo::isMemoryUsageEnabled ( )

Returns true if memory usage collection is enabled

Variable Documentation

constexpr bool ENABLE_VRAM_USAGE = true
constexpr

Enable this to collect memory usage for buffers & images