bSupportsNNEShaders
bSupportsNNEShaders
#Overview
name: bSupportsNNEShaders
The value of this variable can be defined or overridden in .ini config files. 6
.ini config files referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bSupportsNNEShaders is to indicate whether a specific shader platform supports NNE (Neural Network Extension) shaders. This variable is part of the Unreal Engine’s rendering system, specifically related to shader capabilities.
This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine. It’s a part of the FGenericDataDrivenShaderPlatformInfo class, which provides information about various shader platform capabilities.
The value of this variable is set during the parsing of data-driven shader information. This occurs in the ParseDataDrivenShaderInfo function within the DataDrivenShaderPlatformInfo.cpp file.
bSupportsNNEShaders interacts with other shader capability flags in the FGenericDataDrivenShaderPlatformInfo class, such as bSupportsSwapchainUAVs, bSupportsClipDistance, and bSupportsShaderPipelines. These flags collectively define the features supported by a specific shader platform.
Developers must be aware that this variable is platform-specific. Its value may differ depending on the target hardware and graphics API. It’s crucial to check this flag before attempting to use NNE shaders in your rendering pipeline.
Best practices when using this variable include:
- Always check the value of bSupportsNNEShaders before implementing NNE shader-related features.
- Use the provided static function GetSupportsNNEShaders() to query this capability, rather than accessing the variable directly.
- Consider providing fallback rendering paths for platforms that don’t support NNE shaders.
- Keep in mind that this is part of a data-driven system, so the values can potentially be configured externally, allowing for more flexibility in supporting different platforms.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:63, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:103, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:136, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:254, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:76, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:136, section: [ShaderPlatform PCD3D_SM6]
- INI Section:
ShaderPlatform PCD3D_SM6
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:289
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bSupportsSwapchainUAVs);
GET_SECTION_BOOL_HELPER(bSupportsClipDistance);
GET_SECTION_BOOL_HELPER(bSupportsNNEShaders);
GET_SECTION_BOOL_HELPER(bSupportsShaderPipelines);
GET_SECTION_BOOL_HELPER(bSupportsUniformBufferObjects);
GET_SECTION_BOOL_HELPER(bRequiresBindfulUtilityShaders);
GET_SECTION_INT_HELPER(MaxSamplers);
GET_SECTION_BOOL_HELPER(SupportsBarycentricsIntrinsics);
GET_SECTION_SUPPORT_HELPER(SupportsBarycentricsSemantic);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:115
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bSupportsSwapchainUAVs : 1;
uint32 bSupportsClipDistance : 1;
uint32 bSupportsNNEShaders: 1;
uint32 bSupportsShaderPipelines : 1;
uint32 bSupportsUniformBufferObjects : 1;
uint32 bRequiresBindfulUtilityShaders : 1;
uint32 MaxSamplers : 8;
uint32 SupportsBarycentricsIntrinsics : 1;
uint32 SupportsBarycentricsSemantic : int32(ERHIFeatureSupport::NumBits);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:755
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsNNEShaders
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsNNEShaders;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsUniformBufferObjects(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsUniformBufferObjects;