Nameless Engine
|
#include <VulkanPipeline.h>
Public Attributes | |
VkPipelineLayout | pPipelineLayout = nullptr |
VkPipeline | pPipeline = nullptr |
VkDescriptorSetLayout | pDescriptorSetLayout = nullptr |
VkDescriptorPool | pDescriptorPool = nullptr |
std::array< VkDescriptorSet, FrameResourceManager::getFrameResourceCount()> | vDescriptorSets |
std::unordered_map< std::string, uint32_t, StdStringHash, std::equal_to<> > | resourceBindings |
std::unordered_map< std::string, std::unique_ptr< ShaderArrayIndexManager > > | shaderArrayIndexManagers |
bool | bIsReadyForUsage = false |
Stores internal resources.
bool ne::VulkanPipeline::InternalResources::bIsReadyForUsage = false |
Whether resources were created or not.
VkDescriptorPool ne::VulkanPipeline::InternalResources::pDescriptorPool = nullptr |
Created descriptor pool.
VkDescriptorSetLayout ne::VulkanPipeline::InternalResources::pDescriptorSetLayout = nullptr |
Created descriptor set layout.
VkPipeline ne::VulkanPipeline::InternalResources::pPipeline = nullptr |
Created pipeline.
VkPipelineLayout ne::VulkanPipeline::InternalResources::pPipelineLayout = nullptr |
Created pipeline layout.
std::unordered_map<std::string, uint32_t, StdStringHash, std::equal_to<> > ne::VulkanPipeline::InternalResources::resourceBindings |
Map of pairs "shader resource name" (from GLSL code) - "layout binding index".
std::unordered_map<std::string, std::unique_ptr<ShaderArrayIndexManager> > ne::VulkanPipeline::InternalResources::shaderArrayIndexManagers |
Stores pairs of "shader resource name" - "shader array index manager".
std::array<VkDescriptorSet, FrameResourceManager::getFrameResourceCount()> ne::VulkanPipeline::InternalResources::vDescriptorSets |
Created descriptor set per each frame resource.
uniform
buffer with frame constant data per frame resource, so if we have 3 frame resources we have 3 buffers with frame data and each descriptor set will point to a different buffer. Just like with other CPU write shader resources when we want to update such a resource we mark it as "needs update" but we don't update it immediately because it may be currently used by the GPU and so in order to not wait for the GPU and not halt the rendering we update all shader resources with CPU access marked as "needs update" in the beginning of the draw
function and we only update shader resources of the current (next) frame resource (that is no longer being used). This way we don't need to halt the rendering when we want to update some shader resource with CPU write access, thus we have 1 descriptor set per frame resource.