Nebula
Loading...
Searching...
No Matches
Vulkan Namespace Reference

Detailed Description

Vulkan implementation of GPU acceleration structure.

Implements the entry point to the instance rendering subsystem, for Vulkan.

Implements a Vulkan specific renderer for instanced draws.

Vulkan implementation of vertex layout.

Utility functions to convert from Nebula enums to Vulkan values.

Vulkan implementation of a texture view.

Implements a text renderer using Vulkan.

Vulkan implementation of Swapchain.

The Vulkan sub-context handler is responsible for negotiating queue submissions.

Implements a Vulkan immediate shape and primitive renderer (debug meshes, random primitives, wireframes etc)

Implements a shader variation (shader program within effect) in Vulkan.

Vulkan semaphore (cross-queue synchronization primitive)

Implements a scheduler interface which serves to perform Vulkan operations which might be requested anywhere in the code to be executed when actually relevant.

Vulkan sampler implemention.

Vulkan implementation of ResourceTable, ResourceTableLayout, and ResourcePipeline.

VkPipelineDatabase implements something akin to a VkPipelineCache.

Vulkan implementation of CoreGraphics::PipelineId.

Implements a Vulkan pass, which translates into a VkRenderPass.

Vulkan Memory Manager.

The Vulkan implementation of the graphics device.

Vulkan abstraction of a fence.

Vulkan abstraction of event.

Implements a Vulkan display device.

Implements a Vulkan depth-stencil renderable texture.

Implements a deferred delegate, which is used to perform an action whenever a fence object is done.

This thread records commands to a Vulkan Command Buffer in its own thread.

Vulkan implementation of a GPU buffer.

The Vulkan implementation of a GPU command barrier.

(C) 2016-2018 Individual contributors, see AUTHORS file

All functions in the Vulkan namespace are internal helper functions specifically for Vulkan, the other functions implement the abstraction layer.

It works in a tree-like structure, where frequency of change dictates which level the state belongs to.

It works by incrementally creating a DAG, which at the end points to a path used to create a graphics pipeline. If it has already been created, then the pipeline is simply returned, however, if a node is set to initial (which happens on construction, meaning all children are also initial), then a new graphics pipeline is created and gets associated with the DAG path.

It can be slightly more efficient, currently, whenever a state is changed high up in the DAG, child nodes are created for the rest of the currently used state. This is somewhat unnecessary, instead, the nodes should be created when and if we actually do create a pipeline.

Calls to the scheduler will be executed dependent on the CommandPass, which denotes when the delayed command is supposed to be run. This is to make sure commands come in order on the command queue.

For immediate calls to Vulkan, look at VkUtilities

(C)2017-2018 Individual contributors, see AUTHORS file

In Vulkan, this directly maps to the VkQueue, but also implicitly support semaphore synchronization of required.

To more efficiently utilize the GPU, call SetToNextContext after a Submit if the subsequent Submits can run in parallel. If synchronization is a problem, defer from using SetToNextContext such that we can run all commands on a single submission.

Submit also allows for waiting on the entire command buffer execution on the CPU. By either submitting true to the Submit function argument 'wait for fence', or chose where to wait for it in the main code. Avoid waiting as well if possible, since it will stall the CPU.

It also supports inserting a dependency on different queues, wherein the depender is the queue depending on another to finish working, will wait for the other to signal.

TODO: We should be able to use this handler across devices too...

Classes

struct  BindInfo
 
struct  BufferMapping
 
struct  BufferSparsePageTable
 
struct  CommandBufferPools
 
struct  DerivativeLayout
 
struct  DescriptorSetBinding
 
struct  GeometrySetup
 
struct  GraphicsDeviceState
 
struct  InstanceSetup
 
struct  Pipeline
 
struct  QueryBundle
 
struct  SceneSetup
 
struct  ScissorBundle
 
struct  TextureSparsePageTable
 
struct  VertexLayoutVkBindInfo
 
struct  ViewportBundle
 
struct  VkBarrierInfo
 
struct  VkBufferLoadInfo
 
struct  VkBufferMapInfo
 
struct  VkBufferRuntimeInfo
 
class  VkCommandBufferThread
 
struct  VkDeferredCommand
 
class  VkDepthStencilTarget
 
class  VkDisplayDevice
 
struct  VkEventInfo
 
struct  VkFenceInfo
 
class  VkInstanceRenderer
 
class  VkInstanceServer
 
struct  VkPassLoadInfo
 
struct  VkPassRuntimeInfo
 
struct  VkPipelineBundle
 
class  VkPipelineDatabase
 
struct  VkProgramReflectionInfo
 
struct  VkReflectionInfo
 
class  VkScheduler
 
class  VkShaderCache
 
struct  VkShaderProgramRuntimeInfo
 
struct  VkShaderProgramSetupInfo
 
struct  VkShaderRuntimeInfo
 
class  VkShaderServer
 
struct  VkShaderSetupInfo
 
class  VkShapeRenderer
 
class  VkSubContextHandler
 
class  VkTextRenderer
 
struct  VkTextureLoadInfo
 
struct  VkTextureMappingInfo
 
struct  VkTextureRuntimeInfo
 
struct  VkTextureSwapInfo
 
struct  VkTextureViewLoadInfo
 
struct  VkTextureViewRuntimeInfo
 
class  VkTypes
 
struct  WriteInfo
 

Typedefs

typedef Ids::IdAllocatorSafe< 0xFFF, VkDevice, VkAccelerationStructureKHR, CoreGraphics::BufferId, CoreGraphics::BufferId, GeometrySetup, VkDeviceAddress > VkBlasAllocator
 
typedef Ids::IdAllocatorSafe< 0xFFFF, VkAccelerationStructureInstanceKHR, Math::mat4, uintVkBlasInstanceAllocator
 
typedef Ids::IdAllocatorSafe< 0xFFF, VkDevice, SceneSetup, VkAccelerationStructureKHR, CoreGraphics::BufferId, CoreGraphics::BufferId, CoreGraphics::BufferId, VkDeviceAddress, VkDeviceAddress > VkTlasAllocator
 
typedef Ids::IdAllocator< VkBarrierInfo, Util::Array< CoreGraphics::TextureId > > VkBarrierAllocator
 
typedef Ids::IdAllocatorSafe< 0xFFFF, VkBufferLoadInfo, VkBufferRuntimeInfo, VkBufferMapInfoVkBufferAllocator
 
typedef Ids::IdAllocatorSafe< 0xFF, BufferSparsePageTable, Util::Array< VkSparseMemoryBind > > VkBufferSparseExtensionAllocator
 
typedef Ids::IdAllocator< VkDevice, VkCommandPool > VkCommandBufferPoolAllocator
 
typedef Ids::IdAllocatorSafe< 0xFFF, VkDevice, VkCommandBuffer, VkCommandPool, CoreGraphics::CmdPipelineBuildBits, VkPipelineBundle, ViewportBundle, ScissorBundle, CoreGraphics::QueueTypeVkCommandBufferAllocator
 
typedef Ids::IdAllocator< VkDevice, VkEventInfoVkEventAllocator
 
typedef Ids::IdAllocator< VkDevice, VkFenceInfoVkFenceAllocator
 
typedef Ids::IdAllocator< VkPassLoadInfo, VkPassRuntimeInfo, VkRenderPassBeginInfo, Util::Array< uint32_t > > VkPassAllocator
 
typedef Ids::IdAllocator< VkDevice, VkDescriptorSet, IndexT, Threading::Spinlock, CoreGraphics::ResourceTableLayoutId, Util::Array< WriteInfo >, Util::Array< VkCopyDescriptorSet > > VkResourceTableAllocator
 
typedef Ids::IdAllocator< VkDevice, VkDescriptorSetLayout, Util::Array< VkDescriptorPoolSize >, Util::Array< Util::Pair< CoreGraphics::SamplerId, uint32_t > >, Util::HashTable< uint32_t, bool >, Util::Array< VkDescriptorPool >, Util::Array< uint > > VkResourceTableLayoutAllocator
 
typedef Ids::IdAllocator< VkDevice, VkPipelineLayout > VkResourcePipelineAllocator
 Resource pipeline.
 
typedef Ids::IdAllocator< VkDevice, VkSampler, uint32_t > VkSamplerAllocator
 
typedef Ids::IdAllocator< VkDevice, VkSemaphore, CoreGraphics::SemaphoreType, uint64VkSemaphoreAllocator
 
typedef Util::Dictionary< Util::StringAtom, CoreGraphics::BufferIdUniformBufferMap
 
typedef Util::Dictionary< uint32_t, Util::Array< CoreGraphics::BufferId > > UniformBufferGroupMap
 
