Kanzi 4.1.0
kanzi::ComputeEntry Class Reference

Host container for compute shader state. More...

#include <kanzi/core.ui/graphics3d/compute_entry.hpp>

Inheritance diagram for kanzi::ComputeEntry:
[legend]

Public Member Functions

bool bindComputeState (Renderer &renderer)
 Bind the compute state for dispatching.
 
void dispatch (Renderer &renderer, gfx::v3u32 invokeCounts)
 Record a direct compute dispatch command.
 
void dispatch (Renderer &renderer, GPUBuffer &buffer, uint32_t offset)
 Record an indirect compute dispatch command.
 
- Public Member Functions inherited from kanzi::GraphicsEntry
MaterialSharedPtr getMaterial () const
 Gets the associated material.
 
Node3DgetNode () const
 Gets the associated node.
 
RenderPassgetRenderPass ()
 Gets the associated render pass.
 
RenderStategetRenderState ()
 Gets the internal render state.
 
void initializeState (MaterialSharedPtr sharedMaterial)
 Initialize the state of the graphics entry.
 
- Public Member Functions inherited from kanzi::VariableBindingHost
void addAvailableVariableSource (AbstractBindingVariableSource &variableSource)
 Add a variable source to the list of available sources.
 
void addBindingRuntime (AbstractBindingRuntimeSharedPtr bindingRuntime)
 Adds a binding runtime to the list of binding runtimes.
 
void addVariableTarget (VariableBindingTargetRuntime &targetRuntime)
 Adds variable binding target runtime into the variable host.
 
BindingRuntimeIterator beginBindingRuntimes ()
 Gets an iterator to the beginning of binding runtimes.
 
BindingRuntimeConstIterator beginBindingRuntimes () const
 Gets an iterator to the beginning of binding runtimes.
 
BindingRuntimeIterator endBindingRuntimes ()
 Gets an iterator to the end of binding runtimes.
 
BindingRuntimeConstIterator endBindingRuntimes () const
 Gets an iterator to the end of binding runtimes.
 
BindingRuntimeIterator endFixedRuntimes ()
 Gets an iterator to the end of fixed binding runtimes.
 
BindingRuntimeConstIterator endFixedRuntimes () const
 Gets an iterator to the end of fixed binding runtimes.
 
VariableBindingTargetRuntimegetVariableBindingTargetRuntime (AbstractPropertyType propertyType)
 Gets an existing variable binding target runtime based on a property type.
 
void removeAvailableVariableSource (AbstractBindingVariableSource &variableSource)
 Remove a variable source from the list of available sources.
 
void removeBindingRuntime (AbstractBindingRuntime &bindingRuntime)
 Removes a binding runtime.
 
void removeVariableTarget (VariableBindingTargetRuntime &targetRuntime)
 Removes a variable binding target from the variable host.
 
 ~VariableBindingHost ()
 Destructor.
 

Static Public Member Functions

static unique_ptr< ComputeEntrycreate (RenderPass &renderPass, MaterialSharedPtr material)
 Creates a new compute entry.
 

Protected Member Functions

 ComputeEntry (RenderPass &renderPass, MaterialSharedPtr material)
 Constructor.
 
- Protected Member Functions inherited from kanzi::GraphicsEntry
 GraphicsEntry (RenderPass &renderPass, Node3D *node)
 Constructor.
 
void updateBindingsWithFixedUniformInputs ()
 Execute all bindings needing manual execution.
 

Additional Inherited Members

- Public Types inherited from kanzi::VariableBindingHost
using BindingRuntimeConstIterator
 Const iterator for binding runtimes.
 
using BindingRuntimeContainer
 Binding runtime container.
 
using BindingRuntimeIterator
 Iterator for binding runtimes.
 
using BindingTargetMapping
 Binding target mapping.
 
- Protected Attributes inherited from kanzi::GraphicsEntry
Node3Dm_node
 Pointer to source node.
 
RenderPassm_renderPass
 Base render pass.
 
RenderState m_renderState
 Contained render state.
 

Detailed Description

Host container for compute shader state.

Used by ComputeRenderPass when dispatching compute work. Contains the render state, references to associated render pass, and binding runtimes.

Since
Kanzi 4.1.0

Constructor & Destructor Documentation

◆ ComputeEntry()

kanzi::ComputeEntry::ComputeEntry ( RenderPass & renderPass,
MaterialSharedPtr material )
explicitprotected

Constructor.

Parameters
renderPassOwning render pass.
materialMaterial containing the compute shader program.

Member Function Documentation

◆ create()

static unique_ptr< ComputeEntry > kanzi::ComputeEntry::create ( RenderPass & renderPass,
MaterialSharedPtr material )
static

Creates a new compute entry.

Parameters
renderPassOwning render pass.
materialMaterial containing the compute shader program.

◆ bindComputeState()

bool kanzi::ComputeEntry::bindComputeState ( Renderer & renderer)

Bind the compute state for dispatching.

Executes binding runtimes, updates uniforms, and binds render state.

Parameters
rendererRenderer to use.
Returns
True if the state was bound successfully.

◆ dispatch() [1/2]

void kanzi::ComputeEntry::dispatch ( Renderer & renderer,
gfx::v3u32 invokeCounts )

Record a direct compute dispatch command.

Parameters
rendererRenderer to use.
invokeCountsNumber of shader invocations in each dimension.

◆ dispatch() [2/2]

void kanzi::ComputeEntry::dispatch ( Renderer & renderer,
GPUBuffer & buffer,
uint32_t offset )

Record an indirect compute dispatch command.

Parameters
rendererRenderer to use.
bufferGPU buffer containing indirect dispatch parameters.
offsetByte offset into the indirect dispatch buffer.

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