5#include <unordered_set>
8#include "shader/general/ShaderUser.h"
9#include "render/general/pipeline/PipelineConfiguration.h"
10#include "render/general/pipeline/PipelineShaderConstantsManager.hpp"
14 class PipelineManager;
16 class ComputeShaderInterface;
52 Pipeline* pPipeline,
const char* pConstantName,
unsigned int iValueToCopy);
78 std::string_view sVertexShaderName,
79 std::string_view sPixelShaderName,
80 std::string_view sComputeShaderName =
"");
178 void setShaderConstants(
const std::unordered_map<std::string, size_t>& uintConstantsOffsets);
267 std::pair<std::mutex, std::unordered_set<ComputeShaderInterface*>>
Definition: ComputeShaderInterface.h:46
Definition: Material.h:63
Definition: PipelineConfiguration.h:24
Definition: PipelineManager.h:98
Definition: PipelineSharedPtr.h:15
Definition: Pipeline.h:20
std::pair< std::mutex, std::optional< ShaderConstantsData > > mtxShaderConstantsData
Definition: Pipeline.h:271
std::pair< std::mutex, std::optional< ShaderConstantsData > > * getShaderConstants()
Definition: Pipeline.cpp:182
void onMaterialUsingPipeline(Material *pMaterial)
Definition: Pipeline.cpp:186
std::string getPipelineIdentifier() const
Definition: Pipeline.cpp:175
std::pair< std::mutex, std::unordered_set< Material * > > mtxMaterialsThatUseThisPipeline
Definition: Pipeline.h:260
const std::unique_ptr< PipelineConfiguration > pPipelineConfiguration
Definition: Pipeline.h:274
virtual std::optional< Error > releaseInternalResources()=0
Renderer *const pRenderer
Definition: Pipeline.h:280
void onMaterialNoLongerUsingPipeline(Material *pMaterial)
Definition: Pipeline.cpp:206
std::variant< size_t, Error > getUintConstantOffset(const std::string &sConstantName)
Definition: Pipeline.cpp:59
virtual std::optional< Error > restoreInternalResources()=0
static std::variant< std::shared_ptr< Pipeline >, Error > createComputePipeline(Renderer *pRenderer, PipelineManager *pPipelineManager, const std::string &sComputeShaderName)
Definition: Pipeline.cpp:138
static std::variant< std::shared_ptr< Pipeline >, Error > createGraphicsPipeline(Renderer *pRenderer, PipelineManager *pPipelineManager, std::unique_ptr< PipelineConfiguration > pPipelineConfiguration)
Definition: Pipeline.cpp:91
std::pair< std::mutex, std::unordered_set< Material * > > * getMaterialsThatUseThisPipeline()
Definition: Pipeline.cpp:87
void setShaderConstants(const std::unordered_map< std::string, size_t > &uintConstantsOffsets)
Definition: Pipeline.cpp:25
PipelineManager *const pPipelineManager
Definition: Pipeline.h:277
const PipelineConfiguration * getConfiguration() const
Definition: Pipeline.cpp:278
void onComputeShaderNoLongerUsingPipeline(ComputeShaderInterface *pComputeShaderInterface)
Definition: Pipeline.cpp:251
Renderer * getRenderer() const
Definition: Pipeline.cpp:276
void onComputeShaderUsingPipeline(ComputeShaderInterface *pComputeShaderInterface)
Definition: Pipeline.cpp:232
static std::string combineShaderNames(std::string_view sVertexShaderName, std::string_view sPixelShaderName, std::string_view sComputeShaderName="")
Definition: Pipeline.cpp:44
std::pair< std::mutex, std::unordered_set< ComputeShaderInterface * > > mtxComputeShadersThatUseThisPipeline
Definition: Pipeline.h:268
Definition: Renderer.h:43
Definition: ShaderUser.h:20
Definition: Pipeline.h:35
void findOffsetAndCopySpecialValueToConstant(Pipeline *pPipeline, const char *pConstantName, unsigned int iValueToCopy)
Definition: Pipeline.cpp:280
std::unordered_map< std::string, size_t > uintConstantsOffsets
Definition: Pipeline.h:61
std::unique_ptr< PipelineShaderConstantsManager > pConstantsManager
Definition: Pipeline.h:55