Nebula
Loading...
Searching...
No Matches
Vulkan::VkPipelineDatabase Class Reference

#include <vkpipelinedatabase.h>

Classes

struct  BaseNode
 
struct  Tier1Node
 
struct  Tier2Node
 
struct  Tier3Node
 
struct  Tier4Node
 

Public Types

enum  StateLevel {
  PassLevel , SubpassLevel , ShaderLevel , VertexLayoutLevel ,
  InputAssemblyLevel , PipelineLevel
}
 

Public Member Functions

 VkPipelineDatabase ()
 constructor
 
virtual ~VkPipelineDatabase ()
 destructor
 
void Setup (const VkDevice dev, const VkPipelineCache cache)
 setup database
 
void Discard ()
 discard database
 
void SetPass (const CoreGraphics::PassId pass)
 set pass
 
void SetSubpass (uint32_t subpass)
 set subpass
 
void SetShader (const CoreGraphics::ShaderProgramId program, const VkGraphicsPipelineCreateInfo &shaderInfo)
 set shader
 
void SetInputAssembly (const CoreGraphics::InputAssemblyKey key)
 Set input assembly.
 
VkPipeline GetCompiledPipeline ()
 gets pipeline if it already exists, or creates if exists
 
VkPipeline GetCompiledPipeline (const CoreGraphics::PassId pass, const uint32_t subpass, const CoreGraphics::ShaderProgramId program, const CoreGraphics::InputAssemblyKey inputAssembly, const VkGraphicsPipelineCreateInfo &shaderInfo)
 Gets the pipeline associated with a set of state, or returns a previously created one.
 
VkPipeline CreatePipeline (const CoreGraphics::PassId pass, const uint32_t subpass, const CoreGraphics::ShaderProgramId program, const CoreGraphics::InputAssemblyKey inputAssembly, const VkGraphicsPipelineCreateInfo &shaderInfo)
 Create pipeline.
 
void Reset ()
 resets all iterators
 
void Reload (const CoreGraphics::ShaderProgramId id)
 re-creates all pipelines for the given shader program id
 
void RecreatePipelines ()
 re-creates all pipelines for all shader programs
 

Private Member Functions

 __DeclareSingleton (VkPipelineDatabase)
 

Private Attributes

VkDevice dev
 
VkPipelineCache cache
 
CoreGraphics::PassId currentPass
 
uint32_t currentSubpass
 
CoreGraphics::ShaderProgramId currentShaderProgram
 
VkGraphicsPipelineCreateInfo currentShaderInfo
 
CoreGraphics::InputAssemblyKey currentInputAssembly
 
const VkPipelineVertexInputStateCreateInfo * currentVertexLayout
 
Util::Dictionary< CoreGraphics::PassId, Tier1Node * > tier1
 
Memory::ArenaAllocator< BIG_CHUNKtierNodeAllocator
 
Tier1Nodect1
 
Tier2Nodect2
 
Tier3Nodect3
 
Tier4Nodect4
 
VkPipeline currentPipeline
 

Member Enumeration Documentation

◆ StateLevel

Enumerator
PassLevel 
SubpassLevel 
ShaderLevel 
VertexLayoutLevel 
InputAssemblyLevel 
PipelineLevel 

Constructor & Destructor Documentation

◆ VkPipelineDatabase()

Vulkan::VkPipelineDatabase::VkPipelineDatabase ( )

constructor

◆ ~VkPipelineDatabase()

Vulkan::VkPipelineDatabase::~VkPipelineDatabase ( )
virtual

destructor

Member Function Documentation

◆ __DeclareSingleton()

Vulkan::VkPipelineDatabase::__DeclareSingleton ( VkPipelineDatabase )
private

◆ CreatePipeline()

VkPipeline Vulkan::VkPipelineDatabase::CreatePipeline ( const CoreGraphics::PassId pass,
const uint32_t subpass,
const CoreGraphics::ShaderProgramId program,
const CoreGraphics::InputAssemblyKey inputAssembly,
const VkGraphicsPipelineCreateInfo & shaderInfo )

Create pipeline.

◆ Discard()

void Vulkan::VkPipelineDatabase::Discard ( )

discard database

◆ GetCompiledPipeline() [1/2]

VkPipeline Vulkan::VkPipelineDatabase::GetCompiledPipeline ( )

gets pipeline if it already exists, or creates if exists

◆ GetCompiledPipeline() [2/2]

VkPipeline Vulkan::VkPipelineDatabase::GetCompiledPipeline ( const CoreGraphics::PassId pass,
const uint32_t subpass,
const CoreGraphics::ShaderProgramId program,
const CoreGraphics::InputAssemblyKey inputAssembly,
const VkGraphicsPipelineCreateInfo & shaderInfo )

Gets the pipeline associated with a set of state, or returns a previously created one.

◆ RecreatePipelines()

void Vulkan::VkPipelineDatabase::RecreatePipelines ( )

re-creates all pipelines for all shader programs

◆ Reload()

void Vulkan::VkPipelineDatabase::Reload ( const CoreGraphics::ShaderProgramId id)

re-creates all pipelines for the given shader program id

◆ Reset()

void Vulkan::VkPipelineDatabase::Reset ( )

resets all iterators

◆ SetInputAssembly()

void Vulkan::VkPipelineDatabase::SetInputAssembly ( const CoreGraphics::InputAssemblyKey key)

Set input assembly.

◆ SetPass()

void Vulkan::VkPipelineDatabase::SetPass ( const CoreGraphics::PassId pass)

set pass

◆ SetShader()

void Vulkan::VkPipelineDatabase::SetShader ( const CoreGraphics::ShaderProgramId program,
const VkGraphicsPipelineCreateInfo & shaderInfo )

set shader

◆ SetSubpass()

void Vulkan::VkPipelineDatabase::SetSubpass ( uint32_t subpass)

set subpass

◆ Setup()

void Vulkan::VkPipelineDatabase::Setup ( const VkDevice dev,
const VkPipelineCache cache )

setup database

Member Data Documentation

◆ cache

VkPipelineCache Vulkan::VkPipelineDatabase::cache
private

◆ ct1

Tier1Node* Vulkan::VkPipelineDatabase::ct1
private

◆ ct2

Tier2Node* Vulkan::VkPipelineDatabase::ct2
private

◆ ct3

Tier3Node* Vulkan::VkPipelineDatabase::ct3
private

◆ ct4

Tier4Node* Vulkan::VkPipelineDatabase::ct4
private

◆ currentInputAssembly

CoreGraphics::InputAssemblyKey Vulkan::VkPipelineDatabase::currentInputAssembly
private

◆ currentPass

CoreGraphics::PassId Vulkan::VkPipelineDatabase::currentPass
private

◆ currentPipeline

VkPipeline Vulkan::VkPipelineDatabase::currentPipeline
private

◆ currentShaderInfo

VkGraphicsPipelineCreateInfo Vulkan::VkPipelineDatabase::currentShaderInfo
private

◆ currentShaderProgram

CoreGraphics::ShaderProgramId Vulkan::VkPipelineDatabase::currentShaderProgram
private

◆ currentSubpass

uint32_t Vulkan::VkPipelineDatabase::currentSubpass
private

◆ currentVertexLayout

const VkPipelineVertexInputStateCreateInfo* Vulkan::VkPipelineDatabase::currentVertexLayout
private

◆ dev

VkDevice Vulkan::VkPipelineDatabase::dev
private

◆ tier1

Util::Dictionary<CoreGraphics::PassId, Tier1Node*> Vulkan::VkPipelineDatabase::tier1
private

◆ tierNodeAllocator

Memory::ArenaAllocator<BIG_CHUNK> Vulkan::VkPipelineDatabase::tierNodeAllocator
private

The documentation for this class was generated from the following files: