|
Nebula
|
#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 Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > 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. | |
| CoreGraphics::PipelineId | GetPipeline (const Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > 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. | |
| void | CachePipeline (const Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > 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. | |
| void | InvalidatePipeline (const CoreGraphics::PipelineId pipeline) |
| Invalidate a pipeline. | |
| VkPipeline | GetCompiledPipeline () |
| gets pipeline if it already exists, or creates if exists | |
| VkPipeline | GetCompiledPipeline (const Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > 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. | |
| 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 |
| Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > | currentPass |
| uint32_t | currentSubpass |
| CoreGraphics::ShaderProgramId | currentShaderProgram |
| VkGraphicsPipelineCreateInfo | currentShaderInfo |
| CoreGraphics::InputAssemblyKey | currentInputAssembly |
| const VkPipelineVertexInputStateCreateInfo * | currentVertexLayout |
| Util::Dictionary< Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId >, Tier1Node * > | tier1 |
| Memory::ArenaAllocator< BIG_CHUNK > | tierNodeAllocator |
| Tier1Node * | ct1 |
| Tier2Node * | ct2 |
| Tier3Node * | ct3 |
| Tier4Node * | ct4 |
| VkPipeline | currentPipeline |
| Vulkan::VkPipelineDatabase::VkPipelineDatabase | ( | ) |
constructor
|
virtual |
destructor
|
private |
| void Vulkan::VkPipelineDatabase::CachePipeline | ( | const Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > | 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.
| void Vulkan::VkPipelineDatabase::Discard | ( | ) |
discard database
| VkPipeline Vulkan::VkPipelineDatabase::GetCompiledPipeline | ( | ) |
gets pipeline if it already exists, or creates if exists
| VkPipeline Vulkan::VkPipelineDatabase::GetCompiledPipeline | ( | const Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > | 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.
| CoreGraphics::PipelineId Vulkan::VkPipelineDatabase::GetPipeline | ( | const Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > | 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.
| void Vulkan::VkPipelineDatabase::InvalidatePipeline | ( | const CoreGraphics::PipelineId | pipeline | ) |
Invalidate a pipeline.
| void Vulkan::VkPipelineDatabase::RecreatePipelines | ( | ) |
re-creates all pipelines for all shader programs
| void Vulkan::VkPipelineDatabase::Reload | ( | const CoreGraphics::ShaderProgramId | id | ) |
re-creates all pipelines for the given shader program id
| void Vulkan::VkPipelineDatabase::Reset | ( | ) |
resets all iterators
| void Vulkan::VkPipelineDatabase::SetInputAssembly | ( | const CoreGraphics::InputAssemblyKey | key | ) |
Set input assembly.
| void Vulkan::VkPipelineDatabase::SetPass | ( | const Util::Pair< CoreGraphics::PassId, CoreGraphics::RenderPassId > | pass | ) |
set pass
| void Vulkan::VkPipelineDatabase::SetShader | ( | const CoreGraphics::ShaderProgramId | program, |
| const VkGraphicsPipelineCreateInfo & | shaderInfo ) |
set shader
| void Vulkan::VkPipelineDatabase::SetSubpass | ( | uint32_t | subpass | ) |
set subpass
| void Vulkan::VkPipelineDatabase::Setup | ( | const VkDevice | dev, |
| const VkPipelineCache | cache ) |
setup database
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |