64 void SetShader(
const CoreGraphics::ShaderProgramId program,
const VkGraphicsPipelineCreateInfo& shaderInfo);
70 ,
const uint32_t subpass
71 ,
const CoreGraphics::ShaderProgramId program
73 ,
const VkGraphicsPipelineCreateInfo& shaderInfo);
77 ,
const uint32_t subpass
78 ,
const CoreGraphics::ShaderProgramId program
80 ,
const VkGraphicsPipelineCreateInfo& shaderInfo
89 ,
const uint32_t subpass
90 ,
const CoreGraphics::ShaderProgramId program
92 ,
const VkGraphicsPipelineCreateInfo& shaderInfo);
97 void Reload(
const CoreGraphics::ShaderProgramId
id);
Allocates memory in chunks.
Definition arenaallocator.h:36
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
void Reload(const CoreGraphics::ShaderProgramId id)
re-creates all pipelines for the given shader program id
Definition vkpipelinedatabase.cc:288
VkPipelineCache cache
Definition vkpipelinedatabase.h:104
void SetShader(const CoreGraphics::ShaderProgramId program, const VkGraphicsPipelineCreateInfo &shaderInfo)
set shader
Definition vkpipelinedatabase.cc:124
void RecreatePipelines()
re-creates all pipelines for all shader programs
Definition vkpipelinedatabase.cc:356
Tier1Node * ct1
Definition vkpipelinedatabase.h:145
VkPipeline GetCompiledPipeline()
gets pipeline if it already exists, or creates if exists
Definition vkpipelinedatabase.cc:216
void SetPass(const CoreGraphics::PassId pass)
set pass
Definition vkpipelinedatabase.cc:84
virtual ~VkPipelineDatabase()
destructor
Definition vkpipelinedatabase.cc:29
VkGraphicsPipelineCreateInfo currentShaderInfo
Definition vkpipelinedatabase.h:108
VkPipelineDatabase()
constructor
Definition vkpipelinedatabase.cc:18
VkPipeline currentPipeline
Definition vkpipelinedatabase.h:149
void SetInputAssembly(const CoreGraphics::InputAssemblyKey key)
Set input assembly.
Definition vkpipelinedatabase.cc:145
void SetSubpass(uint32_t subpass)
set subpass
Definition vkpipelinedatabase.cc:104
CoreGraphics::PassId currentPass
Definition vkpipelinedatabase.h:105
const VkPipelineVertexInputStateCreateInfo * currentVertexLayout
Definition vkpipelinedatabase.h:110
void InvalidatePipeline(const CoreGraphics::PipelineId pipeline)
Invalidate a pipeline.
Definition vkpipelinedatabase.cc:207
void Discard()
discard database
Definition vkpipelinedatabase.cc:48
CoreGraphics::PipelineId GetPipeline(const CoreGraphics::PassId pass, const uint32_t subpass, const CoreGraphics::ShaderProgramId program, const CoreGraphics::InputAssemblyKey inputAssembly, const VkGraphicsPipelineCreateInfo &shaderInfo)
Get if there is a pipeline associated with the current state.
Definition vkpipelinedatabase.cc:164
uint32_t currentSubpass
Definition vkpipelinedatabase.h:106
void CachePipeline(const CoreGraphics::PassId pass, const uint32_t subpass, const CoreGraphics::ShaderProgramId program, const CoreGraphics::InputAssemblyKey inputAssembly, const VkGraphicsPipelineCreateInfo &shaderInfo, CoreGraphics::PipelineId pipeline)
Inject pipeline, used for pipelines created outside of the database.
Definition vkpipelinedatabase.cc:186
CoreGraphics::ShaderProgramId currentShaderProgram
Definition vkpipelinedatabase.h:107
void Reset()
resets all iterators
Definition vkpipelinedatabase.cc:272
Memory::ArenaAllocator< BIG_CHUNK > tierNodeAllocator
Definition vkpipelinedatabase.h:143
__DeclareSingleton(VkPipelineDatabase)
StateLevel
Definition vkpipelinedatabase.h:40
@ ShaderLevel
Definition vkpipelinedatabase.h:43
@ PipelineLevel
Definition vkpipelinedatabase.h:46
@ SubpassLevel
Definition vkpipelinedatabase.h:42
@ VertexLayoutLevel
Definition vkpipelinedatabase.h:44
@ InputAssemblyLevel
Definition vkpipelinedatabase.h:45
@ PassLevel
Definition vkpipelinedatabase.h:41
void Setup(const VkDevice dev, const VkPipelineCache cache)
setup database
Definition vkpipelinedatabase.cc:38
CoreGraphics::InputAssemblyKey currentInputAssembly
Definition vkpipelinedatabase.h:109
Tier2Node * ct2
Definition vkpipelinedatabase.h:146
Tier3Node * ct3
Definition vkpipelinedatabase.h:147
Util::Dictionary< CoreGraphics::PassId, Tier1Node * > tier1
Definition vkpipelinedatabase.h:141
VkDevice dev
Definition vkpipelinedatabase.h:103
Tier4Node * ct4
Definition vkpipelinedatabase.h:148
Vulkan implementation of GPU acceleration structure.
Definition vkaccelerationstructure.cc:15
A shader represents an entire shader resource, containing several stages and programs.
bool initial
Definition vkpipelinedatabase.h:119
BaseNode()
Definition vkpipelinedatabase.h:121
Definition vkpipelinedatabase.h:124
Util::Dictionary< IndexT, Tier2Node * > children
Definition vkpipelinedatabase.h:126
Definition vkpipelinedatabase.h:129
Util::Dictionary< CoreGraphics::ShaderProgramId, Tier3Node * > children
Definition vkpipelinedatabase.h:130
Definition vkpipelinedatabase.h:133
Util::Dictionary< CoreGraphics::InputAssemblyKey, Tier4Node * > children
Definition vkpipelinedatabase.h:134
Definition vkpipelinedatabase.h:137
CoreGraphics::PipelineId pipeline
Definition vkpipelinedatabase.h:138