wisdom
Loading...
Searching...
No Matches
wis Namespace Reference

Classes

struct  AcceleratedGeometryInput
 Geometry description for bottom-level acceleration structure. Mayy contain AABBs or Triangles. More...
 
struct  AdapterDesc
 Adapter description. Describes hardware driver identificators as well as memory limits. More...
 
struct  AllocationInfo
 Allocation info for Resource Allocation. More...
 
struct  ASAllocationInfo
 Acceleration structure allocation info. Used to query sizes for AS build/update buffers. More...
 
struct  BlendAttachmentDesc
 Blend attachment description for wis::BlendStateDesc. More...
 
struct  BlendStateDesc
 Blend state description for . More...
 
struct  BufferBarrier
 Buffer barrier for wis::CommandList. More...
 
struct  BufferRegion
 Buffer region for copy operations. More...
 
struct  BufferTextureCopyRegion
 Buffer to texture copy region. More...
 
struct  ComponentMapping
 Component mapping for wis::ShaderResourceDesc. More...
 
struct  DepthStencilDesc
 Depth stencil description for . More...
 
struct  DescriptorBindingDesc
 Descriptor binding description for RootSignature and Descriptor Storage creation. Description place in array determines binding index that this lane maps to. e.g. bindings[1] means on HLSL side this results in [[vk::binding(0,1)]]. All the bindings in Descriptor Storage are unbounded, array of these structures determine the presence and order of the bindings. More...
 
struct  DescriptorTable
 Descriptor table for wis::DescriptorBuffer. More...
 
struct  DescriptorTableEntry
 Descriptor table entry for wis::DescriptorTable. More...
 
struct  DeviceConstants
 Constants that device provide to work with it. More...
 
struct  DeviceExtQuery
 Struct used to query the extensions for C code. Queried results should not be freed, their lifetime ends with the Factory they were created with. If wis::DeviceExtQuery::extension_id is 0, wis::DeviceExtQuery::result must be populated with already created extension. Otherwise extension is ignored. More...
 
struct  FactoryExtQuery
 Struct used to query the extensions for C code. Queried results should not be freed, their lifetime ends with the Factory they were created with. If wis::FactoryExtQuery::extension_id is 0, wis::FactoryExtQuery::result must be populated with already created extension. Otherwise extension is ignored. More...
 
struct  HitGroupDesc
 Hit group description for Raytracing pipeline. More...
 
struct  InputAttribute
 Input attribute description for wis::InputLayout. More...
 
struct  InputLayout
 Input layout description for . More...
 
struct  InputSlotDesc
 Input slot description for wis::InputLayout. More...
 
struct  is_flag_enum
 
struct  is_flag_enum< wis::AccelerationStructureFlags >
 
struct  is_flag_enum< wis::AdapterFlags >
 
struct  is_flag_enum< wis::ASGeometryFlags >
 
struct  is_flag_enum< wis::ASInstanceFlags >
 
struct  is_flag_enum< wis::BarrierSync >
 
struct  is_flag_enum< wis::BufferUsage >
 
struct  is_flag_enum< wis::ColorComponents >
 
struct  is_flag_enum< wis::DSSelect >
 
struct  is_flag_enum< wis::FenceFlags >
 
struct  is_flag_enum< wis::MemoryFlags >
 
struct  is_flag_enum< wis::PipelineFlags >
 
struct  is_flag_enum< wis::RenderPassFlags >
 
struct  is_flag_enum< wis::ResourceAccess >
 
struct  is_flag_enum< wis::TextureUsage >
 
struct  PushConstant
 A set of constants that get pushed directly to the pipeline. Only one set can be created per shader stage. More...
 
struct  PushDescriptor
 Push descriptor. Used to push data directly to pipeline. More...
 
struct  RasterizerDesc
 Rasterizer description for . More...
 
struct  RaytracingConstants
 Constants that device provide to work with raytracing. More...
 
struct  RaytracingDispatchDesc
 Raytracing dispatch description for wis::CommandList. More...
 
struct  RenderAttachmentsDesc
 Render attachments description for . More...
 
struct  RenderTargetDesc
 Render target description for wis::RenderTarget creation. More...
 
struct  Result
 Main source of communication of operation success. To check for success compare wis::Result::status with wis::Status::Ok. If there is any error there is string which is compile-time. It communicates the source of problems even in Release mode. The string contains function name and error message. More...
 
struct  ResultValue
 
struct  SampleDesc
 Sample description of Multisampling for . More...
 
struct  SamplerDesc
 Sampler description for wis::Sampler creation. More...
 
struct  Scissor
 Scissor description for wis::CommandList. More...
 
struct  ShaderBindingTableInfo
 Shader binding table description for Raytracing pipeline. More...
 
struct  ShaderExport
 Defines export shader functions from a library shader. More...
 
struct  ShaderResourceDesc
 Shader resource description for . More...
 
struct  Size2D
 2D unsigned size. More...
 
struct  Size3D
 3D unsigned size. More...
 
struct  StencilDesc
 Stencil description for wis::DepthStencilDesc. More...
 
struct  SubresourceRange
 Subresource range for wis::TextureBarrier. More...
 
struct  SwapchainDesc
 Swapchain description for wis::SwapChain creation. More...
 
struct  TextureBarrier
 Texture barrier for wis::CommandList. More...
 
struct  TextureCopyRegion
 Texture to texture copy region. More...
 
struct  TextureDesc
 Texture description for wis::Texture creation. More...
 
struct  TextureRegion
 Texture region for copy operations. More...
 
struct  TopLevelASBuildDesc
 Top level acceleration structure build description. More...
 
struct  UnorderedAccessDesc
 Unordered access description for RW Texture creation. More...
 
struct  Viewport
 Viewport description for wis::CommandList. Viewport is considered from Top Left corner. More...
 

Typedefs

using DebugCallback = void(*)(wis::Severity severity, const char *message, void *user_data)
 Debug callback delegate. Used for Library internal log messages.
 

Enumerations

enum class  ShaderStages : uint32_t {
  All = 0 , Vertex = 1 , Hull = 2 , Domain = 3 ,
  Geometry = 4 , Pixel = 5 , Amplification = 6 , Mesh = 7 ,
  Count = 8
}
 Shader stages that can be used in the pipeline. Main use is Root signature and descriptor management. Stages have no granularity, either all or one can be selected. More...
 
enum class  Status : int32_t {
  Ok = 0 , Timeout = 1 , Partial = 2 , Error = -1 ,
  InvalidArgument = -2 , OutOfMemory = -3 , DeviceLost = -4 , Occluded = -5
}
 Represents main error communication source for the API. Compare against wis::Status::Ok for success. More...
 
enum class  QueueType : uint32_t { Graphics = 0 , Compute = 2 , Copy = 3 , VideoDecode = 4 }
 Type of the queue to create. More...
 
enum class  DescriptorType : uint32_t {
  Sampler = 0 , ConstantBuffer = 1 , Texture = 2 , RWTexture = 3 ,
  RWBuffer = 4 , Buffer = 5 , AccelerationStructure = 6
}
 Type of the descriptor in the descriptor table. More...
 
enum class  MutiWaitFlags : uint32_t { All = 0 , Any = 1 }
 Determines the behavior when wait for multiple fences is issued. More...
 
enum class  ASGeometryType : uint32_t { Triangles = 0 , AABBs = 1 }
 Type of the geometry in the Acceleration Structure. More...
 
enum class  AdapterPreference { None = 0 , MinConsumption = 1 , Performance = 2 }
 Oreders the adapters according to preference using builtin heuristics of underlying APIs. More...
 
enum class  RaytracingShaderType : uint32_t {
  Raygen = 0 , Miss = 1 , ClosestHit = 2 , AnyHit = 3 ,
  Intersection = 4 , Callable = 5
}
 Shader stages that can be used in the raytracing pipeline. More...
 
enum class  Severity {
  Debug = 0 , Trace = 1 , Info = 2 , Warning = 3 ,
  Error = 4 , Critical = 5
}
 Log message severity. Used with wis::DebugCallback and internal library logging. More...
 
enum class  ASLevel : uint32_t { Bottom = 0 , Top = 1 }
 Level of the Raytracing Acceleration Structure. Used to create Acceleration structures. More...
 
enum class  HitGroupType : uint32_t { Triangles = 0 , Procedural = 1 }
 Type of the hit group in the raytracing pipeline. More...
 
enum class  InputClass : uint32_t { PerVertex = 0 , PerInstance = 1 }
 Input classification for vertex buffer data. More...
 
enum class  CullMode : uint32_t { None = 1 , Front = 2 , Back = 3 }
 Cull mode for rasterizer. Triangle culling depends on wis::WindingOrder option. More...
 
enum class  DataFormat : uint32_t {
  Unknown = 0 , RGBA32Float = 2 , RGBA32Uint = 3 , RGBA32Sint = 4 ,
  RGB32Float = 6 , RGB32Uint = 7 , RGB32Sint = 8 , RGBA16Float = 10 ,
  RGBA16Unorm = 11 , RGBA16Uint = 12 , RGBA16Snorm = 13 , RGBA16Sint = 14 ,
  RG32Float = 16 , RG32Uint = 17 , RG32Sint = 18 , D32FloatS8Uint = 20 ,
  RGB10A2Unorm = 24 , RGB10A2Uint = 25 , RG11B10Float = 26 , RGBA8Unorm = 28 ,
  RGBA8UnormSrgb = 29 , RGBA8Uint = 30 , RGBA8Snorm = 31 , RGBA8Sint = 32 ,
  RG16Float = 34 , RG16Unorm = 35 , RG16Uint = 36 , RG16Snorm = 37 ,
  RG16Sint = 38 , D32Float = 40 , R32Float = 41 , R32Uint = 42 ,
  R32Sint = 43 , D24UnormS8Uint = 45 , RG8Unorm = 49 , RG8Uint = 50 ,
  RG8Snorm = 51 , RG8Sint = 52 , R16Float = 54 , D16Unorm = 55 ,
  R16Unorm = 56 , R16Uint = 57 , R16Snorm = 58 , R16Sint = 59 ,
  R8Unorm = 61 , R8Uint = 62 , R8Snorm = 63 , R8Sint = 64 ,
  RGB9E5UFloat = 67 , BC1RGBAUnorm = 71 , BC1RGBAUnormSrgb = 72 , BC2RGBAUnorm = 74 ,
  BC2RGBAUnormSrgb = 75 , BC3RGBAUnorm = 77 , BC3RGBAUnormSrgb = 78 , BC4RUnorm = 80 ,
  BC4RSnorm = 81 , BC5RGUnorm = 83 , BC5RGSnorm = 84 , B5G6R5Unorm = 85 ,
  B5G5R5A1Unorm = 86 , BGRA8Unorm = 87 , BGRA8UnormSrgb = 91 , BC6HUfloat16 = 95 ,
  BC6HSfloat16 = 96 , BC7RGBAUnorm = 98 , BC7RGBAUnormSrgb = 99 , BGRA4Unorm = 115
}
 Data format for data. Used as a template for data in several cases. Can be used to describe: More...
 
enum class  FillMode : uint32_t { Lines = 2 , Solid = 3 }
 Fill mode for rasterizer. More...
 
enum class  DescriptorMemory : uint32_t { CpuOnly = 0 , ShaderVisible = 1 }
 Descriptor memory type. Decides if descriptors are visible and can be bound to GPU. More...
 
enum class  WindingOrder : uint32_t { Clockwise = 0 , CounterClockwise = 1 }
 Winding order for front-facing triangles. More...
 
enum class  SampleRate : uint32_t {
  S1 = 1 , S2 = 2 , S4 = 4 , S8 = 8 ,
  S16 = 16
}
 Sample rate for multisampling. More...
 
enum class  SwapchainScaling : uint32_t { None = 0 , Stretch = 1 , Aspect = 2 }
 Swapchain scaling mode. More...
 
enum class  Compare : uint32_t {
  None = 0 , Never = 1 , Less = 2 , Equal = 3 ,
  LessEqual = 4 , Greater = 5 , NotEqual = 6 , GreaterEqual = 7 ,
  Always = 8
}
 Comparison function for depth and stencil operations. More...
 
enum class  StencilOp : uint32_t {
  Keep = 1 , Zero = 2 , Replace = 3 , IncClamp = 4 ,
  DecClamp = 5 , Invert = 6 , IncWrap = 7 , DecWrap = 8
}
 Stencil operation for depth and stencil operations. More...
 
enum class  BlendFactor : uint32_t {
  Zero = 1 , One = 2 , SrcColor = 3 , InvSrcColor = 4 ,
  SrcAlpha = 5 , InvSrcAlpha = 6 , DestAlpha = 7 , InvDestAlpha = 8 ,
  DestColor = 9 , InvDestColor = 10 , SrcAlphaSat = 11 , ConstantColor = 14 ,
  InvBlendFactor = 15 , Src1Color = 16 , InvSrc1Color = 17 , Src1Alpha = 18 ,
  InvSrc1Alpha = 19
}
 Blend factor for color blending operations. More...
 
enum class  BlendOp : uint32_t {
  Add = 1 , Subtract = 2 , RevSubtract = 3 , Min = 4 ,
  Max = 5
}
 Blend operation for color blending operations. More...
 
enum class  LogicOp : uint32_t {
  Clear = 0 , Set = 1 , Copy = 2 , CopyInverted = 3 ,
  Noop = 4 , Invert = 5 , And = 6 , Nand = 7 ,
  Or = 8 , Nor = 9 , Xor = 10 , Equiv = 11 ,
  AndReverse = 12 , AndInverted = 13 , OrReverse = 14 , OrInverted = 15
}
 Logic operation for color blending operations. More...
 
enum class  MemoryType : uint32_t {
  Default = 0 , DeviceLocal = 0 , Upload = 1 , Readback = 2 ,
  GPUUpload = 3
}
 Memory type for resource allocation. More...
 
enum class  ShaderIntermediate : uint32_t { DXIL = 0 , SPIRV = 1 }
 Intermediate shader representation. More...
 
enum class  TextureState : uint32_t {
  Undefined = 4294967295 , Common = 0 , Read = 1 , RenderTarget = 2 ,
  UnorderedAccess = 3 , DepthStencilWrite = 4 , DepthStencilRead = 5 , ShaderResource = 6 ,
  CopySource = 7 , CopyDest = 8 , Present = 9 , ShadingRate = 10 ,
  VideoDecodeRead = 11 , VideoDecodeWrite = 12
}
 Texture state for resource transitions. More...
 
enum class  LoadOperation : uint32_t { Load = 0 , Clear = 1 , DontCare = 2 }
 Attachment load operation for render pass. More...
 
enum class  TextureLayout : uint32_t {
  Texture1D = 2 , Texture1DArray = 3 , Texture2D = 4 , Texture2DArray = 5 ,
  Texture2DMS = 6 , Texture2DMSArray = 7 , Texture3D = 8
}
 Texture layout. Determines how texture will be accessed. More...
 
enum class  DescriptorHeapType : uint32_t { Descriptor = 0 , Sampler = 1 }
 Descriptor heap type. More...
 
enum class  StoreOperation : uint32_t { Store = 0 , DontCare = 1 , Resolve = 2 }
 Attachment store operation for render pass. More...
 
enum class  PrimitiveTopology : uint32_t {
  PointList = 1 , LineList = 2 , LineStrip = 3 , TriangleList = 4 ,
  TriangleStrip = 5 , TriangleFan = 6 , LineListAdj = 10 , LineStripAdj = 11 ,
  TriangleListAdj = 12 , TriangleStripAdj = 13
}
 Primitive topology for rendering. More info could be found here. More...
 
enum class  TopologyType : uint32_t { Point = 1 , Line = 2 , Triangle = 3 , Patch = 4 }
 Primitive topology type for rendering. More...
 
enum class  DeviceFeature : uint32_t {
  EnchancedBarriers = 1 , WaitForPresent = 2 , AdvancedIndexBuffer = 4 , DynamicVSync = 5 ,
  UnusedRenderTargets = 6 , PushDescriptors = 7
}
 Features that device may support. Query by calling with Device::QueryFeatureSupport. Contains core features with optional ones. More...
 
enum class  Filter : uint32_t { Point = 0 , Linear = 1 }
 Filtering mode for texture sampling. More...
 
enum class  AddressMode : uint32_t {
  Repeat = 0 , MirroredRepeat = 1 , ClampToEdge = 2 , ClampToBorder = 3 ,
  MirrorClampToEdge = 4
}
 Address mode for texture sampling. More...
 
enum class  TextureViewType : uint32_t {
  Texture1D = 0 , Texture1DArray = 1 , Texture2D = 2 , Texture2DArray = 3 ,
  Texture2DMS = 4 , Texture2DMSArray = 5 , Texture3D = 6 , TextureCube = 7 ,
  TextureCubeArray = 8
}
 Texture view type. More...
 
