Navigation
API > API/Runtime > API/Runtime/Engine
Inheritance Hierarchy
- TShaderMap
- FDeferredCleanupInterface
- FMaterialShaderMap
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/MaterialShared.h |
| Include | #include "MaterialShared.h" |
Syntax
class FMaterialShaderMap :
public TShaderMap< FMaterialShaderMapContent, FShaderMapPointerTable >,
public FDeferredCleanupInterface
Remarks
The set of material shaders for a single material.
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| uint32 | AcquireCompilingId
(
const TRefCountPtr< FSharedShaderCompilerEnvironment >& InMaterialEnvironment |
||
| FMaterialShaderMap * | |||
| FMeshMaterialShaderMap * | AcquireMeshShaderMap
(
const FVertexFactoryType* VertexFactoryType |
||
| FMeshMaterialShaderMap * | AcquireMeshShaderMap
(
const FHashedName& VertexFactoryTypeName |
||
| void | AddCompilingDependency
(
FMaterial* Material |
||
| void | AddRef () |
Reference counting. | |
| TArray< uint8 > * | Backs up any FShaders in this shader map to memory through serialization and clears FShader references. | ||
| TSharedRef< FAsyncLoadContext > | BeginLoadFromDerivedDataCache
(
const FMaterial* Material, |
Begin an attempts to load the shader map for the given material from the Derived Data Cache. | |
| FPSOPrecacheRequestResultArray | CollectPSOs
(
const FMaterialPSOPrecacheParams& PrecacheParams |
Collect all possible PSO's which can be used with this material shader map for given parameters - PSOs will be async precached | |
| void | Compile
(
FMaterial* Material, |
Compiles the shaders for a material and caches them in this shader map. | |
| bool | |||
| void | CountNumShaders
(
int32& NumShaders, |
||
| void | DumpDebugInfo
(
FOutputDevice& OutputDevice |
||
| FMaterialShaderMap * | FindCompilingShaderMap
(
uint32 CompilingId |
||
| TRefCountPtr< FMaterialShaderMap > | FindId
(
const FMaterialShaderMapId& ShaderMapId, |
Finds the shader map for a material. Finds the shader map for a material. | |
| void | GetAllOutdatedTypes
(
TArray< const FShaderType* >& OutdatedShaderTypes, |
Gets outdated types from all loaded material shader maps | |
| uint32 | |||
| const TCHAR * | |||
| TStaticArray< uint16,(int) ELWCFunctionKind::Max > | |||
| void | GetEstimatedNumTextureSamples
(
uint32& VSSamples, |
||
| uint32 | |||
| FMaterialShaderMap * | |||
| const TCHAR * | |||
| const TCHAR * | |||
| uint32 | GetMaxNumInstructionsForShader
(
FShaderType* ShaderType |
||
| uint32 | Returns the maximum number of texture samplers used by any shader in this shader map. | ||
| const FMeshMaterialShaderMap * | GetMeshShaderMap
(
const FVertexFactoryType* VertexFactoryType |
Accessors. | |
| const FMeshMaterialShaderMap * | GetMeshShaderMap
(
const FHashedName& VertexFactoryTypeName |
||
| int32 | GetNumRefs () |
||
| uint32 | |||
| uint32 | |||
| uint32 | |||
| void | GetOutdatedTypes
(
TArray< const FShaderType* >& OutdatedShaderTypes, |
||
| const TRefCountPtr< FSharedShaderCompilerEnvironment > & | |||
| int32 | GetRefCount () |
||
| uint8 | |||
| TShaderRef< ShaderType > | GetShader
(
const typename ShaderType::FPermutationDomain& PermutationVector |
||
| TShaderRef< FShader > | GetShader
(
FShaderType* ShaderType, |
||
| TShaderRef< ShaderType > | GetShader
(
int32 PermutationId |
||
| const FSHAHash & | |||
| void | GetShaderList
(
TMap< FShaderId, TShaderRef< FShader >>& OutShaders |
Builds a list of the shaders in a shader map. | |
| void | GetShaderList
(
TMap< FHashedName, TShaderRef< FShader >>& OutShaders |
Builds a list of the shaders in a shader map. Key is FShaderType::TypeName | |
| const FMaterialShaderMapId & | |||
| uint32 | GetShaderNum () |
Number of Shaders in Shadermap | |
| void | GetShaderPipelineList
(
TArray< FShaderPipelineRef >& OutShaderPipelines |
Builds a list of the shader pipelines in a shader map. | |
| const FMemoryImageString * | GetShaderSource
(
const FVertexFactoryType* VertexFactoryType, |
||
| uint8 | |||
| const FStrataMaterialCompilationOutput & | |||
| uint8 | |||
| uint8 | |||
| bool | |||
| const FRHIUniformBufferLayout * | |||
| const FUniformExpressionSet & | |||
| void | InitalizeForODSC
(
EShaderPlatform TargetShaderPlatform, |
||
| bool | |||
| bool | IsComplete
(
const FMaterial* Material, |
Checks whether the material shader map is missing any shader types necessary for the given material. | |
| bool | IsValidForRendering
(
bool bFailOnInvalid |
||
| void | LoadForRemoteRecompile
(
FArchive& Ar, |
||
| void | LoadFromDerivedDataCache
(
const FMaterial* Material, |
Attempts to load the shader map for the given material from the Derived Data Cache. | |
| void | LoadMissingShadersFromMemory
(
const FMaterial* Material |
Attempts to load missing shaders from memory. | |
| bool | |||
| bool | NeedsGBuffer () |
||
| bool | |||
| void | ProcessCompilationResults
(
const TArray< TRefCountPtr< FShaderCommonCompileJob >>& ICompilationResults, |
Sorts the incoming compiled jobs into the appropriate mesh shader maps | |
| void | Register
(
EShaderPlatform InShaderPlatform |
Registers a material shader map in the global map so it can be used by materials. | |
| void | Release () |
||
| void | |||
| void | RemoveCompilingDependency
(
FMaterial* Material |
||
| bool | |||
| void | RestoreShadersFromMemory
(
const TArray< uint8 >& ShaderData |
Recreates FShaders from the passed in memory, handling shader key changes. | |
| void | SaveForRemoteRecompile
(
FArchive& Ar, |
Serializes a shader map to an archive (used with recompiling shaders for a remote console) | |
| void | SaveShaderStableKeys
(
EShaderPlatform TargetShaderPlatform, |
||
| void | Saves this shader map to the derived data cache. | ||
| bool | Serializes the shader map. | ||
| void | SetCompiledSuccessfully
(
bool bSuccess |
||
| int32 | SubmitCompileJobs
(
uint32 CompilingShaderMapId, |
Submits compile jobs for this shadermap, returns number of jobs submitted. | |
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | UsesPathTracingBufferTexture
(
uint32 TexId |
||
| bool | |||
| bool | |||
| bool | UsesSceneTexture
(
uint32 TexId |
||
| bool | |||
| bool |
Overridden from FShaderMapBase
| Type | Name | Description | |
|---|---|---|---|
| void |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FAsyncLoadContext | A context returned by BeginLoadFromDerivedDataCache that can be queried to know the state of the async request. |
Typedefs
| Name | Description |
|---|---|
| Super |
Constants
| Name | Description |
|---|---|
| AllMaterialShaderMaps | All material shader maps in memory. |
| AllMaterialShaderMapsGuard | Guards access to AllMaterialShaderMaps, which can be written to from an async loading thread. |
| GIdToMaterialShaderMap | A global map from a material's static parameter set to any shader map cached for that material. |
| GIdToMaterialShaderMapCS |