40 for (
auto edge : edges)
59 ret->addLayout(layout.first,layout.second);
64 ret->addUniform(uniform.second);
78 ret->addUniform(layout.second);
189 boost::hash_combine(
hash, tex.first);
190 boost::hash_combine(
hash, tex.second);
194 boost::hash_combine(
hash, samp.first);
195 boost::hash_combine(
hash, samp.second);
199 boost::hash_combine(
hash, uni.first);
200 boost::hash_combine(
hash, uni.second);
209 auto hash = state.
hash();
215 auto passResource = creator(state);
224 auto hash = state.
hash();
230 auto pipeline = creator(state);
241 FCT::ShaderStages usage;
283 ret->addTexture( tex.second,
m_resourceLayout.findTexture(tex.first.c_str()));
286 ret->addSampler(samp.second,
m_resourceLayout.findSampler(samp.first.c_str()));
289 ret->addConstBuffer(uni.second);
300 auto ret =
m_ctx->createTraditionPipeline();
304 ret->vertexLayout(layout.second);
std::map< std::string, FCT::ConstLayout > m_uniformLayouts
void bindVertexShader(FCT::VertexShader *shader)
void bindUniform(const Uniform &uniform)
std::unordered_map< std::string, const char * > m_textureNames
void setFixedImage(std::string name, FCT::Image *image)
void bindPixelShader(FCT::PixelShader *shader)
void processUnhandledTextureSlots()
FCT::ResourceLayout m_pixelResourceLayout
void attachPass(FCT::RenderGraph *graph, std::string passName)
void bindSampler(std::string name, FCT::Sampler *sampler)
uint32_t m_nextAvailableIndex
uint32_t findNextAvailableIndex()
void bindTexture(std::string name, FCT::Image *image)
FCT::ResourceLayout m_vertexResourceLayout
std::unordered_map< std::string, FCT::Image * > m_fixedImages
void addTextureSlot(FCT::TextureElement element)
TraditionPipelineState m_pipelineState
FCT::ResourceLayout m_resourceLayout
std::map< uint32_t, FCT::VertexLayout > m_vertexLayouts
FCT::RHI::RasterizationPipeline * getCurrentPipeline()
PassResourceState m_passResourceState
PassResourceCache m_passResourceCache
FCT::PixelLayout m_pixelLayout
PipelineCache m_pipelineCache
void ctx(FCT::Context *ctx)
FCT::PixelShader * allocatePixelShader(std::string code)
Uniform allocateUniform(std::string name)
FCT::VertexShader * allocateVertexShader(std::string code)
FCT::PassResource * getCurrentPassResource()
std::vector< TextureSlot > m_unhandledTextureSlots
std::vector< TextureEdge * > getTextureEdges(const std::string &passName) const
RHI::Pass * getPass(const std::string &name) const
Image * getImage(const std::string &name) const
constexpr ShaderStages getShaderStages() const noexcept
FCT::PixelShader PixelShader
FCT::VertexShader VertexShader
FCT::ShaderStages getAllAfterTheStage(FCT::ShaderStage stages)
FCT::PassResource * get(const PassResourceState &state, const std::function< FCT::PassResource *(const PassResourceState &state)> &creator)
std::unordered_map< size_t, FCT::PassResource * > m_passResources
std::unordered_map< std::string, FCT::RHI::ConstBuffer * > boundUniforms
void bindUniform(const std::string &name, const Uniform &uniform)
void bindTexture(const std::string &name, FCT::Image *image)
std::unordered_map< std::string, FCT::Image * > boundTextures
std::unordered_map< std::string, FCT::Sampler * > boundSamplers
void bindSampler(const std::string &name, FCT::Sampler *sampler)
std::unordered_map< size_t, FCT::RHI::RasterizationPipeline * > m_pipelines
FCT::RHI::RasterizationPipeline * get(const TraditionPipelineState &state, const std::function< FCT::RHI::RasterizationPipeline *(const TraditionPipelineState &state)> &creator)
FCT::DepthStencilState * depthStencilState
FCT::BlendState * blendState
FCT::PixelShader * pixelShader
FCT::RasterizationState * rasterizationState
bool operator==(const TraditionPipelineState &other) const
FCT::VertexShader * vertexShader