enum class  ComponentSwizzle : uint32_t {
  Red = 0 , Green = 1 , Blue = 2 , Alpha = 3 ,
  Zero = 4 , One = 5
}
 Component swizzle for texture sampling. More...
 
enum class  IndexType : uint32_t { UInt16 = 2 , UInt32 = 4 }
 Index type for index buffer. Enum values resemble the byte stride of the format. More...
 
enum class  FactoryExtID : uint32_t { Custom = 0 , DebugExtension = 1 }
 Factory extension ID. Platform extension values start from 2049 0 is reserved as invalid/custom extension. More...
 
enum class  DeviceExtID : uint32_t { Custom = 0 , DescriptorBufferExtension = 1 , ExtendedAllocation = 2 }
 Device extension ID. Platform extension values start from 2049 0 is reserved as invalid/custom extension. More...
 
enum class  ASCopyMode : uint32_t { Clone = 0 , Compact = 1 , Serialize = 2 , Deserialize = 3 }
 Acceleration structure copy mode. More...
 
enum class  AdapterFlags { None = 0x0 , Remote = 1 << 0 , Software = 1 << 1 }
 Flags that describe adapter. More...
 
enum class  DSSelect { None = 0x0 , Depth = 1 << 0 , Stencil = 1 << 1 , DepthStencil = 0x3 }
 Depth stencil select flags. Affect which part of the depth stencil buffer is used. More...
 
enum class  ColorComponents {
  None = 0x0 , R = 1 << 0 , G = 1 << 1 , B = 1 << 2 ,
  A = 1 << 3 , All = 0xF
}
 Color component flags. Used for color blending operations. More...
 
enum class  BufferUsage {
  None = 0x0 , CopySrc = 1 << 0 , CopyDst = 1 << 1 , ConstantBuffer = 1 << 2 ,
  IndexBuffer = 1 << 3 , VertexBuffer = 1 << 4 , IndirectBuffer = 1 << 5 , StorageBuffer = 1 << 6 ,
  AccelerationStructureBuffer = 1 << 7 , AccelerationStructureInput = 1 << 8 , ShaderBindingTable = 1 << 9
}
 Buffer usage flags. Determine how the buffer can be used throughout its lifetime. More...
 
enum class  MemoryFlags { None = 0x0 , DedicatedAllocation = 1 << 0 , Mapped = 1 << 1 , Exportable = 1 << 2 }
 Memory flags. Determine optional properties of the memory allocation. More...
 
enum class  RenderPassFlags { None = 0x0 , Suspending = 1 << 1 , Resuming = 1 << 2 }
 Render pass flags. Set of flags that affect render pass behavior. More on render pass flags here. More...
 
enum class  BarrierSync {
  None = 0x0 , All = 1 << 0 , Draw = 1 << 1 , IndexInput = 1 << 2 ,
  VertexShading = 1 << 3 , PixelShading = 1 << 4 , DepthStencil = 1 << 5 , RenderTarget = 1 << 6 ,
  Compute = 1 << 7 , Raytracing = 1 << 8 , Copy = 1 << 9 , Resolve = 1 << 10 ,
  ExecuteIndirect = 1 << 11 , AllShading = 1 << 12 , NonPixelShading = 1 << 13 , ClearUAV = 1 << 14 ,
  VideoDecode = 1 << 15 , VideoEncode = 1 << 16 , BuildRTAS = 1 << 17 , CopyRTAS = 1 << 18
}
 Barrier synchronization flags. Used to synchronize resources between different stages of the pipeline. More...
 
enum class  ResourceAccess {
  Common = 0x0 , VertexBuffer = 1 << 0 , ConstantBuffer = 1 << 1 , IndexBuffer = 1 << 2 ,
  RenderTarget = 1 << 3 , UnorderedAccess = 1 << 4 , DepthWrite = 1 << 5 , DepthRead = 1 << 6 ,
  ShaderResource = 1 << 7 , StreamOutput = 1 << 8 , IndirectArgument = 1 << 9 , CopyDest = 1 << 10 ,
  CopySource = 1 << 11 , ConditionalRendering = 1 << 12 , AccelerationStructureRead = 1 << 13 , AccelerationStructureWrite = 1 << 14 ,
  ShadingRate = 1 << 15 , VideoDecodeRead = 1 << 16 , VideoDecodeWrite = 1 << 17 , ResolveDest = 1 << 18 ,
  ResolveSource = 1 << 19 , NoAccess = 1 << 31
}
 Resource access flags. Determine how resource will be accessed. Used in Barriers. More...
 
enum class  TextureUsage {
  None = 0x0 , RenderTarget = 1 << 0 , DepthStencil = 1 << 1 , CopySrc = 1 << 2 ,
  CopyDst = 1 << 3 , ShaderResource = 1 << 4 , UnorderedAccess = 1 << 5 , HostCopy = 1 << 7
}
 Texture usage flags. Determine how the texture can be used throughout its lifetime. More...
 
enum class  FenceFlags { None = 0x0 , Shared = 1 << 0 }
 Fence flags for additional fence features. More...
 
enum class  PipelineFlags { None = 0x0 , DescriptorBuffer = 1 << 0 }
 Pipeline flags for additional pipeline features. More...
 
enum class  ASGeometryFlags { None = 0x0 , Opaque = 1 << 0 , NoDuplicateAnyHitInvocation = 1 << 1 }
 Geometry flags for additional geometry features. More...
 
enum class  AccelerationStructureFlags {
  None = 0x0 , AllowUpdate = 1 << 0 , AllowCompaction = 1 << 1 , PreferFastTrace = 1 << 2 ,
  PreferFastBuild = 1 << 3 , MinimizeMemory = 1 << 4
}
 Acceleration structure flags for additional acceleration structure features. More...
 
enum class  ASInstanceFlags {
  None = 0x0 , TriangleCullDisable = 1 << 0 , TriangleFrontCounterClockwise = 1 << 1 , ForceOpaque = 1 << 2 ,
  ForceNoOpaque = 1 << 3
}
 Instance flags for additional instance features. More...
 

Functions

template<uint32_t s, typename RetTy >
constexpr decltype(auto) get (ResultValue< RetTy > &rv) noexcept
 

Variables

constexpr Result success
 

Detailed Description

Wisdom API Version 0.6.11

Copyright (c) 2024 Ilya Doroshenko. All rights reserved. License: MIT See also: repository on GitHub

Typedef Documentation

◆ DebugCallback

using wis::DebugCallback = typedef void (*)(wis::Severity severity, const char* message, void* user_data)

Debug callback delegate. Used for Library internal log messages.

Parameters
severitySeverity of the message. Depend on WISDOM_LOG_LEVEL option.
messageMessage string.
user_dataUser data pointer.

Definition at line 2273 of file api.hpp.

Enumeration Type Documentation

◆ AccelerationStructureFlags

Acceleration structure flags for additional acceleration structure features.

Translates to D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS for dx implementation. Translates to VkBuildAccelerationStructureFlagsKHR for vk implementation.

Enumerator
None 

No flags set. Acceleration structure is regular.

AllowUpdate 

Acceleration structure is allowed to be updated.

AllowCompaction 

Acceleration structure is allowed to be compacted.

PreferFastTrace 

Acceleration structure is preferred to be fast traced.

PreferFastBuild 

Acceleration structure is preferred to be fast built.

MinimizeMemory 

Acceleration structure is minimized for memory usage.

Definition at line 1501 of file api.hpp.

◆ AdapterFlags

enum class wis::AdapterFlags
strong

Flags that describe adapter.

Enumerator
None 

No flags set. Adapter may be descrete or embedded.

Remote 

Adapter is remote. Used for remote rendering.

Software 

Adapter is software. Used for software rendering.

Definition at line 1277 of file api.hpp.

◆ AdapterPreference

enum class wis::AdapterPreference
strong

Oreders the adapters according to preference using builtin heuristics of underlying APIs.

Translates to DXGI_GPU_PREFERENCE for dx implementation.

Enumerator
None 

No particular preference, list adapters in system divised order.

MinConsumption 

List the adapters from low power consumption to high. Order is as follows: Integrated, Discrete, External, Software.

Performance 

List the adapters from high performance to low. Order is as follows: External, Discrete, Integrated, Software.

Definition at line 202 of file api.hpp.

◆ AddressMode

enum class wis::AddressMode : uint32_t
strong

Address mode for texture sampling.

Translates to VkSamplerAddressMode for vk implementation. Translates to D3D12_TEXTURE_ADDRESS_MODE for dx implementation.

Enumerator
Repeat 

Repeat the texture.

MirroredRepeat 

Repeat the texture with mirroring.

ClampToEdge 

Clamp the texture to the edge.

ClampToBorder 

Clamp the texture to the border.

MirrorClampToEdge 

Mirror and clamp the texture to the edge.

Definition at line 1184 of file api.hpp.

◆ ASCopyMode

enum class wis::ASCopyMode : uint32_t
strong

Acceleration structure copy mode.

Translates to VkCopyAccelerationStructureModeKHR for vk implementation. Translates to D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE for dx implementation.

Enumerator
Clone 

Clone the acceleration structure.

Compact 

Compact the acceleration structure.

Serialize 

Serialize the acceleration structure.

Deserialize 

Deserialize the acceleration structure.

Definition at line 1266 of file api.hpp.

◆ ASGeometryFlags

enum class wis::ASGeometryFlags
strong

Geometry flags for additional geometry features.

Translates to D3D12_RAYTRACING_GEOMETRY_FLAGS for dx implementation. Translates to VkGeometryFlagsKHR for vk implementation.

Enumerator
None 

No flags set. Geometry is regular.

Opaque 

Geometry is opaque. Used for opaque geometry.

NoDuplicateAnyHitInvocation 

Geometry has no duplicate any hit invocation.

Definition at line 1489 of file api.hpp.

◆ ASGeometryType

enum class wis::ASGeometryType : uint32_t
strong

Type of the geometry in the Acceleration Structure.

Translates to VkGeometryTypeKHR for vk implementation. Translates to D3D12_RAYTRACING_GEOMETRY_TYPE for dx implementation.

Enumerator
Triangles 

Triangles geometry type. Used for triangle meshes.

AABBs 

Axis Aligned Bounding Boxes geometry type. Used for bounding volume hierarchies.

Definition at line 191 of file api.hpp.

◆ ASInstanceFlags

enum class wis::ASInstanceFlags
strong

Instance flags for additional instance features.

Translates to D3D12_RAYTRACING_INSTANCE_FLAGS for dx implementation. Translates to VkGeometryInstanceFlagsKHR for vk implementation.

Enumerator
None 

No flags set. Instance is regular.

TriangleCullDisable 

Triangle cull is disabled.

TriangleFrontCounterClockwise 

Triangle front is counter clockwise.

ForceOpaque 

Force opaque.

ForceNoOpaque 

Force no opaque.

Definition at line 1516 of file api.hpp.

◆ ASLevel

enum class wis::ASLevel : uint32_t
strong

Level of the Raytracing Acceleration Structure. Used to create Acceleration structures.

Enumerator
Bottom 

Bottom level Acceleration Structure. Contains geometry data.

Top 

Top level Acceleration Structure. Contains instance data.

Definition at line 260 of file api.hpp.

◆ BarrierSync

enum class wis::BarrierSync
strong

Barrier synchronization flags. Used to synchronize resources between different stages of the pipeline.

Translates to D3D12_BARRIER_SYNC for dx implementation. Translates to VkPipelineStageFlags2 for vk implementation.

Enumerator
None 

No flags set. No synchronization is performed.

All 

Synchronize all commands.

Draw 

Synchronize draw commands.

IndexInput 

Synchronize index input commands.

VertexShading 

Synchronize vertex shading commands.

PixelShading 

Synchronize pixel shading commands.

DepthStencil 

Synchronize depth stencil commands.

RenderTarget 

Synchronize render target commands.

Compute 

Synchronize compute commands.

Raytracing 

Synchronize raytracing commands.

Copy 

Synchronize copy commands.

Resolve 

Synchronize resolve commands.

ExecuteIndirect 

Synchronize execute indirect commands.

AllShading 

Synchronize all shading commands.

NonPixelShading 

Synchronize non-pixel shading commands.

ClearUAV 

Synchronize clear UAV commands.

VideoDecode 

Synchronize video decode commands.

VideoEncode 

Synchronize video encode commands.

BuildRTAS 

Synchronize build raytracing acceleration structure commands.

CopyRTAS 

Synchronize copy raytracing acceleration structure commands.

Definition at line 1381 of file api.hpp.

◆ BlendFactor

enum class wis::BlendFactor : uint32_t
strong

Blend factor for color blending operations.

Translates to D3D12_BLEND for dx implementation. Translates to VkBlendFactor for vk implementation.

Enumerator
Zero 

Use zero for blending.

One 

Use one for blending.

SrcColor 

Use the source color for blending.

InvSrcColor 

Use the inverse source color for blending.

SrcAlpha 

Use the source alpha for blending.

InvSrcAlpha 

Use the inverse source alpha for blending.

DestAlpha 

Use the destination alpha for blending.

InvDestAlpha 

Use the inverse destination alpha for blending.

DestColor 

Use the destination color for blending.

InvDestColor 

Use the inverse destination color for blending.

SrcAlphaSat 

Use the source alpha saturated for blending.

ConstantColor 

Use a constant blend factor for blending.

InvBlendFactor 

Use the inverse constant blend factor for blending.

Src1Color 

Use the source color for blending. Dual source blending mode.

InvSrc1Color 

Use the inverse source color for blending. Dual source blending mode.

Src1Alpha 

Use the source alpha for blending. Dual source blending mode.

InvSrc1Alpha 

Use the inverse source alpha for blending. Dual source blending mode.

Definition at line 922 of file api.hpp.

◆ BlendOp

enum class wis::BlendOp : uint32_t
strong

Blend operation for color blending operations.

Translates to D3D12_BLEND_OP for dx implementation. Translates to VkBlendOp for vk implementation.

Enumerator
Add 

Add the source and destination colors.

Subtract 

Subtract the source color from the destination color.

RevSubtract 

Subtract the destination color from the source color.

Min 

Use the minimum of the source and destination colors.

Max 

Use the maximum of the source and destination colors.

Definition at line 948 of file api.hpp.

◆ BufferUsage

enum class wis::BufferUsage
strong

Buffer usage flags. Determine how the buffer can be used throughout its lifetime.

Translates to VkBufferUsageFlags for vk implementation. Translates to D3D12_RESOURCE_FLAGS for dx implementation.

Enumerator
None 

No flags set. Buffer is not used.

CopySrc 

Buffer is used as a source for copy operations.

CopyDst 

Buffer is used as a destination for copy operations.

ConstantBuffer 

Buffer is used as a constant buffer.

IndexBuffer 

Buffer is used as an index buffer.

VertexBuffer 

Buffer is used as a vertex buffer or an instance buffer.

IndirectBuffer 

Buffer is used as an indirect buffer.

StorageBuffer 

Buffer is used as a storage unordered access buffer.

AccelerationStructureBuffer 

Buffer is used as an acceleration structure buffer.

AccelerationStructureInput 

Buffer is used as a read only acceleration instance input buffer.

ShaderBindingTable 

Buffer is used as a shader binding table buffer.

Definition at line 1316 of file api.hpp.

◆ ColorComponents

enum class wis::ColorComponents
strong

Color component flags. Used for color blending operations.

Enumerator
None 

No flags set. Color blending is not used.

Use red component for blending.

Use green component for blending.

Use blue component for blending.

Use alpha component for blending.

All 

Use all color components for blending.

Definition at line 1300 of file api.hpp.

◆ Compare

enum class wis::Compare : uint32_t
strong

Comparison function for depth and stencil operations.

Translates to D3D12_COMPARISON_FUNC for dx implementation. Translates to VkCompareOp for vk implementation.

Enumerator
None 

No comparison.

Never 

Always fail the comparison.

Less 

Pass the comparison if the source value is less than the destination value.

Equal 

Pass the comparison if the source value is equal to the destination value.

LessEqual 

Pass the comparison if the source value is less than or equal to the destination value.

Greater 

Pass the comparison if the source value is greater than the destination value.

NotEqual 

Pass the comparison if the source value is not equal to the destination value.

GreaterEqual 

Pass the comparison if the source value is greater than or equal to the destination value.

Always 

Always pass the comparison.

Definition at line 887 of file api.hpp.

◆ ComponentSwizzle

enum class wis::ComponentSwizzle : uint32_t
strong

Component swizzle for texture sampling.

Translates to D3D12_SHADER_COMPONENT_MAPPING for dx implementation. Translates to VkComponentSwizzle for vk implementation.

Enumerator
Red 

Use the red component for sampling.

Green 

Use the green component for sampling.

Blue 

Use the blue component for sampling.

Alpha 

Use the alpha component for sampling.

Zero 

Use zero for sampling.

One 

Use one for sampling.

Definition at line 1216 of file api.hpp.

◆ CullMode

enum class wis::CullMode : uint32_t
strong

Cull mode for rasterizer. Triangle culling depends on wis::WindingOrder option.

Translates to D3D12_CULL_MODE for dx implementation. Translates to VkCullModeFlags for vk implementation.

Enumerator
None 

No culling.

Front 

Cull front-facing triangles.

Back 

Cull back-facing triangles.

Definition at line 292 of file api.hpp.

◆ DataFormat

enum class wis::DataFormat : uint32_t
strong

Data format for data. Used as a template for data in several cases. Can be used to describe:

  • Vertex buffer data format
  • Texture data format
  • Render target data format
  • Depth stencil data format

Translates to DXGI_FORMAT for dx implementation. Translates to VkFormat for vk implementation.

Enumerator
Unknown 

Unknown format.

RGBA32Float 

32 bit per channel RGBA format. A four-component, 128-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, a 32-bit A component in bytes 12..15.

RGBA32Uint 

32 bit per channel RGBA format. A four-component, 128-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, a 32-bit A component in bytes 12..15.

RGBA32Sint 

32 bit per channel RGBA format. A four-component, 128-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, a 32-bit A component in bytes 12..15.

RGB32Float 

32 bit per channel RGB format. A three-component, 96-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11.

RGB32Uint 

32 bit per channel RGB format. A three-component, 96-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11.

RGB32Sint 

32 bit per channel RGB format. A three-component, 96-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11.

RGBA16Float 

16 bit per channel RGBA format. A four-component, 64-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, a 16-bit A component in bytes 6..7.

RGBA16Unorm 

16 bit per channel RGBA format. A four-component, 64-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, a 16-bit A component in bytes 6..7.

RGBA16Uint 

16 bit per channel RGBA format. A four-component, 64-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, a 16-bit A component in bytes 6..7.

RGBA16Snorm 

16 bit per channel RGBA format. A four-component, 64-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, a 16-bit A component in bytes 6..7.

RGBA16Sint 

16 bit per channel RGBA format. A four-component, 64-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, a 16-bit A component in bytes 6..7.

RG32Float 

32 bit per channel RG format. A two-component, 64-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7.

RG32Uint 

32 bit per channel RG format. A two-component, 64-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7.

RG32Sint 

32 bit per channel RG format. A two-component, 64-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7.

D32FloatS8Uint 

32 bit depth, 8 bit stencil format. A combined depth/stencil format with a 32-bit depth component in bytes 0..3 and an 8-bit stencil component in bytes 4..4.

RGB10A2Unorm 

10 bit per channel RGB format with 2 bit alpha. A four-component, 32-bit unsigned normalized format that has a 10-bit R component in bits 0..9, a 10-bit G component in bits 10..19, a 10-bit B component in bits 20..29, a 2-bit A component in bits 30..31.

RGB10A2Uint 

10 bit per channel RGB format with 2 bit alpha. A four-component, 32-bit unsigned integer format that has a 10-bit R component in bits 0..9, a 10-bit G component in bits 10..19, a 10-bit B component in bits 20..29, a 2-bit A component in bits 30..31.

RG11B10Float 

11 bit per channel RG format with 10 bit blue. A three-component, 32-bit signed floating-point format that has a 11-bit R component in bits 0..10, a 11-bit G component in bits 11..21, a 10-bit B component in bits 22..31.

RGBA8Unorm 

8 bit per channel RGBA format. A four-component, 32-bit unsigned normalized format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1, an 8-bit B component in bytes 2..2, an 8-bit A component in bytes 3..3.

RGBA8UnormSrgb 

8 bit per channel RGBA format. SRGB non-linear color space. A four-component, 32-bit unsigned normalized non-linear SRGB format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1, an 8-bit B component in bytes 2..2, an 8-bit A component in bytes 3..3.

RGBA8Uint 

8 bit per channel RGBA format. A four-component, 32-bit unsigned integer format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1, an 8-bit B component in bytes 2..2, an 8-bit A component in bytes 3..3.

RGBA8Snorm 

8 bit per channel RGBA format. A four-component, 32-bit signed normalized format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1, an 8-bit B component in bytes 2..2, an 8-bit A component in bytes 3..3.

RGBA8Sint 

8 bit per channel RGBA format. A four-component, 32-bit signed integer format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1, an 8-bit B component in bytes 2..2, an 8-bit A component in bytes 3..3.

RG16Float 

16 bit per channel RG format. A two-component, 32-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3.

RG16Unorm 

16 bit per channel RG format. A two-component, 32-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3.

RG16Uint 

16 bit per channel RG format. A two-component, 32-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3.

RG16Snorm 

16 bit per channel RG format. A two-component, 32-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3.

RG16Sint 

16 bit per channel RG format. A two-component, 32-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3.

D32Float 

32 bit depth format. A 32-bit depth format supporting 32-bit floating-point depth values.

R32Float 

32 bit per channel R format. A one-component, 32-bit signed floating-point format that has a 32-bit R component in bytes 0..3.

R32Uint 

32 bit per channel R format. A one-component, 32-bit unsigned integer format that has a 32-bit R component in bytes 0..3.

R32Sint 

32 bit per channel R format. A one-component, 32-bit signed integer format that has a 32-bit R component in bytes 0..3.

D24UnormS8Uint 

24 bit depth, 8 bit stencil format. A combined depth/stencil format with a 24-bit depth component in bytes 0..2 and an 8-bit stencil component in bytes 3..3.

RG8Unorm 

8 bit per channel RG format. A two-component, 16-bit unsigned normalized format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1.

RG8Uint 

8 bit per channel RG format. A two-component, 16-bit unsigned integer format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1.

RG8Snorm 

8 bit per channel RG format. A two-component, 16-bit signed normalized format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1.

RG8Sint 

8 bit per channel RG format. A two-component, 16-bit signed integer format that has an 8-bit R component in bytes 0..0, an 8-bit G component in bytes 1..1.

R16Float 

16 bit per channel R format. A one-component, 16-bit signed floating-point format that has a 16-bit R component in bytes 0..1.

D16Unorm 

16 bit depth format. A 16-bit depth format supporting 16-bit unsigned normalized depth values.

R16Unorm 

16 bit per channel R format. A one-component, 16-bit unsigned normalized format that has a 16-bit R component in bytes 0..1.

R16Uint 

16 bit per channel R format. A one-component, 16-bit unsigned integer format that has a 16-bit R component in bytes 0..1.

R16Snorm 

16 bit per channel R format. A one-component, 16-bit signed normalized format that has a 16-bit R component in bytes 0..1.

R16Sint 

16 bit per channel R format. A one-component, 16-bit signed integer format that has a 16-bit R component in bytes 0..1.

R8Unorm 

8 bit per channel R format. A one-component, 8-bit unsigned normalized format that has an 8-bit R component in bytes 0..0.

R8Uint 

8 bit per channel R format. A one-component, 8-bit unsigned integer format that has an 8-bit R component in bytes 0..0.

R8Snorm 

8 bit per channel R format. A one-component, 8-bit signed normalized format that has an 8-bit R component in bytes 0..0.

R8Sint 

8 bit per channel R format. A one-component, 8-bit signed integer format that has an 8-bit R component in bytes 0..0.

RGB9E5UFloat 

9 bit per channel RGB format with shared exponent. A three-component, 32-bit unsigned floating-point format that has a 9-bit R component in bits 0..8, a 9-bit G component in bits 9..17, a 9-bit B component in bits 18..26, a shared 5-bit exponent in bits 27..31.

BC1RGBAUnorm 

BC1/DXT1 compressed format. A four-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha.

BC1RGBAUnormSrgb 

BC1/DXT1 compressed format. A four-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha.

BC2RGBAUnorm 

BC2/DXT3 compressed format. A four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.

BC2RGBAUnormSrgb 

BC2/DXT3 compressed format. A four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.

BC3RGBAUnorm 

BC3/DXT5 compressed format. A four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.

BC3RGBAUnormSrgb 

BC3/DXT5 compressed format. A four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.

BC4RUnorm 

BC4 compressed format. A single-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized red texel data.

