63 void SetShader(
const CoreGraphics::ShaderProgramId program,
const VkGraphicsPipelineCreateInfo& shaderInfo);
71 ,
const uint32_t subpass
72 ,
const CoreGraphics::ShaderProgramId program
74 ,
const VkGraphicsPipelineCreateInfo& shaderInfo);
78 ,
const uint32_t subpass
79 ,
const CoreGraphics::ShaderProgramId program
81 ,
const VkGraphicsPipelineCreateInfo& shaderInfo
87 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
Definition vkpipelinedatabase.h:34
void Reload(const CoreGraphics::ShaderProgramId id)
re-creates all pipelines for the given shader program id
Definition vkpipelinedatabase.cc:272
VkPipelineCache cache
Definition vkpipelinedatabase.h:94
void SetShader(const CoreGraphics::ShaderProgramId program, const VkGraphicsPipelineCreateInfo &shaderInfo)
set shader
Definition vkpipelinedatabase.cc:120
void RecreatePipelines()
re-creates all pipelines for all shader programs
Definition vkpipelinedatabase.cc:340
Tier1Node * ct1
Definition vkpipelinedatabase.h:135
VkPipeline GetCompiledPipeline()
gets pipeline if it already exists, or creates if exists
Definition vkpipelinedatabase.cc:160
void SetPass(const CoreGraphics::PassId pass)
set pass
Definition vkpipelinedatabase.cc:80
virtual ~VkPipelineDatabase()
destructor
Definition vkpipelinedatabase.cc:28
VkGraphicsPipelineCreateInfo currentShaderInfo
Definition vkpipelinedatabase.h:98
VkPipelineDatabase()
constructor
Definition vkpipelinedatabase.cc:17
VkPipeline currentPipeline
Definition vkpipelinedatabase.h:139
void SetInputAssembly(const CoreGraphics::InputAssemblyKey key)
Set input assembly.
Definition vkpipelinedatabase.cc:141
void SetSubpass(uint32_t subpass)
set subpass
Definition vkpipelinedatabase.cc:100
CoreGraphics::PassId currentPass
Definition vkpipelinedatabase.h:95
const VkPipelineVertexInputStateCreateInfo * currentVertexLayout
Definition vkpipelinedatabase.h:100
void Discard()
discard database
Definition vkpipelinedatabase.cc:47
uint32_t currentSubpass
Definition vkpipelinedatabase.h:96
CoreGraphics::ShaderProgramId currentShaderProgram
Definition vkpipelinedatabase.h:97
void Reset()
resets all iterators
Definition vkpipelinedatabase.cc:256
Memory::ArenaAllocator< BIG_CHUNK > tierNodeAllocator
Definition vkpipelinedatabase.h:133
__DeclareSingleton(VkPipelineDatabase)
StateLevel
Definition vkpipelinedatabase.h:39
@ ShaderLevel
Definition vkpipelinedatabase.h:42
@ PipelineLevel
Definition vkpipelinedatabase.h:45
@ SubpassLevel
Definition vkpipelinedatabase.h:41
@ VertexLayoutLevel
Definition vkpipelinedatabase.h:43
@ InputAssemblyLevel
Definition vkpipelinedatabase.h:44
@ PassLevel
Definition vkpipelinedatabase.h:40
VkPipeline CreatePipeline(const CoreGraphics::PassId pass, const uint32_t subpass, const CoreGraphics::ShaderProgramId program, const CoreGraphics::InputAssemblyKey inputAssembly, const VkGraphicsPipelineCreateInfo &shaderInfo)
Create pipeline.
Definition vkpipelinedatabase.cc:203
void Setup(const VkDevice dev, const VkPipelineCache cache)
setup database
Definition vkpipelinedatabase.cc:37
CoreGraphics::InputAssemblyKey currentInputAssembly
Definition vkpipelinedatabase.h:99
Tier2Node * ct2
Definition vkpipelinedatabase.h:136
Tier3Node * ct3
Definition vkpipelinedatabase.h:137
Util::Dictionary< CoreGraphics::PassId, Tier1Node * > tier1
Definition vkpipelinedatabase.h:131
VkDevice dev
Definition vkpipelinedatabase.h:93
Tier4Node * ct4
Definition vkpipelinedatabase.h:138
Vulkan implementation of GPU acceleration structure.
Definition vkaccelerationstructure.cc:15
A shader represents an entire shader resource, containing several stages and programs.
Definition vkpipelinedatabase.h:108
bool initial
Definition vkpipelinedatabase.h:109
BaseNode()
Definition vkpipelinedatabase.h:111
Definition vkpipelinedatabase.h:114
Util::Dictionary< IndexT, Tier2Node * > children
Definition vkpipelinedatabase.h:116
Definition vkpipelinedatabase.h:119
Util::Dictionary< CoreGraphics::ShaderProgramId, Tier3Node * > children
Definition vkpipelinedatabase.h:120
Definition vkpipelinedatabase.h:123
Util::Dictionary< CoreGraphics::InputAssemblyKey, Tier4Node * > children
Definition vkpipelinedatabase.h:124
Definition vkpipelinedatabase.h:127
VkPipeline pipeline
Definition vkpipelinedatabase.h:128