Navigation
API > API/Runtime > API/Runtime/RenderCore
| Name | FShaderMapResource |
| Type | class |
| Header File | /Engine/Source/Runtime/RenderCore/Public/Shader.h |
| Include Path | #include "Shader.h" |
Syntax
class FShaderMapResource :
public FRenderResource ,
public FDeferredCleanupInterface
Inheritance Hierarchy
- FDeferredCleanupInterface → FShaderMapResource
- FRenderResource → FShaderMapResource
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FShaderMapResource
(
EShaderPlatform InPlatform, |
Shader.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FShaderMapResource() |
Shader.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAtLeastOneRHIShaderCreated | uint32 | Whether we have at least one RHI shader created. | Shader.h | |
| NumRefs | std::atomic< int32 > | The number of references to this shader map. | Shader.h | |
| NumRHIShaders | uint32 | Since the shaders are no longer a TArray, this is their count (the size of the RHIShaders array). | Shader.h | |
| Platform | EShaderPlatform | Shader.h | ||
| RHIShaders | TUniquePtr< std::atomic< FRHIShader * >[]> | An array of shader pointers (refcount is managed manually). | Shader.h | |
| RHIShadersCreationGuard | FCriticalSection | This lock is to prevent two threads creating the same RHIShaders element. | Shader.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddRef() |
Shader.h | ||
void BeginCreateAllShaders() |
Shader.h | ||
bool ContainsAtLeastOneRHIShaderCreated() |
Shader.h | ||
virtual int32 GetGroupIndexForShader
(
int32 ShaderIndex |
Shader.h | ||
virtual int32 GetLibraryId() |
Shader.h | ||
virtual int32 GetLibraryShaderIndex
(
int32 ShaderIndex |
Shader.h | ||
int32 GetNumRefs() |
Shader.h | ||
int32 GetNumShaders() |
Shader.h | ||
EShaderPlatform GetPlatform() |
Shader.h | ||
FRHIShader * GetShader
(
int32 ShaderIndex, |
Shader.h | ||
FSHAHash GetShaderHash
(
int32 ShaderIndex |
Return shader hash for a particular shader without creating it. | Shader.h | |
virtual uint32 GetShaderSizeBytes
(
int32 ShaderIndex |
Shader.h | ||
uint32 GetSizeBytes() |
Shader.h | ||
bool HasShader
(
int32 ShaderIndex |
Shader.h | ||
bool IsValidShaderIndex
(
int32 ShaderIndex |
Shader.h | ||
virtual void PreloadShader
(
int32 ShaderIndex, |
Shader.h | ||
virtual void PreloadShaderMap
(
FGraphEventArray& OutCompletionEvents |
Shader.h | ||
void Release() |
Shader.h |
Overridden from FRenderResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseRHI () |
Releases the RHI resources used by this resource. | Shader.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FRHIShader * CreateRHIShaderOrCrash
(
int32 ShaderIndex, |
Creates RHI shader, with a reference (so the caller can release). | Shader.h | |
SIZE_T GetAllocatedSize() |
Shader.h | ||
virtual void ReleasePreloadedShaderCode
(
int32 ShaderIndex |
Signal the shader library that it can release compressed shader code for a shader that it keeps preloaded in memory. | Shader.h | |
void ReleaseShaders() |
Shader.h | ||
virtual bool TryRelease() |
Shader.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool ArePlatformsCompatible
(
EShaderPlatform CurrentPlatform, |
Shader.h |