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,
231 [[nodiscard]] std::optional<Error>
250 bool bUsePixelBlending);
261 [[nodiscard]] std::optional<Error>
285 const std::unordered_map<std::string, size_t>& pushConstantUintFieldOffsets,
286 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:98
Definition: Pipeline.h:20
const std::unique_ptr< PipelineConfiguration > pPipelineConfiguration
Definition: Pipeline.h:274
Renderer *const pRenderer
Definition: Pipeline.h:280
PipelineManager *const pPipelineManager
Definition: Pipeline.h:277
Definition: Renderer.h:43
Definition: VulkanPipeline.h:21
std::pair< std::recursive_mutex, InternalResources > mtxInternalResources
Definition: VulkanPipeline.h:293
static std::variant< std::shared_ptr< VulkanPipeline >, Error > createGraphicsPipeline(Renderer *pRenderer, PipelineManager *pPipelineManager, std::unique_ptr< PipelineConfiguration > pPipelineConfiguration)
Definition: VulkanPipeline.cpp:65
virtual std::optional< Error > releaseInternalResources() override
Definition: VulkanPipeline.cpp:224
std::optional< Error > generateGraphicsPipeline()
Definition: VulkanPipeline.cpp:328
std::pair< std::recursive_mutex, InternalResources > * getInternalResources()
Definition: VulkanPipeline.h:165
std::optional< Error > bindImageIfUsed(GpuResource *pImageResourceToBind, std::string_view sShaderResourceName, VkDescriptorType descriptorType, VkImageLayout imageLayout, VkSampler pSampler)
Definition: VulkanPipeline.cpp:164
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:297
std::optional< Error > bindFrameDataDescriptors()
Definition: VulkanPipeline.cpp:1038
std::optional< Error > generateComputePipelineForShader(const std::string &sComputeShaderName)
Definition: VulkanPipeline.cpp:405
std::optional< Error > bindBuffersIfUsed(const std::array< GpuResource *, FrameResourceManager::getFrameResourceCount()> &vResources, const std::string &sShaderResourceName, VkDescriptorType descriptorType)
Definition: VulkanPipeline.cpp:99
static std::variant< std::shared_ptr< VulkanPipeline >, Error > createComputePipeline(Renderer *pRenderer, PipelineManager *pPipelineManager, const std::string &sComputeShaderName)
Definition: VulkanPipeline.cpp:83
virtual std::optional< Error > restoreInternalResources() override
Definition: VulkanPipeline.cpp:283
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