Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::ShaderStageFunction Class Reference

#include <ShaderStageFunction.h>

Inherits AZStd::intrusive_base.

Inherited by AZ::DX12::ShaderStageFunction, AZ::Metal::ShaderStageFunction, AZ::Null::ShaderStageFunction, and AZ::Vulkan::ShaderStageFunction.

Public Member Functions

 AZ_RTTI (ShaderStageFunction, "{D7D800D1-4A14-4C3F-A7E4-B2645137FAC6}")
 
ShaderStage GetShaderStage () const
 Returns the shader stage associated with this function.
 
HashValue64 GetHash () const
 
ResultCode Finalize ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Protected Member Functions

 ShaderStageFunction (ShaderStage shaderStage)
 
void SetHash (HashValue64 hash)
 

Detailed Description

Contains byte code associated with a specific entry point function of a shader stage. This data is provided to the PipelineStateDescriptor when building a PSO. Certain platforms may utilize function constants to specialize the same central byte code store. Thus, a ShaderStageFunction instance is a child of a ShaderStageLibrary container.

Each platform specializes this data structure with platform-specific data necessary to compile an entry point of a shader stage on a PSO. The platform-independent runtime does not need to care about specifics, the function is merely an opaque data stream passed to the pipeline state descriptor.

Member Function Documentation

◆ Finalize()

ResultCode AZ::RHI::ShaderStageFunction::Finalize ( )

Finalizes and validates the function data. This must be called after manipulating the data manually, prior to serialization or use by the RHI runtime. It is not necessary to call this method on a serialized-in instance.

◆ GetHash()

HashValue64 AZ::RHI::ShaderStageFunction::GetHash ( ) const

Returns the hash computed for this function. Each platform implementation must calculate and store the hash from the platform-specific data.

◆ SetHash()

void AZ::RHI::ShaderStageFunction::SetHash ( HashValue64  hash)
protected

The platform implementation must assign the hash value in the FinalizeInternal method, or the platform independent validation layer will fail with an error.


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