20#ifndef RHI_GAL_PIPELINES_H
21#define RHI_GAL_PIPELINES_H
139 bool aNegativeBlend =
false,
140 bool aHasInstanceBinding =
true,
141 bool aSingleCoverage =
false,
142 bool aKnockoutMark =
false,
143 bool aSquareAlpha =
false,
144 bool aPremultiplied =
false );
146 const ShaderPair& aShaders,
bool aBlendEnabled,
147 const std::vector<RHI_BIND_GROUP_LAYOUT_DESC>& aBindGroupLayouts = {},
148 bool aPremultipliedAlpha =
false,
149 bool aRenderPassHasDepthStencil =
false,
150 bool aSquareAlpha = false );
Creates, uses and destroys GPU resources through one graphics API backend.
RHI_BindGroupLayoutHandle m_differenceLayout
bool IsInitialized() const
RHI_PipelineHandle GetShapePipeline(KIGFX::RHI_SHAPE aShape, KIGFX::LAYER_DRAW_MODE aMode) const
The pipeline drawing a shape in a draw mode.
RHI_BindGroupLayoutHandle GetFullscreenUBOLayout() const
bool Initialize()
Create all shader modules and pipeline objects.
ShaderPair loadShaderPair(const RHI_SHADER_BLOB &aVert, const RHI_SHADER_BLOB &aFrag)
RHI_BindGroupLayoutHandle m_textureSamplerLayout
RHI_BindGroupLayoutHandle m_fullscreenUBOLayout
RHI_PipelineHandle m_compositorPipeline
RHI_GAL_PIPELINES(RHI_DEVICE &aDevice)
RHI_BindGroupLayoutHandle GetDifferenceLayout() const
RHI_BindGroupLayoutHandle GetFrameUBOLayout() const
std::vector< std::pair< RHI_PipelineHandle, RHI_PipelineHandle > > m_premultipliedVariants
RHI_PipelineHandle GetWireOncePipeline() const
RHI_BindGroupLayoutHandle m_frameUBOLayout
RHI_PipelineHandle m_gridPipeline
RHI_PipelineHandle m_bitmapPipeline
std::vector< ShaderPair > m_shaderPairs
Shader modules kept alive for the lifetime of the pipelines.
RHI_GAL_PIPELINES & operator=(const RHI_GAL_PIPELINES &)=delete
RHI_PipelineHandle GetCursorCompositePipeline() const
The cursor drawn straight into the composite, whose target has no depth.
RHI_PipelineHandle GetGridPipeline() const
RHI_GAL_PIPELINES(const RHI_GAL_PIPELINES &)=delete
RHI_BindGroupLayoutHandle GetGlyphLayout() const
The bind group layout of the font atlas and glyph table the track pipelines read at set 1.
RHI_PipelineHandle GetBitmapPipeline() const
RHI_PipelineHandle GetPremultipliedVariant(RHI_PipelineHandle aPipeline) const
The variant of a pipeline for a cached layer that the legacy canvas draws on its overlay.
static constexpr int DRAW_MODES
void Destroy()
Release all GPU resources.
RHI_BIND_GROUP_LAYOUT_DESC m_glyphLayoutDesc
RHI_PipelineHandle GetInlineCompositorPipeline() const
std::vector< RHI_PipelineHandle > m_glyphPipelines
RHI_BIND_GROUP_LAYOUT_DESC m_frameUBOLayoutDesc
RHI_PipelineHandle GetOverlayVariant(RHI_PipelineHandle aPipeline) const
The variant of a pipeline for content drawn into the overlay target.
RHI_PipelineHandle GetCompositorPipeline() const
RHI_BindGroupLayoutHandle m_glyphLayout
RHI_BindGroupLayoutHandle GetTextureSamplerLayout() const
std::array< std::array< RHI_PipelineHandle, DRAW_MODES >, KIGFX::RHI_SHAPES > m_shapePipelines
RHI_PipelineHandle GetWirePipeline() const
RHI_PipelineHandle m_wirePipeline
RHI_PipelineHandle GetDifferencePipeline() const
Replaces a target's colour with its difference from a diff layer, see LAYER_RANGE::difference.
RHI_PipelineHandle m_differencePipeline
bool UsesGlyphAtlas(RHI_PipelineHandle aPipeline) const
True for a pipeline that expects the glyph bind group at set 1.
RHI_PipelineHandle createInstancedPipeline(const ShaderPair &aShaders, bool aNegativeBlend=false, bool aHasInstanceBinding=true, bool aSingleCoverage=false, bool aKnockoutMark=false, bool aSquareAlpha=false, bool aPremultiplied=false)
Build a pipeline reading RHI_VERTEX from slot 0 and, with aHasInstanceBinding, RHI_INSTANCE from slot...
RHI_PipelineHandle m_inlineCompositorPipeline
RHI_PipelineHandle createFullscreenPipeline(const ShaderPair &aShaders, bool aBlendEnabled, const std::vector< RHI_BIND_GROUP_LAYOUT_DESC > &aBindGroupLayouts={}, bool aPremultipliedAlpha=false, bool aRenderPassHasDepthStencil=false, bool aSquareAlpha=false)
RHI_PipelineHandle m_wireOncePipeline
std::vector< std::pair< RHI_PipelineHandle, RHI_PipelineHandle > > m_overlayVariants
Each pipeline that has an overlay variant, paired with it.
RHI_PipelineHandle m_cursorCompositePipeline
RHI_SHAPE
Shapes a frame draws, each with its own array and pipelines.
@ MARK
write depth only, so the layer's later draws stay out of these pixels
RHI_HANDLE< RHI_TAG_PIPELINE > RHI_PipelineHandle
RHI_HANDLE< RHI_TAG_BIND_GROUP_LAYOUT > RHI_BindGroupLayoutHandle
RHI_HANDLE< RHI_TAG_SHADER > RHI_ShaderHandle
One shader stage as GenerateShaderHeader.cmake embeds it.