5#include <unordered_set>
8#include "render/general/pipeline/Pipeline.h"
9#include "render/general/resource/frame/FrameResourceManager.h"
10#include "shader/general/resource/ShaderArrayIndexManager.h"
11#include "misc/StdHashes.hpp"
14#include "vulkan/vulkan.h"
65 std::unordered_map<std::string, uint32_t, StdStringHash, std::equal_to<>>
resourceBindings;
85 std::unordered_map<std::string, std::unique_ptr<ShaderArrayIndexManager>>
138 const std::string& sShaderResourceName,
139 VkDescriptorType descriptorType);
155 std::string_view sShaderResourceName,
156 VkDescriptorType descriptorType,
157 VkImageLayout imageLayout,
223 [[nodiscard]] std::optional<Error>
242 bool bUsePixelBlending);
253 [[nodiscard]] std::optional<Error>
290 const std::unordered_map<std::string, size_t>& pushConstantUintFieldOffsets,
291 const std::unordered_map<std::string, uint32_t,
StdStringHash, std::equal_to<>>&
static constexpr unsigned int getFrameResourceCount()
Definition: FrameResourceManager.h:74
Definition: GlslShader.h:20
Definition: GpuResource.h:16
Definition: PipelineManager.h:54
Definition: Pipeline.h:20
const std::unique_ptr< PipelineConfiguration > pPipelineConfiguration
Definition: Pipeline.h:266
Renderer *const pRenderer
Definition: Pipeline.h:272
PipelineManager *const pPipelineManager
Definition: Pipeline.h:269
Definition: Renderer.h:43
Definition: VulkanPipeline.h:21
std::pair< std::recursive_mutex, InternalResources > mtxInternalResources
Definition: VulkanPipeline.h:298
static std::variant< std::shared_ptr< VulkanPipeline >, Error > createGraphicsPipeline(Renderer *pRenderer, PipelineManager *pPipelineManager, std::unique_ptr< PipelineConfiguration > pPipelineConfiguration)
Definition: VulkanPipeline.cpp:64
std::optional< Error > generateGraphicsPipeline()
Definition: VulkanPipeline.cpp:335
std::pair< std::recursive_mutex, InternalResources > * getInternalResources()
Definition: VulkanPipeline.h:165
virtual std::optional< Error > recreateInternalResources() override
Definition: VulkanPipeline.cpp:282
std::optional< Error > bindImageIfUsed(GpuResource *pImageResourceToBind, std::string_view sShaderResourceName, VkDescriptorType descriptorType, VkImageLayout imageLayout, VkSampler pSampler)
Definition: VulkanPipeline.cpp:163
std::variant< VkPushConstantRange, Error > definePushConstants(const std::unordered_map< std::string, size_t > &pushConstantUintFieldOffsets, const std::unordered_map< std::string, uint32_t, StdStringHash, std::equal_to<> > &resourceBindings)
Definition: VulkanPipeline.cpp:304
std::optional< Error > bindFrameDataDescriptors()
Definition: VulkanPipeline.cpp:1045
std::optional< Error > generateComputePipelineForShader(const std::string &sComputeShaderName)
Definition: VulkanPipeline.cpp:412
std::optional< Error > bindBuffersIfUsed(const std::array< GpuResource *, FrameResourceManager::getFrameResourceCount()> &vResources, const std::string &sShaderResourceName, VkDescriptorType descriptorType)
Definition: VulkanPipeline.cpp:98
static std::variant< std::shared_ptr< VulkanPipeline >, Error > createComputePipeline(Renderer *pRenderer, PipelineManager *pPipelineManager, const std::string &sComputeShaderName)
Definition: VulkanPipeline.cpp:82
std::optional< Error > releaseInternalResources()
Definition: VulkanPipeline.cpp:223
Definition: VulkanRenderer.h:26
Definition: StdHashes.hpp:10
Definition: VulkanPipeline.h:24
std::array< VkDescriptorSet, FrameResourceManager::getFrameResourceCount()> vDescriptorSets
Definition: VulkanPipeline.h:55
bool bIsReadyForUsage
Definition: VulkanPipeline.h:89
VkPipelineLayout pPipelineLayout
Definition: VulkanPipeline.h:28
VkDescriptorPool pDescriptorPool
Definition: VulkanPipeline.h:37
VkDescriptorSetLayout pDescriptorSetLayout
Definition: VulkanPipeline.h:34
std::unordered_map< std::string, uint32_t, StdStringHash, std::equal_to<> > resourceBindings
Definition: VulkanPipeline.h:65
std::unordered_map< std::string, std::unique_ptr< ShaderArrayIndexManager > > shaderArrayIndexManagers
Definition: VulkanPipeline.h:86
VkPipeline pPipeline
Definition: VulkanPipeline.h:31