typedef Util::Dictionary< CoreGraphics::ShaderFeature::Mask, CoreGraphics::ShaderProgramId > ProgramMap
 
typedef Ids::IdAllocator< VkReflectionInfo, VkShaderSetupInfo, VkShaderRuntimeInfo, Util::Array< CoreGraphics::ShaderProgramId > > ShaderAllocator
 this member allocates shaders
 
typedef Ids::IdAllocator< VkShaderProgramSetupInfo, VkProgramReflectionInfo, VkShaderProgramRuntimeInfoShaderProgramAllocator
 
typedef Ids::IdAllocator< VkDevice, VkSurfaceKHR, VkSwapchainKHR, uint, CoreGraphics::DisplayMode, Util::Array< VkImage >, Util::Array< VkImageView >, VkQueue > SwapchainAllocator
 
typedef Ids::IdAllocatorSafe< 0xFFFF, VkTextureRuntimeInfo, VkTextureLoadInfo, VkTextureMappingInfoVkTextureAllocator
 we need a thread-safe allocator since it will be used by both the memory and stream pool
 
typedef Ids::IdAllocatorSafe< 0xFFFF, CoreGraphics::TextureViewId, IndexTVkTextureStencilExtensionAllocator
 
typedef Ids::IdAllocatorSafe< 0xFF, VkTextureSwapInfoVkTextureSwapExtensionAllocator
 
typedef Ids::IdAllocatorSafe< 0xFF, TextureSparsePageTable, VkSparseImageMemoryRequirements, Util::Array< VkSparseMemoryBind >, Util::Array< VkSparseImageMemoryBind >, Util::Array< CoreGraphics::Alloc > > VkTextureSparseExtensionAllocator
 
typedef Ids::IdAllocator< VkTextureViewLoadInfo, VkTextureViewRuntimeInfoVkTextureViewAllocator
 
typedef Ids::IdAllocator< Util::HashTable< uint64_t, DerivativeLayout >, VkPipelineVertexInputStateCreateInfo, BindInfo, CoreGraphics::VertexLayoutInfo, Util::Array< SizeT >, VertexLayoutVkBindInfoVkVertexLayoutAllocator
 

Enumerations

enum  {
  Blas_Device , Blas_Handle , Blas_Buffer , Blas_Scratch ,
  Blas_Geometry , Blas_View
}
 
enum  { BlasInstance_Instance , BlasInstance_Transform }
 
enum  {
  Tlas_Device , Tlas_Scene , Tlas_Handle , Tlas_Buffer ,
  Tlas_BuildScratch , Tlas_UpdateScratch , Tlas_BuildScratchAddr , Tlas_UpdateScratchAddr
}
 
enum  { Barrier_Info , Barrier_Textures , Barrier_Buffers }
 
enum  { Buffer_LoadInfo , Buffer_RuntimeInfo , Buffer_MapInfo }
 
enum  { BufferExtension_SparsePageTable , BufferExtension_SparsePendingBinds }
 
enum  { CommandBufferPool_VkDevice , CommandBufferPool_VkCommandPool }
 
enum  {
  CmdBuffer_VkDevice , CmdBuffer_VkCommandBuffer , CmdBuffer_VkCommandPool , CmdBuffer_PipelineBuildBits ,
  CmdBuffer_VkPipelineBundle , CmdBuffer_PendingViewports , CmdBuffer_PendingScissors , CmdBuffer_Usage
}
 
enum  { Event_Device , Event_Info }
 
enum  { Pass_VkLoadInfo , Pass_VkRuntimeInfo , Pass_VkRenderPassBeginInfo , Pass_SubpassAttachments }
 
enum  { Pipeline_Object }
 
enum class  WriteType { Image , Buffer , TexelBuffer , Tlas }
 Resource table. More...
 
enum  {
  ResourceTable_Device , ResourceTable_DescriptorSet , ResourceTable_DescriptorPoolIndex , ResourceTable_Lock ,
  ResourceTable_Layout , ResourceTable_WriteInfos , ResourceTable_Copies
}
 
enum  {
  ResourceTableLayout_Device , ResourceTableLayout_SetLayout , ResourceTableLayout_PoolSizes , ResourceTableLayout_Samplers ,
  ResourceTableLayout_ImmutableSamplerFlags , ResourceTableLayout_DescriptorPools , ResourceTableLayout_DescriptorPoolFreeItems
}
 Resource table layout. More...
 
enum  { Semaphore_Device , Semaphore_VkHandle , Semaphore_Type , Semaphore_LastIndex }
 
enum  ShaderStages {
  VertexShader , HullShader , DomainShader , GeometryShader ,
  PixelShader , ComputeShader , TaskShader , MeshShader ,
  RayGenerationShader , RayAnyHitShader , RayClosestHitShader , RayMissShader ,
  RayIntersectionShader , CallableShader , NumShaders
}
 
enum  { Shader_ReflectionInfo , Shader_SetupInfo , Shader_RuntimeInfo , Shader_Programs }
 
enum  { ShaderProgram_SetupInfo , ShaderProgram_ReflectionInfo , ShaderProgram_RuntimeInfo }
 
enum  {
  Swapchain_Device , Swapchain_Surface , Swapchain_Swapchain , Swapchain_CurrentBackbuffer ,
  Swapchain_DisplayMode , Swapchain_Images , Swapchain_ImageViews , Swapchain_Queue
}
 
enum  { Texture_RuntimeInfo , Texture_LoadInfo , Texture_MappingInfo }
 
enum  { TextureExtension_StencilInfo , TextureExtension_StencilBind }
 
enum  { TextureExtension_SwapInfo }
 
enum  {
  TextureExtension_SparsePageTable , TextureExtension_SparseMemoryRequirements , TextureExtension_SparseOpaqueBinds , TextureExtension_SparsePendingBinds ,
  TextureExtension_SparseOpaqueAllocs
}
 
enum  { TextureView_LoadInfo , TextureView_RuntimeInfo }
 
enum  {
  VertexSignature_ProgramLayoutMapping , VertexSignature_VkPipelineInfo , VertexSignature_BindInfo , VertexSignature_LayoutInfo ,
  VertexSignature_StreamSize , VertexSignature_DynamicBindInfo
}
 

Functions

const VkDevice BlasGetVkDevice (const CoreGraphics::BlasId id)
 Get device used to create blas.
 
const VkBuffer BlasGetVkBuffer (const CoreGraphics::BlasId id)
 Get buffer holding TLAS data.
 
const VkAccelerationStructureKHR BlasGetVk (const CoreGraphics::BlasId id)
 Get buffer representing the acceleration structure.
 
const VkAccelerationStructureBuildGeometryInfoKHR & BlasGetVkBuild (const CoreGraphics::BlasId id)
 Get build info for bottom level acceleration structure.
 
const Util::Array< VkAccelerationStructureBuildRangeInfoKHR > & BlasGetVkRanges (const CoreGraphics::BlasId id)
 Get range infos for bottom level acceleration structure.
 
const VkDevice TlasGetVkDevice (const CoreGraphics::TlasId id)
 Get device used to create Tlas.
 
const VkBuffer TlasGetVkBuffer (const CoreGraphics::TlasId id)
 Get buffer holding TLAS data.
 
const VkAccelerationStructureKHR TlasGetVk (const CoreGraphics::TlasId id)
 Get acceleration structure.
 
const VkAccelerationStructureBuildGeometryInfoKHR & TlasGetVkBuild (const CoreGraphics::TlasId id)
 Get build info.
 
const Util::Array< VkAccelerationStructureBuildRangeInfoKHR > & TlasGetVkRanges (const CoreGraphics::TlasId id)
 Get build ranges.
 
const VkBarrierInfoBarrierGetVk (const CoreGraphics::BarrierId id)
 Get Vulkan info.
 
VkBuffer BufferGetVk (const CoreGraphics::BufferId id)
 get buffer object
 
VkDeviceMemory BufferGetVkMemory (const CoreGraphics::BufferId id)
 get buffer memory
 
VkDevice BufferGetVkDevice (const CoreGraphics::BufferId id)
 get buffer device
 
const VkCommandPool CmdBufferPoolGetVk (const CoreGraphics::CmdBufferPoolId id)
 get vk command buffer pool
 
const VkDevice CmdBufferPoolGetVkDevice (const CoreGraphics::CmdBufferPoolId id)
 get vk device that created the pool
 
const VkCommandBuffer CmdBufferGetVk (const CoreGraphics::CmdBufferId id)
 Get vk command buffer.
 
const VkCommandPool CmdBufferGetVkPool (const CoreGraphics::CmdBufferId id)
 Get vk command buffer pool.
 
const VkDevice CmdBufferGetVkDevice (const CoreGraphics::CmdBufferId id)
 Get vk device.
 
 __ImplementClass (Vulkan::VkCommandBufferThread, 'VCBT', Threading::Thread)
 
 __ImplementClass (Vulkan::VkDepthStencilTarget, 'VKDS', Base::DepthStencilTargetBase)
 
 __ImplementClass (Vulkan::VkDisplayDevice, 'VKDD', Base::DisplayDeviceBase)
 
 __ImplementSingleton (Vulkan::VkDisplayDevice)
 
const VkEventInfoEventGetVk (const CoreGraphics::EventId id)
 Get vk event info.
 
VkFence FenceGetVk (const CoreGraphics::FenceId id)
 
void SetupAdapter (CoreGraphics::GraphicsDeviceCreateInfo::Features features)
 setup graphics adapter
 
VkInstance GetInstance ()
 get vk instance
 
VkDevice GetCurrentDevice ()
 get the currently activated device
 
VkPhysicalDevice GetCurrentPhysicalDevice ()
 get the currently activated physical device
 
VkPhysicalDeviceProperties GetCurrentProperties ()
 get the current device properties
 
VkPhysicalDeviceAccelerationStructurePropertiesKHR GetCurrentAccelerationStructureProperties ()
 Get the current device acceleration structure properties.
 
VkPhysicalDeviceRayTracingPipelinePropertiesKHR GetCurrentRaytracingProperties ()
 Get the current device raytracing properties.
 
VkPhysicalDeviceFeatures GetCurrentFeatures ()
 get the current device features
 
VkPipelineCache GetPipelineCache ()
 get pipeline cache
 
VkPhysicalDeviceMemoryProperties GetMemoryProperties ()
 get memory properties
 
VkSemaphore GetRenderingSemaphore ()
 get final rendering semaphore
 
VkFence GetPresentFence ()
 get the present fence
 
void DelayedDeleteVkBuffer (const VkDevice dev, const VkBuffer buf)
 Add VkBuffer for late delete.
 
VkQueryPool GetQueryPool (const CoreGraphics::QueryType query)
 Get query pool.
 
void WaitForPresent (VkSemaphore sem)
 
const VkQueue GetQueue (const CoreGraphics::QueueType type, const IndexT index)
 get queue from index and family
 
const VkQueue GetCurrentQueue (const CoreGraphics::QueueType type)
 get currently active queue of type
 
VkPipeline GetOrCreatePipeline (CoreGraphics::PassId pass, uint subpass, CoreGraphics::ShaderProgramId program, const CoreGraphics::InputAssemblyKey inputAssembly, const VkGraphicsPipelineCreateInfo &info)
 Generate or return cached VkPipeline.
 
void SparseTextureBind (const VkImage img, const Util::Array< VkSparseMemoryBind > &opaqueBinds, const Util::Array< VkSparseImageMemoryBind > &pageBinds)
 perform a set of sparse image binding operations
 
void SparseBufferBind (const VkBuffer buf, const Util::Array< VkSparseMemoryBind > &binds)
 Perform a set of sparse binding operations for buffers.
 
void ClearPending ()
 Clear pending resources.
 
VkCommandBuffer GetMainBuffer (const CoreGraphics::QueueType queue)
 get main command buffer
 
void InitVulkan ()
 initialize Vulkan by loading dll and setting up the instance loader
 
void InitInstance (VkInstance instance)
 initialize Vulkan instance, loads function pointers directly from driver
 
CoreGraphics::Alloc AllocateMemory (const VkDevice dev, const VkImage &img, CoreGraphics::MemoryPoolType type)
 allocate memory for an image
 
CoreGraphics::Alloc AllocateMemory (const VkDevice dev, const VkBuffer &buf, CoreGraphics::MemoryPoolType type, uint alignment=1)
 allocate memory for a buffer
 
CoreGraphics::Alloc AllocateMemory (const VkDevice dev, VkMemoryRequirements reqs, VkDeviceSize allocSize)
 allocate memory for sparse memory
 
void Flush (const VkDevice dev, const CoreGraphics::Alloc &alloc, IndexT offset, SizeT size)
 flush a mapped memory region
 
void Invalidate (const VkDevice dev, const CoreGraphics::Alloc &alloc, IndexT offset, SizeT size)
 invalidate a mapped memory region
 
VkResult GetMemoryType (uint32_t bits, VkMemoryPropertyFlags flags, uint32_t &index)
 get vulkan memory type based on resource requirements and wanted memory properties
 
const VkRenderPassBeginInfo & PassGetVkRenderPassBeginInfo (const CoreGraphics::PassId &id)
 get vk render pass
 
const VkGraphicsPipelineCreateInfo & PassGetVkFramebufferInfo (const CoreGraphics::PassId &id)
 get vk framebuffer info
 
const SizeT PassGetVkNumAttachments (const CoreGraphics::PassId &id)
 get number of pass attachments
 
const VkDevice PassGetVkDevice (const CoreGraphics::PassId &id)
 Get device creating this pass.
 
const VkFramebuffer PassGetVkFramebuffer (const CoreGraphics::PassId &id)
 Get framebuffer.
 
const VkRenderPass PassGetVkRenderPass (const CoreGraphics::PassId &id)
 Get pass.
 
 __ImplementSingleton (VkPipelineDatabase)
 
const VkDescriptorSet & ResourceTableGetVkDescriptorSet (CoreGraphics::ResourceTableId id)
 Get descriptor set.
 
const IndexT ResourceTableGetVkPoolIndex (CoreGraphics::ResourceTableId id)
 Get descriptor pool index.
 
const VkDevice & ResourceTableGetVkDevice (CoreGraphics::ResourceTableId id)
 Get device used to create resource table.
 
void SetupEmptyDescriptorSetLayout ()
 run this before using any resource tables
 
const VkDescriptorSetLayout & ResourceTableLayoutGetVk (const CoreGraphics::ResourceTableLayoutId &id)
 get table layout
 
void ResourceTableLayoutAllocTable (const CoreGraphics::ResourceTableLayoutId &id, const VkDevice dev, uint overallocationSize, IndexT &outIndex, VkDescriptorSet &outSet)
 allocate new descriptor set from pool
 
void ResourceTableLayoutDeallocTable (const CoreGraphics::ResourceTableLayoutId &id, const VkDevice dev, const VkDescriptorSet &set, const IndexT index)
 deallocate descriptor set from pool
 
const VkDescriptorPool & ResourceTableLayoutGetVkDescriptorPool (const CoreGraphics::ResourceTableLayoutId &id, const IndexT index)
 Get descriptor pool.
 
uintResourceTableLayoutGetFreeItemsCounter (const CoreGraphics::ResourceTableLayoutId &id, const IndexT index)
 Get descriptor pool free items counter.
 
const VkPipelineLayout & ResourcePipelineGetVk (const CoreGraphics::ResourcePipelineId &id)
 get pipeline layout
 
const VkSampler & SamplerGetVk (const CoreGraphics::SamplerId &id)
 get vulkan sampler
 
 __ImplementSingleton (Vulkan::VkScheduler)
 
VkSemaphore SemaphoreGetVk (const CoreGraphics::SemaphoreId &id)
 get vulkan sampler
 
void UpdateOccupancy (uint32_t *occupancyList, uint32_t &slotsUsed, const CoreGraphics::ShaderVisibility vis)
 
void ShaderSetup (VkDevice dev, const Util::StringAtom &name, const VkPhysicalDeviceProperties props, AnyFX::ShaderEffect *effect, Util::FixedArray< CoreGraphics::ResourcePipelinePushConstantRange > &constantRange, Util::Array< CoreGraphics::SamplerId > &immutableSamplers, Util::FixedArray< Util::Pair< uint32_t, CoreGraphics::ResourceTableLayoutId > > &setLayouts, Util::Dictionary< uint32_t, uint32_t > &setLayoutMap, CoreGraphics::ResourcePipelineId &pipelineLayout, Util::Dictionary< Util::StringAtom, uint32_t > &resourceSlotMapping, Util::Dictionary< Util::StringAtom, IndexT > &constantBindings)
 create descriptor set layout
 
void ShaderCleanup (VkDevice dev, Util::Array< CoreGraphics::SamplerId > &immutableSamplers, Util::FixedArray< Util::Pair< uint32_t, CoreGraphics::ResourceTableLayoutId > > &setLayouts, Util::Dictionary< Util::StringAtom, CoreGraphics::BufferId > &buffers, CoreGraphics::ResourcePipelineId &pipelineLayout)
 cleanup shader
 
Util::String VkShaderCreateSignature (const VkDescriptorSetLayoutBinding &bind)
 create descriptor layout signature
 