BC4RSnorm 

BC4 compressed format. A single-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of signed normalized red texel data.

BC5RGUnorm 

BC5 compressed format. A two-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized red and green texel data.

BC5RGSnorm 

BC5 compressed format. A two-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed normalized red and green texel data.

B5G6R5Unorm 

16 bit per channel RGB format. A three-component, 16-bit unsigned normalized format that has a 5-bit B component in bits 0..4, a 6-bit G component in bits 5..10, a 5-bit R component in bits 11..15.

B5G5R5A1Unorm 

16 bit per channel RGBA format. A four-component, 16-bit unsigned normalized format that has a 5-bit B component in bits 0..4, a 5-bit G component in bits 5..9, a 5-bit R component in bits 10..14, a 1-bit A component in bits 15..15.

BGRA8Unorm 

8 bit per channel RGBA format. A four-component, 32-bit unsigned normalized format that has an 8-bit B component in bytes 0..0, an 8-bit G component in bytes 1..1, an 8-bit R component in bytes 2..2, an 8-bit A component in bytes 3..3.

BGRA8UnormSrgb 

8 bit per channel RGBA format. SRGB non-linear color space. A four-component, 32-bit unsigned normalized non-linear SRGB format that has an 8-bit B component in bytes 0..0, an 8-bit G component in bytes 1..1, an 8-bit R component in bytes 2..2, an 8-bit A component in bytes 3..3.

BC6HUfloat16 

BC6H compressed format. A three-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned floating-point RGB texel data.

BC6HSfloat16 

BC6H compressed format. A three-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed floating-point RGB texel data.

BC7RGBAUnorm 

BC7 compressed format. A four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.

BC7RGBAUnormSrgb 

BC7 compressed format. A four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding.

BGRA4Unorm 

4 bit per channel RGB format. A four-component, 16-bit unsigned normalized format that has a 4-bit B component in bits 0..3, a 4-bit G component in bits 4..7, a 4-bit R component in bits 8..11, a 4-bit A component in bits 12..15.

Definition at line 310 of file api.hpp.

◆ DescriptorHeapType

enum class wis::DescriptorHeapType : uint32_t
strong

Descriptor heap type.

Translates to D3D12_DESCRIPTOR_HEAP_TYPE for dx implementation.

Enumerator
Descriptor 

Descriptor heap type. Used for all descriptor types, except for samplers.

Sampler 

Sampler heap type. Used for sampler descriptors.

Definition at line 1077 of file api.hpp.

◆ DescriptorMemory

enum class wis::DescriptorMemory : uint32_t
strong

Descriptor memory type. Decides if descriptors are visible and can be bound to GPU.

Translates to D3D12_DESCRIPTOR_HEAP_FLAGS for dx implementation.

Enumerator
CpuOnly 

Descriptors are only visible to CPU. May be used for copying descriptors to the GPU visible pool.

ShaderVisible 

Descriptors are visible to GPU. Descriptors can be bound to the GPU pipeline directly.

Definition at line 831 of file api.hpp.

◆ DescriptorType

enum class wis::DescriptorType : uint32_t
strong

Type of the descriptor in the descriptor table.

Translates to D3D12_DESCRIPTOR_RANGE_TYPE for dx implementation. Translates to VkDescriptorType for vk implementation.

Enumerator
Sampler 

Descriptor is a sampler. Sampler is used to sample textures in shaders. Stored in separate descriptor table and can't be mixed with other descriptor types.

ConstantBuffer 

Descriptor is a constant buffer.

Texture 

Descriptor is a texture.

RWTexture 

Descriptor is an unordered access read-write texture. Used for read/write operations in compute shaders.

RWBuffer 

Descriptor is an unordered access read-write buffer. Used for read/write operations in compute shaders.

Buffer 

Descriptor is a shader resource buffer. May be bigger than constant buffers, but slower.

AccelerationStructure 

Descriptor is an acceleration structure.

Definition at line 148 of file api.hpp.

◆ DeviceExtID

enum class wis::DeviceExtID : uint32_t
strong

Device extension ID. Platform extension values start from 2049 0 is reserved as invalid/custom extension.

Enumerator
Custom 

Custom provided extension. Default initialization of the extension is done by user.

Definition at line 1254 of file api.hpp.

◆ DeviceFeature

enum class wis::DeviceFeature : uint32_t
strong

Features that device may support. Query by calling with Device::QueryFeatureSupport. Contains core features with optional ones.

Enumerator
EnchancedBarriers 

Core Functionality. Supports enhanced barriers. Support for VK and DX12. Used in all barriers to provide more control over synchronization. Without the feature behavior is undefined. To run without this feature for DX12 there are legacy barriers, which can be manually submitted through CommandList internals. Vulkan will not work, as half of current functionality depends on VK_KHR_synchronization2.

WaitForPresent 

Supports waiting for present to finish. Support for VK, always true for DX12. Unlocks Swapchain::WaitForPresent.

AdvancedIndexBuffer 

Supports advanced index buffer features. Support for VK, always true for DX12. Unlocks CommandList::IASetIndexBuffer2 function. Without the extension behavior is undefined.

DynamicVSync 

Supports dynamic VSync. Support for VK, always true for DX12. Unlocks Swapchain::Present2 function. Without the extension behavior is the same as Swapchain::Present.

UnusedRenderTargets 

Supports unused render targets. Support for VK, always true for DX12.

PushDescriptors 

Supports push descriptors. Support for VK, always true for DX12.

Definition at line 1140 of file api.hpp.

◆ DSSelect

enum class wis::DSSelect
strong

Depth stencil select flags. Affect which part of the depth stencil buffer is used.

Enumerator
None 

No flags set. Depth stencil buffer is not used.

Depth 

Use depth part of the depth stencil buffer.

Stencil 

Use stencil part of the depth stencil buffer.

DepthStencil 

Use both depth and stencil parts of the depth stencil buffer.

Definition at line 1288 of file api.hpp.

◆ FactoryExtID

enum class wis::FactoryExtID : uint32_t
strong

Factory extension ID. Platform extension values start from 2049 0 is reserved as invalid/custom extension.

Enumerator
Custom 

Custom provided extension. Default initialization of the extension is done by user.

Definition at line 1243 of file api.hpp.

◆ FenceFlags

enum class wis::FenceFlags
strong

Fence flags for additional fence features.

Translates to D3D12_FENCE_FLAGS for dx implementation.

Enumerator
None 

No flags set. Fence is regular.

Shared 

Fence is shared. Used for sharing fences for single physical device.

Definition at line 1463 of file api.hpp.

◆ FillMode

enum class wis::FillMode : uint32_t
strong

Fill mode for rasterizer.

Translates to D3D12_FILL_MODE for dx implementation. Translates to VkPolygonMode for vk implementation.

Enumerator
Lines 

Draw lines between vertices. Wireframe rendering.

Solid 

Fill the area between vertices forming polygons.

Definition at line 820 of file api.hpp.

◆ Filter

enum class wis::Filter : uint32_t
strong

Filtering mode for texture sampling.

Translates to VkFilter for vk implementation. Translates to D3D12_FILTER_TYPE for dx implementation.

Enumerator
Point 

Nearest neighbor filtering.

Linear 

Linear filtering.

Definition at line 1173 of file api.hpp.

◆ HitGroupType

enum class wis::HitGroupType : uint32_t
strong

Type of the hit group in the raytracing pipeline.

Translates to VkRayTracingShaderGroupTypeKHR for vk implementation. Translates to D3D12_HIT_GROUP_TYPE for dx implementation.

Enumerator
Triangles 

Hit group for triangles.

Procedural 

Hit group for procedural geometry.

Definition at line 271 of file api.hpp.

◆ IndexType

enum class wis::IndexType : uint32_t
strong

Index type for index buffer. Enum values resemble the byte stride of the format.

Translates to DXGI_FORMAT for dx implementation. Translates to VkIndexType for vk implementation.

Enumerator
UInt16 

16-bit unsigned integer index type.

UInt32 

32-bit unsigned integer index type.

Definition at line 1232 of file api.hpp.

◆ InputClass

enum class wis::InputClass : uint32_t
strong

Input classification for vertex buffer data.

Enumerator
PerVertex 

Vertex buffer data is vertex data.

PerInstance 

Vertex buffer data is per instance data.

Definition at line 280 of file api.hpp.

◆ LoadOperation

enum class wis::LoadOperation : uint32_t
strong

Attachment load operation for render pass.

