CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RendererComputePipeline Class Reference

A renderer compute pipeline. More...

#include <CeresEngine/Renderer/Resources/RendererComputePipeline.hpp>

Inheritance diagram for CeresEngine::RendererComputePipeline:
CeresEngine::RefCounted< RendererComputePipeline >

Public Member Functions

 RendererComputePipeline (RendererComputePipelineManager &manager, StringView name, const RendererShaderPtr &shader, const GPUPipelineLayoutPtr &pipelineLayout=nullptr)
 Creates a new renderer compute pipeline instance.
 
 ~RendererComputePipeline ()
 
GPUComputePipelinePtr getPipeline (const RendererComputePipelineSpecialization &specialization) const
 Gets the compiled compute pipeline program for the given parameters.
 
GPUComputePipelinePtr getPipeline (RendererShaderSpecialization shaderSpecialization=RendererShaderSpecialization()) const
 Gets the compiled compute pipeline program for the given parameters.
 
const StringgetName () const noexcept
 A human-readable name to use on the pipeline.
 
const GPUPipelineLayoutPtrgetPipelineLayout () const noexcept
 Pointer to an optional pipeline layout for the compute pipeline.
 
const RendererShaderPtrgetShader () const noexcept
 The shader to be used when creating new GPU Compute Pipeline instances.
 
- Public Member Functions inherited from CeresEngine::RefCounted< RendererComputePipeline >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

Private Attributes

RendererComputePipelineManagermManager
 The renderer compute pipeline manager that owns this compute pipeline object.
 
String mName
 A human-readable name to use on the pipeline.
 
RendererShaderPtr mShader
 The shader to be used when creating new GPU Compute Pipeline instances.
 
GPUPipelineLayoutPtr mPipelineLayout = nullptr
 Pointer to an optional pipeline layout for the compute pipeline.
 
HashMap< UInt64, GPUComputePipelinePtrmPipelines
 The compute pipeline programs, indexed by their parameters hash.
 

Friends

class RendererComputePipelineManager
 

Detailed Description

A renderer compute pipeline.

This is similar to a GPUComputePipeline but is managed by the renderer and allows mutation of certain parameters on runtime with automatic specialization by the renderer.

Constructor & Destructor Documentation

◆ RendererComputePipeline()

CeresEngine::RendererComputePipeline::RendererComputePipeline ( RendererComputePipelineManager manager,
StringView  name,
const RendererShaderPtr shader,
const GPUPipelineLayoutPtr pipelineLayout = nullptr 
)
explicit

Creates a new renderer compute pipeline instance.

Parameters
managerThe manager that owns this pipeline object.
nameA human-readable name to use on the pipeline.\
shaderThe shader program that should be used when specializing the compute pipeline.
pipelineLayoutThe pipeline layout object. If empty, one will be deduced from the shader and render pass.

◆ ~RendererComputePipeline()

CeresEngine::RendererComputePipeline::~RendererComputePipeline ( )

Member Function Documentation

◆ getName()

const String & CeresEngine::RendererComputePipeline::getName ( ) const
inlinenoexcept

A human-readable name to use on the pipeline.

◆ getPipeline() [1/2]

GPUComputePipelinePtr CeresEngine::RendererComputePipeline::getPipeline ( const RendererComputePipelineSpecialization specialization) const

Gets the compiled compute pipeline program for the given parameters.

Parameters
specializationThe pipeline specialization parameters.

◆ getPipeline() [2/2]

GPUComputePipelinePtr CeresEngine::RendererComputePipeline::getPipeline ( RendererShaderSpecialization  shaderSpecialization = RendererShaderSpecialization()) const
inline

Gets the compiled compute pipeline program for the given parameters.

Parameters
shaderSpecializationA description of the shader specialization to use.

◆ getPipelineLayout()

const GPUPipelineLayoutPtr & CeresEngine::RendererComputePipeline::getPipelineLayout ( ) const
inlinenoexcept

Pointer to an optional pipeline layout for the compute pipeline.

By default null.

◆ getShader()

const RendererShaderPtr & CeresEngine::RendererComputePipeline::getShader ( ) const
inlinenoexcept

The shader to be used when creating new GPU Compute Pipeline instances.

Friends And Related Symbol Documentation

◆ RendererComputePipelineManager

Member Data Documentation

◆ mManager

RendererComputePipelineManager& CeresEngine::RendererComputePipeline::mManager
private

The renderer compute pipeline manager that owns this compute pipeline object.

◆ mName

String CeresEngine::RendererComputePipeline::mName
private

A human-readable name to use on the pipeline.

◆ mPipelineLayout

GPUPipelineLayoutPtr CeresEngine::RendererComputePipeline::mPipelineLayout = nullptr
private

Pointer to an optional pipeline layout for the compute pipeline.

By default null.

◆ mPipelines

HashMap<UInt64, GPUComputePipelinePtr> CeresEngine::RendererComputePipeline::mPipelines
mutableprivate

The compute pipeline programs, indexed by their parameters hash.

◆ mShader

RendererShaderPtr CeresEngine::RendererComputePipeline::mShader
private

The shader to be used when creating new GPU Compute Pipeline instances.


The documentation for this class was generated from the following file: