ezEngine Release 25.08
Loading...
Searching...
No Matches
ezGALShader Class Referenceabstract
Inheritance diagram for ezGALShader:

Public Member Functions

virtual void SetDebugName (ezStringView sName) const =0
 
EZ_ALWAYS_INLINE ezUInt32 GetBindGroupCount () const
 Returns the number of bind groups in the shader. Every bind group must be bound for the shader to be used.
 
EZ_ALWAYS_INLINE ezGALBindGroupLayoutHandle GetBindGroupLayout (ezUInt32 uiBindGroup=0) const
 Returns the layout of the given bind group.
 
EZ_ALWAYS_INLINE ezGALPipelineLayoutHandle GetPipelineLayout () const
 Returns the pipeline layout for this shader. I.e. the umbrella of all bind group layouts. This can be used to e.g. sort draw calls by to reduce state changes.
 
ezArrayPtr< const ezShaderResourceBindingGetBindings (ezUInt32 uiBindGroup=0) const
 Convenience function that returns ezGALBindGroupLayoutCreationDescription::m_ResourceBindings of the given bind group layout.
 
ezArrayPtr< const ezShaderVertexInputAttributeGetVertexInputAttributes () const
 Returns the list of vertex input attributes. Compute shaders return an empty array.
 
- Public Member Functions inherited from ezGALObject< ezGALShaderCreationDescription >
 ezGALObject (const ezGALShaderCreationDescription &description)
 
EZ_ALWAYS_INLINE const ezGALShaderCreationDescriptionGetDescription () const
 
- Public Member Functions inherited from ezRefCounted
virtual ~ezRefCounted ()=default
 Adds a virtual destructor.
 
- Public Member Functions inherited from ezRefCountingImpl
 ezRefCountingImpl ()=default
 Constructor.
 
 ezRefCountingImpl (const ezRefCountingImpl &rhs)
 
void operator= (const ezRefCountingImpl &rhs)
 
ezInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
 
ezInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.
 
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
 
ezInt32 GetRefCount () const
 Returns the current reference count.
 

Protected Member Functions

virtual ezResult InitPlatform (ezGALDevice *pDevice)=0
 
virtual ezResult DeInitPlatform (ezGALDevice *pDevice)=0
 
ezResult CreateBindingMapping (bool bAllowMultipleBindingPerName)
 
void DestroyBindingMapping ()
 
ezResult CreateLayouts (ezGALDevice *pDevice, bool bSupportsImmutableSamplers)
 
void DestroyLayouts (ezGALDevice *pDevice)
 
 ezGALShader (const ezGALShaderCreationDescription &Description)
 

Protected Attributes

ezGALDevicem_pDevice = nullptr
 
ezDynamicArray< ezShaderResourceBindingm_BindingMapping
 
ezHybridArray< ezGALBindGroupLayoutHandle, EZ_GAL_MAX_BIND_GROUPS > m_BindGroupLayouts
 
ezGALPipelineLayoutHandle m_hPipelineLayout
 
- Protected Attributes inherited from ezGALObject< ezGALShaderCreationDescription >
const ezGALShaderCreationDescription m_Description
 

Friends

class ezGALDevice
 

Member Function Documentation

◆ GetBindGroupLayout()

EZ_ALWAYS_INLINE ezGALBindGroupLayoutHandle ezGALShader::GetBindGroupLayout ( ezUInt32  uiBindGroup = 0) const
inline

Returns the layout of the given bind group.

Parameters
uiBindGroupMust be less than GetBindGroupCount.

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