NAP
Public Attributes | List of all members
ComputeComponent Class Reference

#include <computecomponent.h>

Public Attributes

ComputeMaterialInstanceResource mComputeMaterialInstanceResource
 Property: 'ComputeMaterialInstance' The compute material instance resource. More...
 
uint mInvocations = 1
 Property: 'Invocations' The number of compute shader invocations per dispatch. More...
 
bool mEnabled = true
 Property: 'Enabled' if this component is enabled for computation. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Public Member Functions inherited from Component
virtual void getDependentComponents (std::vector< rtti::TypeInfo > &components) const
 
virtual const rtti::TypeInfo getInstanceType () const =0
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 
- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Resource part of Compute Component

The compute component represents a general-purpose computation that mutates one or more storage buffers. Internally, a ComputeComponentInstance manages a ComputeMaterialInstance and caches the desired invocation count for repeated use.

ComputeComponentInstance::compute() dispatches the compute shader with the given compute command buffer. Multiple compute calls may be stacked and are implicitly synchronized by the resource usage and access types bound to the compute material's descriptor sets.

This component can only be used when 'Compute' is available and enabled in the RenderService, otherwise initialization fails. To enable Compute, make sure 'Compute' is marked under the 'RequiredQueues' in the RenderServiceConfiguration.

Inheritance diagram for ComputeComponent:
[legend]
Collaboration diagram for ComputeComponent:
[legend]

Member Data Documentation

◆ mComputeMaterialInstanceResource

ComputeMaterialInstanceResource mComputeMaterialInstanceResource

Property: 'ComputeMaterialInstance' The compute material instance resource.

◆ mEnabled

bool mEnabled = true

Property: 'Enabled' if this component is enabled for computation.

◆ mInvocations

uint mInvocations = 1

Property: 'Invocations' The number of compute shader invocations per dispatch.