const VkProgramReflectionInfoShaderGetProgramReflection (const CoreGraphics::ShaderProgramId shaderProgramId)
 Use direct resource ids, not the State, Shader or Variable type ids.
 
 __ImplementClass (Vulkan::VkShaderCache, 'VKSL', Resources::ResourceStreamCache)
 
void VkShaderProgramSetup (const Ids::Id24 id, const Resources::ResourceName &shaderName, AnyFX::VkProgram *program, const CoreGraphics::ResourcePipelineId &pipelineLayout)
 setup from AnyFX program
 
void VkShaderProgramCreateShader (const VkDevice dev, VkShaderModule *shader, unsigned binarySize, char *binary)
 create shader object
 
void VkShaderProgramSetupAsGraphics (AnyFX::VkProgram *program, const Resources::ResourceName &shaderName, VkShaderProgramRuntimeInfo &runtime)
 create this program as a graphics program
 
void VkShaderProgramSetupAsCompute (VkShaderProgramSetupInfo &setup, VkShaderProgramRuntimeInfo &runtime)
 create this program as a compute program (can be done immediately)
 
void VkShaderProgramSetupAsRaytracing (AnyFX::VkProgram *program, const Resources::ResourceName &shaderName, VkShaderProgramSetupInfo &setup, VkShaderProgramRuntimeInfo &runtime)
 create this program as a compute program (can be done immediately)
 
VkPipeline VkShaderProgramGetRaytracingLibrary (const CoreGraphics::ShaderProgramId id)
 Get raytracing library pipepline.
 
VkPipelineLayout VkShaderProgramGetLayout (const CoreGraphics::ShaderProgramId id)
 Get resource layout of shader program.
 
void VkShaderProgramGetRaytracingVaryingSizes (const CoreGraphics::ShaderProgramId id, uint &rayPayloadSize, uint &hitAttributeSize)
 Get ray payload and hit attribute sizes.
 
void VkShaderProgramDiscard (VkShaderProgramSetupInfo &info, VkShaderProgramRuntimeInfo &rt, VkPipeline &computePipeline)
 discard variation
 
 __ImplementClass (Vulkan::VkShaderServer, 'VKSS', Base::ShaderServerBase)
 
 __ImplementInterfaceSingleton (Vulkan::VkShaderServer)
 
 __ImplementClass (Vulkan::VkShapeRenderer, 'VKSR', Base::ShapeRendererBase)
 
 __ImplementClass (Vulkan::VkTextRenderer, 'VKTR', Base::TextRendererBase)
 
 __ImplementSingleton (Vulkan::VkTextRenderer)
 
const VkImage TextureGetVkImage (const CoreGraphics::TextureId id)
 get Vk image
 
const VkImageView TextureGetVkImageView (const CoreGraphics::TextureId id)
 get vk image view
 
const VkImageView TextureGetVkStencilImageView (const CoreGraphics::TextureId id)
 get vk image view for stencil
 
const VkDevice TextureGetVkDevice (const CoreGraphics::TextureId id)
 get the device created the image
 
void SetupSparse (VkDevice dev, VkImage img, Ids::Id32 sparseExtension, const VkTextureLoadInfo &info)
 
const VkImageView TextureViewGetVk (const CoreGraphics::TextureViewId id)
 Get vk image view.
 
const VkDevice TextureViewGetVkDevice (const CoreGraphics::TextureViewId id)
 Get device used to create view.
 
const VertexLayoutVkBindInfoVertexLayoutGetVkBindInfo (const CoreGraphics::VertexLayoutId layout)
 Get dynamic bind info.
 
 __ImplementClass (Vulkan::VkInstanceRenderer, 'VKIR', Base::InstanceRendererBase)
 
 __ImplementSingleton (Vulkan::VkInstanceServer)
 
 __ImplementClass (Vulkan::VkInstanceServer, 'VKIS', Base::InstanceServerBase)
 

Variables

VkBlasAllocator blasAllocator
 
VkBlasInstanceAllocator blasInstanceAllocator
 
VkTlasAllocator tlasAllocator
 
VkBarrierAllocator barrierAllocator (0x00FFFFFF)
 
static const SizeT MaxNumBarriers = 16
 
VkBufferAllocator bufferAllocator
 
VkBufferSparseExtensionAllocator bufferSparseExtensionAllocator
 
VkCommandBufferAllocator commandBuffers
 
VkCommandBufferPoolAllocator commandBufferPools (0x00FFFFFF)
 
Threading::CriticalSection commandBufferCritSect
 
PFN_vkCmdBeginDebugUtilsLabelEXT VkCmdDebugMarkerBegin = nullptr
 
PFN_vkCmdEndDebugUtilsLabelEXT VkCmdDebugMarkerEnd = nullptr
 
PFN_vkCmdInsertDebugUtilsLabelEXT VkCmdDebugMarkerInsert = nullptr
 
static const uint NumPoolTypes = 4
 
VkEventAllocator eventAllocator (0x00FFFFFF)
 
static const SizeT EventMaxNumBarriers = 16
 
VkFenceAllocator fenceAllocator (0x00FFFFFF)
 
static Threading::CriticalSection delayedDeleteSection
 
static Threading::CriticalSection transferLock
 
static Threading::CriticalSection setupLock
 
Vulkan::GraphicsDeviceState state
 
VkDebugUtilsMessengerEXT VkErrorDebugMessageHandle = nullptr
 
PFN_vkCreateDebugUtilsMessengerEXT VkCreateDebugMessenger = nullptr
 
PFN_vkDestroyDebugUtilsMessengerEXT VkDestroyDebugMessenger = nullptr
 
PFN_vkSetDebugUtilsObjectNameEXT VkDebugObjectName = nullptr
 
PFN_vkSetDebugUtilsObjectTagEXT VkDebugObjectTag = nullptr
 
PFN_vkQueueBeginDebugUtilsLabelEXT VkQueueBeginLabel = nullptr
 
PFN_vkQueueEndDebugUtilsLabelEXT VkQueueEndLabel = nullptr
 
PFN_vkQueueInsertDebugUtilsLabelEXT VkQueueInsertLabel = nullptr
 
static Threading::CriticalSection pipelineMutex
 
VkPassAllocator passAllocator (0x00FFFFFF)
 
Ids::IdAllocator< PipelinepipelineAllocator
 
VkResourceTableAllocator resourceTableAllocator
 
VkResourceTableLayoutAllocator resourceTableLayoutAllocator
 
VkResourcePipelineAllocator resourcePipelineAllocator
 
VkDescriptorSetLayout EmptySetLayout
 
VkSamplerAllocator samplerAllocator
 
VkSemaphoreAllocator semaphoreAllocator (0x00FFFFFF)
 
Util::Dictionary< Util::StringAtom, VkDescriptorSetLayout > VkShaderLayoutCache
 
Util::Dictionary< Util::StringAtom, VkPipelineLayout > VkShaderPipelineCache
 
Util::Dictionary< Util::StringAtom, VkDescriptorSet > VkShaderDescriptorSetCache
 
ShaderAllocator shaderAlloc
 
uint32_t UniqueIdCounter = 0
 
ShaderProgramAllocator shaderProgramAlloc
 
SwapchainAllocator swapchainAllocator
 
VkTextureAllocator textureAllocator
 
VkTextureStencilExtensionAllocator textureStencilExtensionAllocator
 
VkTextureSwapExtensionAllocator textureSwapExtensionAllocator
 
VkTextureSparseExtensionAllocator textureSparseExtensionAllocator
 
VkTextureViewAllocator textureViewAllocator (0x00FFFFFF)
 
static const VkComponentSwizzle VkSwizzle []
 
VkVertexLayoutAllocator vertexLayoutAllocator
 
static Threading::CriticalSection vertexSignatureMutex
 

Typedef Documentation

◆ ProgramMap

◆ ShaderAllocator

this member allocates shaders

◆ ShaderProgramAllocator

◆ SwapchainAllocator

typedef Ids::IdAllocator< VkDevice, VkSurfaceKHR, VkSwapchainKHR, uint, CoreGraphics::DisplayMode, Util::Array<VkImage>, Util::Array<VkImageView>, VkQueue> Vulkan::SwapchainAllocator

◆ UniformBufferGroupMap

◆ UniformBufferMap

◆ VkBarrierAllocator

◆ VkBlasAllocator

typedef Ids::IdAllocatorSafe< 0xFFF , VkDevice , VkAccelerationStructureKHR , CoreGraphics::BufferId , CoreGraphics::BufferId , GeometrySetup , VkDeviceAddress> Vulkan::VkBlasAllocator

◆ VkBlasInstanceAllocator

typedef Ids::IdAllocatorSafe< 0xFFFF , VkAccelerationStructureInstanceKHR , Math::mat4 , uint> Vulkan::VkBlasInstanceAllocator

◆ VkBufferAllocator

◆ VkBufferSparseExtensionAllocator

◆ VkCommandBufferAllocator

◆ VkCommandBufferPoolAllocator

typedef Ids::IdAllocator<VkDevice, VkCommandPool> Vulkan::VkCommandBufferPoolAllocator

◆ VkEventAllocator

◆ VkFenceAllocator

◆ VkPassAllocator

◆ VkResourcePipelineAllocator

typedef Ids::IdAllocator< VkDevice, VkPipelineLayout> Vulkan::VkResourcePipelineAllocator

Resource pipeline.

◆ VkResourceTableAllocator

◆ VkResourceTableLayoutAllocator

typedef Ids::IdAllocator< VkDevice, VkDescriptorSetLayout, Util::Array<VkDescriptorPoolSize>, Util::Array<Util::Pair<CoreGraphics::SamplerId, uint32_t> >, Util::HashTable<uint32_t, bool>, Util::Array<VkDescriptorPool>, Util::Array<uint>> Vulkan::VkResourceTableLayoutAllocator

◆ VkSamplerAllocator

typedef Ids::IdAllocator< VkDevice, VkSampler, uint32_t> Vulkan::VkSamplerAllocator

◆ VkSemaphoreAllocator

◆ VkTextureAllocator

we need a thread-safe allocator since it will be used by both the memory and stream pool

◆ VkTextureSparseExtensionAllocator

typedef Ids::IdAllocatorSafe< 0xFF , TextureSparsePageTable , VkSparseImageMemoryRequirements , Util::Array<VkSparseMemoryBind> , Util::Array<VkSparseImageMemoryBind> , Util::Array<CoreGraphics::Alloc>> Vulkan::VkTextureSparseExtensionAllocator

◆ VkTextureStencilExtensionAllocator

◆ VkTextureSwapExtensionAllocator

◆ VkTextureViewAllocator

◆ VkTlasAllocator

typedef Ids::IdAllocatorSafe< 0xFFF , VkDevice , SceneSetup , VkAccelerationStructureKHR , CoreGraphics::BufferId , CoreGraphics::BufferId , CoreGraphics::BufferId , VkDeviceAddress , VkDeviceAddress> Vulkan::VkTlasAllocator

◆ VkVertexLayoutAllocator

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Blas_Device 
Blas_Handle 
Blas_Buffer 
Blas_Scratch 
Blas_Geometry 
Blas_View 

◆ anonymous enum

anonymous enum
Enumerator
BlasInstance_Instance 
BlasInstance_Transform 

◆ anonymous enum

anonymous enum
Enumerator
Tlas_Device 
Tlas_Scene 
Tlas_Handle 
Tlas_Buffer 
Tlas_BuildScratch 
Tlas_UpdateScratch 
Tlas_BuildScratchAddr 
Tlas_UpdateScratchAddr 

◆ anonymous enum

anonymous enum
Enumerator
Barrier_Info 
Barrier_Textures 
Barrier_Buffers 

◆ anonymous enum

anonymous enum
Enumerator
Buffer_LoadInfo 
Buffer_RuntimeInfo 
Buffer_MapInfo 

◆ anonymous enum

anonymous enum
Enumerator
BufferExtension_SparsePageTable 
BufferExtension_SparsePendingBinds 

◆ anonymous enum

anonymous enum
Enumerator
CommandBufferPool_VkDevice 
CommandBufferPool_VkCommandPool 

◆ anonymous enum

anonymous enum
Enumerator
CmdBuffer_VkDevice 
CmdBuffer_VkCommandBuffer 
CmdBuffer_VkCommandPool 
CmdBuffer_PipelineBuildBits 
CmdBuffer_VkPipelineBundle 
CmdBuffer_PendingViewports 
CmdBuffer_PendingScissors 
CmdBuffer_Usage 

◆ anonymous enum

anonymous enum
Enumerator
Event_Device 
Event_Info 

◆ anonymous enum

anonymous enum
Enumerator
Pass_VkLoadInfo 
Pass_VkRuntimeInfo 
Pass_VkRenderPassBeginInfo 
Pass_SubpassAttachments 

◆ anonymous enum

anonymous enum
Enumerator
Pipeline_Object 

◆ anonymous enum

anonymous enum
Enumerator
ResourceTable_Device 
ResourceTable_DescriptorSet 
ResourceTable_DescriptorPoolIndex 
ResourceTable_Lock 
ResourceTable_Layout 
ResourceTable_WriteInfos 
ResourceTable_Copies 

◆ anonymous enum

anonymous enum

Resource table layout.

Enumerator
ResourceTableLayout_Device 
ResourceTableLayout_SetLayout 
ResourceTableLayout_PoolSizes 
ResourceTableLayout_Samplers 
ResourceTableLayout_ImmutableSamplerFlags 
ResourceTableLayout_DescriptorPools 
ResourceTableLayout_DescriptorPoolFreeItems 

◆ anonymous enum

anonymous enum
Enumerator
Semaphore_Device 
Semaphore_VkHandle 
Semaphore_Type 
Semaphore_LastIndex 

◆ anonymous enum

anonymous enum
Enumerator
Shader_ReflectionInfo 
Shader_SetupInfo 
Shader_RuntimeInfo 
Shader_Programs 

◆ anonymous enum

anonymous enum
Enumerator
ShaderProgram_SetupInfo 
ShaderProgram_ReflectionInfo 
ShaderProgram_RuntimeInfo 

◆ anonymous enum

anonymous enum
Enumerator
Swapchain_Device 
Swapchain_Surface 
Swapchain_Swapchain 
Swapchain_CurrentBackbuffer 
Swapchain_DisplayMode 
Swapchain_Images 
Swapchain_ImageViews 
Swapchain_Queue 

◆ anonymous enum

anonymous enum
Enumerator
Texture_RuntimeInfo 
Texture_LoadInfo 
Texture_MappingInfo 

◆ anonymous enum

anonymous enum
Enumerator
TextureExtension_StencilInfo 
TextureExtension_StencilBind 

◆ anonymous enum

anonymous enum
Enumerator
TextureExtension_SwapInfo 

◆ anonymous enum

anonymous enum
Enumerator
TextureExtension_SparsePageTable 
TextureExtension_SparseMemoryRequirements 
TextureExtension_SparseOpaqueBinds 
TextureExtension_SparsePendingBinds 
TextureExtension_SparseOpaqueAllocs 

◆ anonymous enum

anonymous enum
Enumerator
TextureView_LoadInfo 
TextureView_RuntimeInfo 

◆ anonymous enum

anonymous enum
Enumerator
VertexSignature_ProgramLayoutMapping 
VertexSignature_VkPipelineInfo 
VertexSignature_BindInfo 
VertexSignature_LayoutInfo 
VertexSignature_StreamSize 
VertexSignature_DynamicBindInfo 

◆ ShaderStages

Enumerator
VertexShader 
HullShader 
DomainShader 
GeometryShader 
PixelShader 
ComputeShader 
TaskShader 
MeshShader 
RayGenerationShader 
RayAnyHitShader 
RayClosestHitShader 
RayMissShader 
RayIntersectionShader 
CallableShader 
NumShaders 

◆ WriteType

enum class Vulkan::WriteType
strong

Resource table.

Enumerator
Image 
Buffer 
TexelBuffer 
Tlas 

Function Documentation

◆ __ImplementClass() [1/9]

Vulkan::__ImplementClass ( Vulkan::VkCommandBufferThread ,
'VCBT' ,
Threading::Thread  )

◆ __ImplementClass() [2/9]

Vulkan::__ImplementClass ( Vulkan::VkDepthStencilTarget ,
'VKDS' ,
Base::DepthStencilTargetBase  )

◆ __ImplementClass() [3/9]

Vulkan::__ImplementClass ( Vulkan::VkDisplayDevice ,
'VKDD' ,
Base::DisplayDeviceBase  )

◆ __ImplementClass() [4/9]

Vulkan::__ImplementClass ( Vulkan::VkInstanceRenderer ,
'VKIR' ,
Base::InstanceRendererBase  )

◆ __ImplementClass() [5/9]

Vulkan::__ImplementClass ( Vulkan::VkInstanceServer ,
'VKIS' ,
Base::InstanceServerBase  )

◆ __ImplementClass() [6/9]

Vulkan::__ImplementClass ( Vulkan::VkShaderCache ,
'VKSL' ,
Resources::ResourceStreamCache  )

◆ __ImplementClass() [7/9]

Vulkan::__ImplementClass ( Vulkan::VkShaderServer ,
'VKSS' ,
Base::ShaderServerBase  )

◆ __ImplementClass() [8/9]

Vulkan::__ImplementClass ( Vulkan::VkShapeRenderer ,
'VKSR' ,
Base::ShapeRendererBase  )

◆ __ImplementClass() [9/9]

Vulkan::__ImplementClass ( Vulkan::VkTextRenderer ,
'VKTR' ,
Base::TextRendererBase  )

◆ __ImplementInterfaceSingleton()

Vulkan::__ImplementInterfaceSingleton ( Vulkan::VkShaderServer )

◆ __ImplementSingleton() [1/5]

Vulkan::__ImplementSingleton ( VkPipelineDatabase )

◆ __ImplementSingleton() [2/5]

Vulkan::__ImplementSingleton ( Vulkan::VkDisplayDevice )

◆ __ImplementSingleton() [3/5]

Vulkan::__ImplementSingleton ( Vulkan::VkInstanceServer )

◆ __ImplementSingleton() [4/5]

Vulkan::__ImplementSingleton ( Vulkan::VkScheduler )

◆ __ImplementSingleton() [5/5]

Vulkan::__ImplementSingleton ( Vulkan::VkTextRenderer )

◆ AllocateMemory() [1/3]

CoreGraphics::Alloc Vulkan::AllocateMemory ( const VkDevice dev,
const VkBuffer & buf,
MemoryPoolType type,
uint alignment )

allocate memory for a buffer

◆ AllocateMemory() [2/3]

CoreGraphics::Alloc Vulkan::AllocateMemory ( const VkDevice dev,
const VkImage & img,
MemoryPoolType type )

allocate memory for an image

◆ AllocateMemory() [3/3]

CoreGraphics::Alloc Vulkan::AllocateMemory ( const VkDevice dev,
VkMemoryRequirements reqs,
VkDeviceSize allocSize )

allocate memory for sparse memory

◆ BarrierGetVk()

const VkBarrierInfo & Vulkan::BarrierGetVk ( const CoreGraphics::BarrierId id)

Get Vulkan info.

◆ BlasGetVk()

const VkAccelerationStructureKHR Vulkan::BlasGetVk ( const CoreGraphics::BlasId id)

Get buffer representing the acceleration structure.

◆ BlasGetVkBuffer()

const VkBuffer Vulkan::BlasGetVkBuffer ( const CoreGraphics::BlasId id)

Get buffer holding TLAS data.

◆ BlasGetVkBuild()

const VkAccelerationStructureBuildGeometryInfoKHR & Vulkan::BlasGetVkBuild ( const CoreGraphics::BlasId id)

Get build info for bottom level acceleration structure.

◆ BlasGetVkDevice()

const VkDevice Vulkan::BlasGetVkDevice ( const CoreGraphics::BlasId id)

Get device used to create blas.

◆ BlasGetVkRanges()

const Util::Array< VkAccelerationStructureBuildRangeInfoKHR > & Vulkan::BlasGetVkRanges ( const CoreGraphics::BlasId id)

Get range infos for bottom level acceleration structure.

◆ BufferGetVk()

VkBuffer Vulkan::BufferGetVk ( const CoreGraphics::BufferId id)

get buffer object

◆ BufferGetVkDevice()

VkDevice Vulkan::BufferGetVkDevice ( const CoreGraphics::BufferId id)

get buffer device

◆ BufferGetVkMemory()

VkDeviceMemory Vulkan::BufferGetVkMemory ( const CoreGraphics::BufferId id)

get buffer memory

◆ ClearPending()

void Vulkan::ClearPending ( )

Clear pending resources.

◆ CmdBufferGetVk()

const VkCommandBuffer Vulkan::CmdBufferGetVk ( const CoreGraphics::CmdBufferId id)

Get vk command buffer.

◆ CmdBufferGetVkDevice()

const VkDevice Vulkan::CmdBufferGetVkDevice ( const CoreGraphics::CmdBufferId id)

Get vk device.

◆ CmdBufferGetVkPool()

const VkCommandPool Vulkan::CmdBufferGetVkPool ( const CoreGraphics::CmdBufferId id)

Get vk command buffer pool.

◆ CmdBufferPoolGetVk()

const VkCommandPool Vulkan::CmdBufferPoolGetVk ( const CoreGraphics::CmdBufferPoolId id)

get vk command buffer pool

◆ CmdBufferPoolGetVkDevice()

const VkDevice Vulkan::CmdBufferPoolGetVkDevice ( const CoreGraphics::CmdBufferPoolId id)

get vk device that created the pool

◆ DelayedDeleteVkBuffer()

void Vulkan::DelayedDeleteVkBuffer ( const VkDevice dev,
const VkBuffer buf )

Add VkBuffer for late delete.

◆ EventGetVk()

const VkEventInfo & Vulkan::EventGetVk ( const CoreGraphics::EventId id)

Get vk event info.

◆ FenceGetVk()

VkFence Vulkan::FenceGetVk ( const CoreGraphics::FenceId id)

◆ Flush()

void Vulkan::Flush ( const VkDevice dev,
const Alloc & alloc,
IndexT offset,
SizeT size )

flush a mapped memory region

◆ GetCurrentAccelerationStructureProperties()

VkPhysicalDeviceAccelerationStructurePropertiesKHR Vulkan::GetCurrentAccelerationStructureProperties ( )

Get the current device acceleration structure properties.

◆ GetCurrentDevice()

VkDevice Vulkan::GetCurrentDevice ( )

get the currently activated device

◆ GetCurrentFeatures()

VkPhysicalDeviceFeatures Vulkan::GetCurrentFeatures ( )

get the current device features

◆ GetCurrentPhysicalDevice()

VkPhysicalDevice Vulkan::GetCurrentPhysicalDevice ( )

get the currently activated physical device

◆ GetCurrentProperties()

VkPhysicalDeviceProperties Vulkan::GetCurrentProperties ( )

get the current device properties

◆ GetCurrentQueue()

const VkQueue Vulkan::GetCurrentQueue ( const CoreGraphics::QueueType type)

get currently active queue of type

◆ GetCurrentRaytracingProperties()

VkPhysicalDeviceRayTracingPipelinePropertiesKHR Vulkan::GetCurrentRaytracingProperties ( )

Get the current device raytracing properties.

◆ GetInstance()

VkInstance Vulkan::GetInstance ( )

get vk instance

◆ GetMainBuffer()

VkCommandBuffer Vulkan::GetMainBuffer ( const CoreGraphics::QueueType queue)

get main command buffer

◆ GetMemoryProperties()

VkPhysicalDeviceMemoryProperties Vulkan::GetMemoryProperties ( )

get memory properties

◆ GetMemoryType()

VkResult Vulkan::GetMemoryType ( uint32_t bits,
VkMemoryPropertyFlags flags,
uint32_t & index )

get vulkan memory type based on resource requirements and wanted memory properties

◆ GetOrCreatePipeline()

VkPipeline Vulkan::GetOrCreatePipeline ( CoreGraphics::PassId pass,
uint subpass,
CoreGraphics::ShaderProgramId program,
const CoreGraphics::InputAssemblyKey inputAssembly,
const VkGraphicsPipelineCreateInfo & info )

Generate or return cached VkPipeline.

◆ GetPipelineCache()

VkPipelineCache Vulkan::GetPipelineCache ( )

get pipeline cache

◆ GetPresentFence()

VkFence Vulkan::GetPresentFence ( )

get the present fence

◆ GetQueryPool()

VkQueryPool Vulkan::GetQueryPool ( const CoreGraphics::QueryType query)

Get query pool.

◆ GetQueue()

const VkQueue Vulkan::GetQueue ( const CoreGraphics::QueueType type,
const IndexT index )

get queue from index and family

◆ GetRenderingSemaphore()

VkSemaphore Vulkan::GetRenderingSemaphore ( )

get final rendering semaphore

◆ InitInstance()

void Vulkan::InitInstance ( VkInstance instance)

initialize Vulkan instance, loads function pointers directly from driver

◆ InitVulkan()

void Vulkan::InitVulkan ( )

initialize Vulkan by loading dll and setting up the instance loader

◆ Invalidate()

void Vulkan::Invalidate ( const VkDevice dev,
const CoreGraphics::Alloc & alloc,
IndexT offset,
SizeT size )

invalidate a mapped memory region

◆ PassGetVkDevice()

const VkDevice Vulkan::PassGetVkDevice ( const CoreGraphics::PassId & id)

Get device creating this pass.

◆ PassGetVkFramebuffer()

const VkFramebuffer Vulkan::PassGetVkFramebuffer ( const CoreGraphics::PassId & id)

Get framebuffer.

◆ PassGetVkFramebufferInfo()

const VkGraphicsPipelineCreateInfo & Vulkan::PassGetVkFramebufferInfo ( const CoreGraphics::PassId & id)

get vk framebuffer info

◆ PassGetVkNumAttachments()

const SizeT Vulkan::PassGetVkNumAttachments ( const CoreGraphics::PassId & id)

get number of pass attachments

◆ PassGetVkRenderPass()

const VkRenderPass Vulkan::PassGetVkRenderPass ( const CoreGraphics::PassId & id)

Get pass.

◆ PassGetVkRenderPassBeginInfo()

const VkRenderPassBeginInfo & Vulkan::PassGetVkRenderPassBeginInfo ( const CoreGraphics::PassId & id)

get vk render pass

◆ ResourcePipelineGetVk()

const VkPipelineLayout & Vulkan::ResourcePipelineGetVk ( const CoreGraphics::ResourcePipelineId & id)

get pipeline layout

◆ ResourceTableGetVkDescriptorSet()

const VkDescriptorSet & Vulkan::ResourceTableGetVkDescriptorSet ( CoreGraphics::ResourceTableId id)

Get descriptor set.

◆ ResourceTableGetVkDevice()

const VkDevice & Vulkan::ResourceTableGetVkDevice ( CoreGraphics::ResourceTableId id)

Get device used to create resource table.

◆ ResourceTableGetVkPoolIndex()

const IndexT Vulkan::ResourceTableGetVkPoolIndex ( CoreGraphics::ResourceTableId id)

Get descriptor pool index.

◆ ResourceTableLayoutAllocTable()

void Vulkan::ResourceTableLayoutAllocTable ( const CoreGraphics::ResourceTableLayoutId & id,
const VkDevice dev,
uint overallocationSize,
IndexT & outIndex,
VkDescriptorSet & outSet )

allocate new descriptor set from pool

◆ ResourceTableLayoutDeallocTable()

void Vulkan::ResourceTableLayoutDeallocTable ( const CoreGraphics::ResourceTableLayoutId & id,
const VkDevice dev,
const VkDescriptorSet & set,
const IndexT index )

deallocate descriptor set from pool

◆ ResourceTableLayoutGetFreeItemsCounter()

uint * Vulkan::ResourceTableLayoutGetFreeItemsCounter ( const CoreGraphics::ResourceTableLayoutId & id,
const IndexT index )

Get descriptor pool free items counter.

◆ ResourceTableLayoutGetVk()

const VkDescriptorSetLayout & Vulkan::ResourceTableLayoutGetVk ( const CoreGraphics::ResourceTableLayoutId & id)

get table layout

◆ ResourceTableLayoutGetVkDescriptorPool()

const VkDescriptorPool & Vulkan::ResourceTableLayoutGetVkDescriptorPool ( const CoreGraphics::ResourceTableLayoutId & id,
const IndexT index )

Get descriptor pool.

◆ SamplerGetVk()

const VkSampler & Vulkan::SamplerGetVk ( const CoreGraphics::SamplerId & id)

get vulkan sampler

◆ SemaphoreGetVk()

VkSemaphore Vulkan::SemaphoreGetVk ( const CoreGraphics::SemaphoreId & id)

get vulkan sampler

◆ SetupAdapter()

void Vulkan::SetupAdapter ( CoreGraphics::GraphicsDeviceCreateInfo::Features features)

setup graphics adapter

◆ SetupEmptyDescriptorSetLayout()

void Vulkan::SetupEmptyDescriptorSetLayout ( )

run this before using any resource tables

◆ SetupSparse()

void Vulkan::SetupSparse ( VkDevice dev,
VkImage img,
Ids::Id32 sparseExtension,
const VkTextureLoadInfo & info )

◆ ShaderCleanup()

void Vulkan::ShaderCleanup ( VkDevice dev,
Util::Array< CoreGraphics::SamplerId > & immutableSamplers,
Util::FixedArray< Util::Pair< uint32_t, CoreGraphics::ResourceTableLayoutId > > & setLayouts,
Util::Dictionary< Util::StringAtom, CoreGraphics::BufferId > & buffers,
CoreGraphics::ResourcePipelineId & pipelineLayout )

cleanup shader

◆ ShaderGetProgramReflection()

const VkProgramReflectionInfo & Vulkan::ShaderGetProgramReflection ( const CoreGraphics::ShaderProgramId shaderProgramId)

Use direct resource ids, not the State, Shader or Variable type ids.

◆ ShaderSetup()

void Vulkan::ShaderSetup ( VkDevice dev,
const Util::StringAtom & name,
const VkPhysicalDeviceProperties props,
AnyFX::ShaderEffect * effect,
Util::FixedArray< CoreGraphics::ResourcePipelinePushConstantRange > & constantRange,
Util::Array< CoreGraphics::SamplerId > & immutableSamplers,
Util::FixedArray< Util::Pair< uint32_t, CoreGraphics::ResourceTableLayoutId > > & setLayouts,
Util::Dictionary< uint32_t, uint32_t > & setLayoutMap,
CoreGraphics::ResourcePipelineId & pipelineLayout,
Util::Dictionary< Util::StringAtom, uint32_t > & resourceSlotMapping,
Util::Dictionary< Util::StringAtom, IndexT > & constantBindings )

create descriptor set layout

◆ SparseBufferBind()

void Vulkan::SparseBufferBind ( const VkBuffer buf,
const Util::Array< VkSparseMemoryBind > & binds )

Perform a set of sparse binding operations for buffers.

◆ SparseTextureBind()

void Vulkan::SparseTextureBind ( const VkImage img,
const Util::Array< VkSparseMemoryBind > & opaqueBinds,
const Util::Array< VkSparseImageMemoryBind > & pageBinds )

perform a set of sparse image binding operations

◆ TextureGetVkDevice()

const VkDevice Vulkan::TextureGetVkDevice ( const CoreGraphics::TextureId id)

get the device created the image

◆ TextureGetVkImage()

const VkImage Vulkan::TextureGetVkImage ( const CoreGraphics::TextureId id)

get Vk image

◆ TextureGetVkImageView()

const VkImageView Vulkan::TextureGetVkImageView ( const CoreGraphics::TextureId id)

get vk image view

◆ TextureGetVkStencilImageView()

const VkImageView Vulkan::TextureGetVkStencilImageView ( const CoreGraphics::TextureId id)

get vk image view for stencil

◆ TextureViewGetVk()

const VkImageView Vulkan::TextureViewGetVk ( const TextureViewId id)

Get vk image view.

◆ TextureViewGetVkDevice()

const VkDevice Vulkan::TextureViewGetVkDevice ( const CoreGraphics::TextureViewId id)

Get device used to create view.

◆ TlasGetVk()

const VkAccelerationStructureKHR Vulkan::TlasGetVk ( const CoreGraphics::TlasId id)

Get acceleration structure.

◆ TlasGetVkBuffer()

const VkBuffer Vulkan::TlasGetVkBuffer ( const CoreGraphics::TlasId id)

Get buffer holding TLAS data.

◆ TlasGetVkBuild()

const VkAccelerationStructureBuildGeometryInfoKHR & Vulkan::TlasGetVkBuild ( const CoreGraphics::TlasId id)

Get build info.

◆ TlasGetVkDevice()

const VkDevice Vulkan::TlasGetVkDevice ( const CoreGraphics::TlasId id)

Get device used to create Tlas.

◆ TlasGetVkRanges()

const Util::Array< VkAccelerationStructureBuildRangeInfoKHR > & Vulkan::TlasGetVkRanges ( const CoreGraphics::TlasId id)

Get build ranges.

◆ UpdateOccupancy()

void Vulkan::UpdateOccupancy ( uint32_t * occupancyList,
uint32_t & slotsUsed,
const CoreGraphics::ShaderVisibility vis )

◆ VertexLayoutGetVkBindInfo()

const VertexLayoutVkBindInfo & Vulkan::VertexLayoutGetVkBindInfo ( const CoreGraphics::VertexLayoutId layout)

Get dynamic bind info.

◆ VkShaderCreateSignature()

static Util::String Vulkan::VkShaderCreateSignature ( const VkDescriptorSetLayoutBinding & bind)

create descriptor layout signature

◆ VkShaderProgramCreateShader()

void Vulkan::VkShaderProgramCreateShader ( const VkDevice dev,
VkShaderModule * shader,
unsigned binarySize,
char * binary )

create shader object

◆ VkShaderProgramDiscard()

void Vulkan::VkShaderProgramDiscard ( VkShaderProgramSetupInfo & info,
VkShaderProgramRuntimeInfo & rt,
VkPipeline & pipeline )

discard variation

◆ VkShaderProgramGetLayout()

VkPipelineLayout Vulkan::VkShaderProgramGetLayout ( const CoreGraphics::ShaderProgramId id)

Get resource layout of shader program.

◆ VkShaderProgramGetRaytracingLibrary()

VkPipeline Vulkan::VkShaderProgramGetRaytracingLibrary ( const CoreGraphics::ShaderProgramId id)

Get raytracing library pipepline.

◆ VkShaderProgramGetRaytracingVaryingSizes()

void Vulkan::VkShaderProgramGetRaytracingVaryingSizes ( const CoreGraphics::ShaderProgramId id,
uint & rayPayloadSize,
uint & hitAttributeSize )

Get ray payload and hit attribute sizes.

◆ VkShaderProgramSetup()

void Vulkan::VkShaderProgramSetup ( const Ids::Id24 id,
const Resources::ResourceName & shaderName,
AnyFX::VkProgram * program,
const CoreGraphics::ResourcePipelineId & pipelineLayout )

setup from AnyFX program

◆ VkShaderProgramSetupAsCompute()

void Vulkan::VkShaderProgramSetupAsCompute ( VkShaderProgramSetupInfo & setup,
VkShaderProgramRuntimeInfo & runtime )

create this program as a compute program (can be done immediately)

◆ VkShaderProgramSetupAsGraphics()

void Vulkan::VkShaderProgramSetupAsGraphics ( AnyFX::VkProgram * program,
const Resources::ResourceName & shaderName,
VkShaderProgramRuntimeInfo & runtime )

create this program as a graphics program

◆ VkShaderProgramSetupAsRaytracing()

void Vulkan::VkShaderProgramSetupAsRaytracing ( AnyFX::VkProgram * program,
const Resources::ResourceName & shaderName,
VkShaderProgramSetupInfo & setup,
VkShaderProgramRuntimeInfo & runtime )

create this program as a compute program (can be done immediately)

◆ WaitForPresent()

void Vulkan::WaitForPresent ( VkSemaphore sem)

Variable Documentation

◆ barrierAllocator

VkBarrierAllocator Vulkan::barrierAllocator ( 0x00FFFFFF )

◆ blasAllocator

VkBlasAllocator Vulkan::blasAllocator

◆ blasInstanceAllocator

VkBlasInstanceAllocator Vulkan::blasInstanceAllocator

◆ bufferAllocator

VkBufferAllocator Vulkan::bufferAllocator

◆ bufferSparseExtensionAllocator

VkBufferSparseExtensionAllocator Vulkan::bufferSparseExtensionAllocator

◆ commandBufferCritSect

Threading::CriticalSection Vulkan::commandBufferCritSect

◆ commandBufferPools

VkCommandBufferPoolAllocator Vulkan::commandBufferPools(0x00FFFFFF) ( 0x00FFFFFF )

◆ commandBuffers

VkCommandBufferAllocator Vulkan::commandBuffers

◆ delayedDeleteSection

Threading::CriticalSection Vulkan::delayedDeleteSection
static

◆ EmptySetLayout

VkDescriptorSetLayout Vulkan::EmptySetLayout

◆ eventAllocator

VkEventAllocator Vulkan::eventAllocator ( 0x00FFFFFF )

◆ EventMaxNumBarriers

const SizeT Vulkan::EventMaxNumBarriers = 16
static

◆ fenceAllocator

VkFenceAllocator Vulkan::fenceAllocator ( 0x00FFFFFF )

◆ MaxNumBarriers

const SizeT Vulkan::MaxNumBarriers = 16
static

◆ NumPoolTypes

const uint Vulkan::NumPoolTypes = 4
static

◆ passAllocator

VkPassAllocator Vulkan::passAllocator ( 0x00FFFFFF )

◆ pipelineAllocator

Ids::IdAllocator< Pipeline > Vulkan::pipelineAllocator

◆ pipelineMutex

Threading::CriticalSection Vulkan::pipelineMutex
static

◆ resourcePipelineAllocator

VkResourcePipelineAllocator Vulkan::resourcePipelineAllocator

◆ resourceTableAllocator

VkResourceTableAllocator Vulkan::resourceTableAllocator

◆ resourceTableLayoutAllocator

VkResourceTableLayoutAllocator Vulkan::resourceTableLayoutAllocator

◆ samplerAllocator

VkSamplerAllocator Vulkan::samplerAllocator

◆ semaphoreAllocator

VkSemaphoreAllocator Vulkan::semaphoreAllocator ( 0x00FFFFFF )

◆ setupLock

Threading::CriticalSection Vulkan::setupLock
static

◆ shaderAlloc

ShaderAllocator Vulkan::shaderAlloc

◆ shaderProgramAlloc

ShaderProgramAllocator Vulkan::shaderProgramAlloc

◆ state

◆ swapchainAllocator

SwapchainAllocator Vulkan::swapchainAllocator

◆ textureAllocator

VkTextureAllocator Vulkan::textureAllocator

◆ textureSparseExtensionAllocator

VkTextureSparseExtensionAllocator Vulkan::textureSparseExtensionAllocator

◆ textureStencilExtensionAllocator

VkTextureStencilExtensionAllocator Vulkan::textureStencilExtensionAllocator

◆ textureSwapExtensionAllocator

VkTextureSwapExtensionAllocator Vulkan::textureSwapExtensionAllocator

◆ textureViewAllocator

VkTextureViewAllocator Vulkan::textureViewAllocator ( 0x00FFFFFF )

◆ tlasAllocator

VkTlasAllocator Vulkan::tlasAllocator

◆ transferLock

Threading::CriticalSection Vulkan::transferLock
static

◆ UniqueIdCounter

uint32_t Vulkan::UniqueIdCounter = 0

◆ vertexLayoutAllocator

VkVertexLayoutAllocator Vulkan::vertexLayoutAllocator

◆ vertexSignatureMutex

Threading::CriticalSection Vulkan::vertexSignatureMutex
static

◆ VkCmdDebugMarkerBegin

PFN_vkCmdBeginDebugUtilsLabelEXT Vulkan::VkCmdDebugMarkerBegin = nullptr

◆ VkCmdDebugMarkerEnd

PFN_vkCmdEndDebugUtilsLabelEXT Vulkan::VkCmdDebugMarkerEnd = nullptr

◆ VkCmdDebugMarkerInsert

PFN_vkCmdInsertDebugUtilsLabelEXT Vulkan::VkCmdDebugMarkerInsert = nullptr

◆ VkCreateDebugMessenger

PFN_vkCreateDebugUtilsMessengerEXT Vulkan::VkCreateDebugMessenger = nullptr

◆ VkDebugObjectName

PFN_vkSetDebugUtilsObjectNameEXT Vulkan::VkDebugObjectName = nullptr

◆ VkDebugObjectTag

PFN_vkSetDebugUtilsObjectTagEXT Vulkan::VkDebugObjectTag = nullptr

◆ VkDestroyDebugMessenger

PFN_vkDestroyDebugUtilsMessengerEXT Vulkan::VkDestroyDebugMessenger = nullptr

◆ VkErrorDebugMessageHandle

VkDebugUtilsMessengerEXT Vulkan::VkErrorDebugMessageHandle = nullptr

◆ VkQueueBeginLabel

PFN_vkQueueBeginDebugUtilsLabelEXT Vulkan::VkQueueBeginLabel = nullptr

◆ VkQueueEndLabel

PFN_vkQueueEndDebugUtilsLabelEXT Vulkan::VkQueueEndLabel = nullptr

◆ VkQueueInsertLabel

PFN_vkQueueInsertDebugUtilsLabelEXT Vulkan::VkQueueInsertLabel = nullptr

◆ VkShaderDescriptorSetCache

Util::Dictionary< Util::StringAtom, VkDescriptorSet > Vulkan::VkShaderDescriptorSetCache

◆ VkShaderLayoutCache

Util::Dictionary< Util::StringAtom, VkDescriptorSetLayout > Vulkan::VkShaderLayoutCache

◆ VkShaderPipelineCache

Util::Dictionary< Util::StringAtom, VkPipelineLayout > Vulkan::VkShaderPipelineCache

◆ VkSwizzle

const VkComponentSwizzle Vulkan::VkSwizzle[]
static
Initial value:
=
{
VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_R,
VK_COMPONENT_SWIZZLE_G,
VK_COMPONENT_SWIZZLE_B,
VK_COMPONENT_SWIZZLE_A,
VK_COMPONENT_SWIZZLE_ZERO,
VK_COMPONENT_SWIZZLE_ONE,
}