Translates to VkAttachmentLoadOp for vk implementation. Translates to D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE for dx implementation.

Enumerator
Load 

Load the attachment contents.

Clear 

Clear the attachment contents.

DontCare 

Do not care about the attachment contents.

Definition at line 1052 of file api.hpp.

◆ LogicOp

enum class wis::LogicOp : uint32_t
strong

Logic operation for color blending operations.

Translates to D3D12_LOGIC_OP for dx implementation. Translates to VkLogicOp for vk implementation.

Enumerator
Clear 

Clear the destination value.

Set 

Set the destination value.

Copy 

Copy the source value to the destination.

CopyInverted 

Copy the inverted source value to the destination.

Noop 

Do not modify the destination value.

Invert 

Invert the destination value.

And 

Perform a bitwise AND operation on the source and destination values.

Nand 

Perform a bitwise NAND operation on the source and destination values.

Or 

Perform a bitwise OR operation on the source and destination values.

Nor 

Perform a bitwise NOR operation on the source and destination values.

Xor 

Perform a bitwise XOR operation on the source and destination values.

Equiv 

Perform a bitwise equivalent operation on the source and destination values.

AndReverse 

Perform a bitwise AND operation on the source and inverted destination values.

AndInverted 

Perform a bitwise AND operation on the inverted source and destination values.

OrReverse 

Perform a bitwise OR operation on the source and inverted destination values.

OrInverted 

Perform a bitwise OR operation on the inverted source and destination values.

Definition at line 962 of file api.hpp.

◆ MemoryFlags

enum class wis::MemoryFlags
strong

Memory flags. Determine optional properties of the memory allocation.

Translates to VmaAllocationCreateFlags for vk implementation. Translates to D3D12MA::ALLOCATION_FLAGS for dx implementation.

Enumerator
None 

No flags set. Memory is regular.

DedicatedAllocation 

Memory is dedicated. Used for resources that require dedicated memory. Useful for big resources that are not shared with other resources. E.g. fullscreen textures, big buffers, etc.

Mapped 

Memory is mapped. Used in combination with wis::MemoryType::Upload or wis::MemoryType::Readback to map memory for CPU access.

Exportable 

Memory is exportable. If set, memory can be exported to other processes or APIs. Works only with Device Local memory (wis::MemoryType::Default) and only on AllocateXMemory calls. Outside of AllocateXMemory the flag is ignored.

Definition at line 1337 of file api.hpp.

◆ MemoryType

enum class wis::MemoryType : uint32_t
strong

Memory type for resource allocation.

Translates to D3D12_HEAP_TYPE for dx implementation. Translates to VkMemoryPropertyFlags for vk implementation.

Enumerator
Default 

Default memory type. Alias for wis::MemoryType::DeviceLocal.

DeviceLocal 

Default memory type. Local device memory, most efficient for rendering.

Upload 

Upload memory type. Used for data that is uploaded to the GPU Local memory using copy operations.

Readback 

Readback memory type. Used for data that is read back from the GPU Local memory using copy operations.

GPUUpload 

GPU upload memory type. Used for data that is directly uploaded to the GPU Local memory using copy operations. Can be used only with Extended Allocation extension enabled and supported. Usage outside of the Extended Allocation is undefined behavior. Usage with buffers requires allocating memory on GPUUpload heap and mapping the memory.

Definition at line 987 of file api.hpp.

◆ MutiWaitFlags

enum class wis::MutiWaitFlags : uint32_t
strong

Determines the behavior when wait for multiple fences is issued.

Enumerator
All 

All the fences in the batch are triggered.

Any 

At least one of the fences from the batch is triggered.

Definition at line 180 of file api.hpp.

◆ PipelineFlags

enum class wis::PipelineFlags
strong

Pipeline flags for additional pipeline features.

Translates to D3D12_PIPELINE_STATE_FLAGS for dx implementation. Translates to VkPipelineCreateFlags for vk implementation.

Enumerator
None 

No flags set. Pipeline is regular.

DescriptorBuffer 

Pipeline is created to be used with DescriptorBuffer extension. Do not mix DescriptorBuffer and non-DescriptorBuffer pipelines.

Definition at line 1474 of file api.hpp.

◆ PrimitiveTopology

enum class wis::PrimitiveTopology : uint32_t
strong

Primitive topology for rendering. More info could be found here.

Translates to D3D_PRIMITIVE_TOPOLOGY for dx implementation. Translates to VkPrimitiveTopology for vk implementation.

Enumerator
PointList 

Render points for each vertex.

LineList 

Render lines between vertices.

LineStrip 

Render lines between vertices in a strip.

TriangleList 

Render triangles between vertices.

TriangleStrip 

Render triangles between vertices in a strip.

TriangleFan 

Interpret vertex data to form a fan of triangles.

LineListAdj 

Render lines between vertices with adjacency.

LineStripAdj 

Render lines between vertices in a strip with adjacency.

TriangleListAdj 

Render triangles between vertices with adjacency.

TriangleStripAdj 

Render triangles between vertices in a strip with adjacency.

Definition at line 1109 of file api.hpp.

◆ QueueType

enum class wis::QueueType : uint32_t
strong

Type of the queue to create.

Enumerator
Graphics 

Queue is used for graphics operations.

Compute 

Queue is used for compute operations.

Copy 

Queue is used for copy operations.

VideoDecode 

Queue is used for video decoding operations.

Definition at line 135 of file api.hpp.

◆ RaytracingShaderType

enum class wis::RaytracingShaderType : uint32_t
strong

Shader stages that can be used in the raytracing pipeline.

Translates to VkShaderStageFlagBits for vk implementation.

Enumerator
Raygen 

Ray generation shader stage.

Miss 

Miss shader stage.

ClosestHit 

Closest hit shader stage.

AnyHit 

Any hit shader stage.

Intersection 

Intersection shader stage.

Callable 

Callable shader stage.

Definition at line 221 of file api.hpp.

◆ RenderPassFlags

enum class wis::RenderPassFlags
strong

Render pass flags. Set of flags that affect render pass behavior. More on render pass flags here.

Translates to VkRenderingFlags for vk implementation. Translates to D3D12_RENDER_PASS_FLAGS for dx implementation.

Enumerator
None 

No flags set. Render pass is regular.

Suspending 

Render pass is suspending.

Resuming 

Render pass is resuming.

Definition at line 1368 of file api.hpp.

◆ ResourceAccess

enum class wis::ResourceAccess
strong

Resource access flags. Determine how resource will be accessed. Used in Barriers.

Translates to D3D12_BARRIER_ACCESS for dx implementation. Translates to VkAccessFlags2 for vk implementation.

Enumerator
Common 

Common access. Subresource data must be available for any layout-compatible access after a barrier.

VertexBuffer 

Vertex buffer access. Applies only to buffers.

ConstantBuffer 

Constant buffer access. Applies only to buffers.

IndexBuffer 

Index buffer access. Applies only to buffers.

RenderTarget 

Render target access. Applies only to textures.

UnorderedAccess 

Unordered access access.

DepthWrite 

Depth write access. Applies only to DS textures.

DepthRead 

Depth read access. Applies only to DS textures.

ShaderResource 

Shader resource access. Applies only to textures.

StreamOutput 

Stream output access. Applies only to buffers. Reserved for extension.

IndirectArgument 

Indirect argument access.

CopyDest 

Copy destination access.

CopySource 

Copy source access.

ConditionalRendering 

Conditional rendering access.

AccelerationStructureRead 

Acceleration structure read access.

AccelerationStructureWrite 

Acceleration structure write access.

ShadingRate 

Shading rate access. Used in variable shading rate.

VideoDecodeRead 

Video decode read access.

VideoDecodeWrite 

Video decode write access.

ResolveDest 

Resolve destination access. Used in multisampling.

ResolveSource 

Resolve source access. Used in multisampling.

NoAccess 

No access. Used to indicate no access throughout pipeline.

Definition at line 1411 of file api.hpp.

◆ SampleRate

enum class wis::SampleRate : uint32_t
strong

Sample rate for multisampling.

Translates to uint32_t for dx implementation. Translates to VkSampleCountFlagBits for vk implementation.

Enumerator
S1 

1 sample per pixel.

S2 

2 samples per pixel.

S4 

4 samples per pixel.

S8 

8 samples per pixel.

S16 

16 samples per pixel.

Definition at line 861 of file api.hpp.

◆ Severity

enum class wis::Severity
strong

Log message severity. Used with wis::DebugCallback and internal library logging.

