#include <ShaderPlatformInterface.h>
Inherited by AZ::DX12::ShaderPlatformInterface, AZ::Metal::ShaderPlatformInterface, AZ::Null::ShaderPlatformInterface, and AZ::Vulkan::ShaderPlatformInterface.
Classes | |
struct | ByProducts |
struct | RootConstantsInfo |
struct | ShaderResourceGroupInfo |
struct | StageDescriptor |
Struct used to return data when compiling the AZSL shader to the appropriate platform. More... | |
Public Types | |
using | ShaderResourceGroupInfoList = AZStd::fixed_vector< ShaderResourceGroupInfo, RHI::Limits::Pipeline::ShaderResourceGroupCountMax > |
Public Member Functions | |
ShaderPlatformInterface (uint32_t apiUniqueIndex) | |
@apiUniqueIndex See GetApiUniqueIndex() for details. | |
virtual RHI::APIType | GetAPIType () const =0 |
Returns the RHI API Type that this ShaderPlatformInterface supports. | |
virtual AZ::Name | GetAPIName () const =0 |
Returns the RHI API Name that this ShaderPlatformInterface supports. | |
virtual RHI::Ptr< RHI::PipelineLayoutDescriptor > | CreatePipelineLayoutDescriptor ()=0 |
Creates the platform specific pipeline layout descriptor. | |
virtual RHI::Ptr< RHI::ShaderStageFunction > | CreateShaderStageFunction (const StageDescriptor &stageDescriptor)=0 |
virtual bool | IsShaderStageForRaster (ShaderHardwareStage shaderStageType) const =0 |
virtual bool | IsShaderStageForCompute (ShaderHardwareStage shaderStageType) const =0 |
virtual bool | IsShaderStageForRayTracing (ShaderHardwareStage shaderStageType) const =0 |
virtual bool | BuildHasDebugInfo (const RHI::ShaderBuildArguments &shaderBuildArguments) const |
Query whether the shaders are set to build with debug information. | |
virtual const char * | GetAzslHeader (const AssetBuilderSDK::PlatformInfo &platform) const =0 |
Get the filename of include file to prefix shader programs with. | |
virtual bool | BuildPipelineLayoutDescriptor (RHI::Ptr< RHI::PipelineLayoutDescriptor > pipelineLayoutDescriptor, const ShaderResourceGroupInfoList &srgInfoList, const RootConstantsInfo &rootConstantsInfo, const RHI::ShaderBuildArguments &shaderBuildArguments)=0 |
virtual bool | VariantCompilationRequiresSrgLayoutData () const |
uint32_t | GetAPIUniqueIndex () const |
This class provides a platform agnostic interface for the creation and manipulation of platform shader objects. WARNING: The ShaderPlatformInterface objects are singletons and will be used to process multiple shader compilation jobs. Do not store per-job configuration data in any ShaderPlatformInterface classes, as it may get stomped. Instead, pass any per-job configuration on the call stack.
|
pure virtual |
Builds additional platform specific data to the pipeline layout descriptor. Will be called before CompilePlatformInternal().
|
pure virtual |
Creates the platform specific pipeline layout descriptor.
Implemented in AZ::DX12::ShaderPlatformInterface, AZ::Metal::ShaderPlatformInterface, AZ::Null::ShaderPlatformInterface, and AZ::Vulkan::ShaderPlatformInterface.
|
pure virtual |
Returns the RHI API Name that this ShaderPlatformInterface supports.
Implemented in AZ::DX12::ShaderPlatformInterface, AZ::Metal::ShaderPlatformInterface, AZ::Null::ShaderPlatformInterface, and AZ::Vulkan::ShaderPlatformInterface.
|
pure virtual |
Returns the RHI API Type that this ShaderPlatformInterface supports.
Implemented in AZ::DX12::ShaderPlatformInterface, AZ::Metal::ShaderPlatformInterface, AZ::Null::ShaderPlatformInterface, and AZ::Vulkan::ShaderPlatformInterface.
|
inline |
See AZ::RHI::Factory::GetAPIUniqueIndex() for details. See AZ::RHI::Limits::APIType::PerPlatformApiUniqueIndexMax.
|
pure virtual |
Get the filename of include file to prefix shader programs with.
Implemented in AZ::DX12::ShaderPlatformInterface, AZ::Metal::ShaderPlatformInterface, AZ::Null::ShaderPlatformInterface, and AZ::Vulkan::ShaderPlatformInterface.
|
inlinevirtual |
In general, shader compilation doesn't require SRG Layout data, but RHIs like Metal don't do well if unused resources (descriptors) are not bound. If this function returns TRUE the ShaderVariantAssetBuilder will invoke BuildPipelineLayoutDescriptor() so the RHI gets the chance to build SRG Layout data which will be useful when compiling MetalISL to Metal byte code.
Reimplemented in AZ::Metal::ShaderPlatformInterface.