Enumerator
Debug 

Message carries debug information.

Trace 

Message contains trace point (function call stack info).

Info 

Message contains general information.

Warning 

Message contains warning. There is something wrong and it may affect performance or stability of the application.

Error 

Message contains error. Stability of the application is compromized.

Critical 

Message contains critical error. The application must be shut down, no further execution.

Definition at line 235 of file api.hpp.

◆ ShaderIntermediate

enum class wis::ShaderIntermediate : uint32_t
strong

Intermediate shader representation.

Enumerator
DXIL 

DirectX Intermediate Language.

SPIRV 

Standard Portable Intermediate Representation for Vulkan.

Definition at line 1018 of file api.hpp.

◆ ShaderStages

enum class wis::ShaderStages : uint32_t
strong

Shader stages that can be used in the pipeline. Main use is Root signature and descriptor management. Stages have no granularity, either all or one can be selected.

Translates to D3D12_SHADER_VISIBILITY for dx implementation. Translates to VkShaderStageFlagBits for vk implementation.

Enumerator
All 

All shader stages.

Vertex 

Vertex shader stage.

Hull 

Hull/Tessellation control shader stage.

Domain 

Domain/Tessellation evaluation shader stage.

Geometry 

Geometry shader stage.

Pixel 

Pixel/Fragment shader stage.

Amplification 

Amplification shader stage.

Mesh 

Mesh shader stage.

Count 

Number of stages.

Definition at line 77 of file api.hpp.

◆ Status

enum class wis::Status : int32_t
strong

Represents main error communication source for the API. Compare against wis::Status::Ok for success.

Enumerator
Ok 

Operation succeded.

Timeout 

Operation timed out. Counts as a success value in some cases.

Partial 

Operation partially succeeded. Some times it means that core value is initialized, but some functionality may be missing and may require you to check if demanded functionality is in place.

Error 

Operation failed. Check wis::Result::error for more details.

InvalidArgument 

One or more arguments, or parts of arguments passed to the function were incorrect. Check wis::Result::error for more details.

OutOfMemory 

There is no more host memory available. Allocation with malloc or similar call has failed.

DeviceLost 

Device driver was forcefully stopped. Most of the time happens on swapchain presentation.

Occluded 

Swapchain presentation was not visible to the user. Rendering is too fast.

Definition at line 94 of file api.hpp.

◆ StencilOp

enum class wis::StencilOp : uint32_t
strong

Stencil operation for depth and stencil operations.

Translates to D3D12_STENCIL_OP for dx implementation. Translates to VkStencilOp for vk implementation.

Enumerator
Keep 

Keep the current value.

Zero 

Set the value to zero.

Replace 

Replace the value with the reference value.

IncClamp 

Increment the value and clamp to the maximum value.

DecClamp 

Decrement the value and clamp to the minimum value.

Invert 

Invert the value.

IncWrap 

Increment the value and wrap to zero when the maximum value is exceeded.

DecWrap 

Decrement the value and wrap to the maximum value when the minimum value is exceeded.

Definition at line 905 of file api.hpp.

◆ StoreOperation

enum class wis::StoreOperation : uint32_t
strong

Attachment store operation for render pass.

Translates to VkAttachmentStoreOp for vk implementation. Translates to D3D12_RENDER_PASS_ENDING_ACCESS_TYPE for dx implementation.

Enumerator
Store 

Store the attachment contents.

DontCare 

Do not care about the attachment contents.

Resolve 

Resolve the attachment contents. Used for multisampling attachments.

Definition at line 1096 of file api.hpp.

◆ SwapchainScaling

enum class wis::SwapchainScaling : uint32_t
strong

Swapchain scaling mode.

Translates to VkPresentScalingFlagsEXT for vk implementation. Translates to DXGI_SCALING for dx implementation.

Enumerator
None 

No scaling. The swapchain size is equal to the window size.

Stretch 

Stretch scaling. The swapchain size is stretched to the window size.

Aspect 

Aspect scaling. The swapchain size is scaled to the window size with aspect ratio preserved.

Definition at line 875 of file api.hpp.

◆ TextureLayout

enum class wis::TextureLayout : uint32_t
strong

Texture layout. Determines how texture will be accessed.

Enumerator
Texture1D 

Texture is 1D array of data. Behaves similarly to Buffer.

Texture1DArray 

Texture is an array of 1D data.

Texture2D 

Texture is 2D image, default texture type.

Texture2DArray 

Texture is an array of 2D images. Can also be used for Cube maps.

Texture2DMS 

Texture is 2D multisampled image.

Texture2DMSArray 

Texture is an array of 2D multisampled images.

Texture3D 

Texture is 3D volume.

Definition at line 1062 of file api.hpp.

◆ TextureState

enum class wis::TextureState : uint32_t
strong

Texture state for resource transitions.

Translates to D3D12_BARRIER_LAYOUT for dx implementation. Translates to VkImageLayout for vk implementation.

Enumerator
Undefined 

Undefined state.

Common 

Common state.

Read 

General Read state.

RenderTarget 

Render Target state.

UnorderedAccess 

Unordered Access state.

DepthStencilWrite 

Depth Stencil Write state.

DepthStencilRead 

Depth Stencil Read state.

ShaderResource 

Shader Resource state.

CopySource 

Copy Source state.

CopyDest 

Copy Destination state.

Present 

Present swapchain state.

ShadingRate 

Shading Rate state. Used for Variable Shading Rate.

VideoDecodeRead 

Video Decode Read state.

VideoDecodeWrite 

Video Decode Write state.

Definition at line 1029 of file api.hpp.

◆ TextureUsage

enum class wis::TextureUsage
strong

Texture usage flags. Determine how the texture can be used throughout its lifetime.

Translates to D3D12_RESOURCE_FLAGS for dx implementation. Translates to VkImageUsageFlags for vk implementation.

Enumerator
None 

No flags set. Texture is not used.

RenderTarget 

Texture is used as a render target.

DepthStencil 

Texture is used as a depth stencil buffer.

CopySrc 

Texture is used as a source for copy operations.

CopyDst 

Texture is used as a destination for copy operations.

ShaderResource 

Texture is used as a shader resource.

UnorderedAccess 

Texture is used as an unordered access resource.

HostCopy 

Texture is used for host copy operations. Works with ExtendedAllocation extension.

Definition at line 1447 of file api.hpp.

◆ TextureViewType

enum class wis::TextureViewType : uint32_t
strong

Texture view type.

Translates to VkImageViewType for vk implementation. Translates to D3D12_SRV_DIMENSION for dx implementation.

Enumerator
Texture1D 

Texture is 1D array of data. Behaves similarly to Buffer.

Texture1DArray 

Texture is an array of 1D data.

Texture2D 

Texture is 2D image, default texture type.

Texture2DArray 

Texture is an array of 2D images.

Texture2DMS 

Texture is 2D multisampled image.

Texture2DMSArray 

Texture is an array of 2D multisampled images.

Texture3D 

Texture is 3D volume.

TextureCube 

Texture is a cube map.

TextureCubeArray 

Texture is an array of cube maps.

Definition at line 1198 of file api.hpp.

◆ TopologyType

enum class wis::TopologyType : uint32_t
strong

Primitive topology type for rendering.

Translates to D3D12_PRIMITIVE_TOPOLOGY_TYPE for dx implementation. Translates to VkPrimitiveTopology for vk implementation.

Enumerator
Point 

Render points for each vertex.

Line 

Render lines between vertices.

Triangle 

Render triangles between vertices.

Patch 

Vertices are interpret as patch list. Used in tesselation process.

Definition at line 1128 of file api.hpp.

◆ WindingOrder

enum class wis::WindingOrder : uint32_t
strong

Winding order for front-facing triangles.

Translates to BOOL for dx implementation. Translates to VkFrontFace for vk implementation.

Enumerator
Clockwise 

Front-facing triangles have clockwise winding order.

CounterClockwise 

Front-facing triangles have counter-clockwise winding order.

Definition at line 850 of file api.hpp.

Function Documentation

◆ get()

template<uint32_t s, typename RetTy >
constexpr decltype(auto) wis::get ( ResultValue< RetTy > &  rv)
constexprnoexcept

Definition at line 2360 of file api.hpp.

Variable Documentation

◆ success

constexpr Result wis::success
inlineconstexpr
Initial value:
{
wis::Status::Ok, "Operation succeeded"
}
@ Ok
Operation succeded.

Definition at line 2323 of file api.hpp.