bSupportsShaderPipelines

bSupportsShaderPipelines

#Overview

name: bSupportsShaderPipelines

The value of this variable can be defined or overridden in .ini config files. 9 .ini config files referencing this setting variable.

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bSupportsShaderPipelines is to indicate whether a specific shader platform supports shader pipelines. This setting is part of the Render Hardware Interface (RHI) subsystem in Unreal Engine 5, which provides an abstraction layer for various graphics APIs.

The RHI module relies on this setting variable to determine if shader pipelines are supported for a given platform. This information is crucial for the rendering system to make decisions about how to compile and organize shaders for different hardware configurations.

The value of this variable is set in two places:

  1. In the SetDefaultValues function of the FGenericDataDrivenShaderPlatformInfo class, where it’s set to true by default.
  2. In the ParseDataDrivenShaderInfo function, where it can be overridden by configuration data.

This variable interacts with other shader platform-specific settings within the FGenericDataDrivenShaderPlatformInfo struct, such as bSupportsClipDistance, bSupportsNNEShaders, and MaxSamplers.

Developers must be aware that this variable is platform-specific and its value may vary depending on the target hardware. It’s used to determine the capabilities of the shader compiler and runtime for a given platform.

Best practices when using this variable include:

  1. Always check its value using the GetSupportsPipelineShaders function rather than accessing it directly.
  2. Consider the implications of shader pipeline support when designing rendering features or optimizations.
  3. Be prepared to provide alternative rendering paths for platforms that don’t support shader pipelines.
  4. When extending the engine or creating custom rendering features, respect this setting to ensure compatibility across different platforms.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:67, section: [ShaderPlatform OPENGL_ES3_1_ANDROID]

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:87, section: [ShaderPlatform VULKAN_ES3_1_ANDROID]

Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:58, section: [ShaderPlatform METAL]

Location: <Workspace>/Engine/Config/IOS/DataDrivenPlatformInfo.ini:83, section: [ShaderPlatform METAL_SIM]

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:134, section: [ShaderPlatform METAL_MACES3_1]

Location: <Workspace>/Engine/Config/TVOS/DataDrivenPlatformInfo.ini:39, section: [ShaderPlatform METAL_TVOS]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:273, section: [ShaderPlatform VULKAN_PCES3_1]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:160, section: [ShaderPlatform PCD3D_ES3_1]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:180, section: [ShaderPlatform OPENGL_PCES3_1]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:147

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::SetDefaultValues

Source code excerpt:

	bSupportsVolumeTextureAtomics = true;
	bSupportsClipDistance = true;
	bSupportsShaderPipelines = true;
	MaxSamplers = 16;
}

void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo(const FConfigSection& Section, uint32 Index)
{
	FGenericDataDrivenShaderPlatformInfo& Info = Infos[Index];

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:290

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	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);
	GET_SECTION_BOOL_HELPER(bSupportsWave64);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:116

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	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);
	uint32 bSupportsWave64 : 1;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:718

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsPipelineShaders

Source code excerpt:

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsPipelineShaders(const FStaticShaderPlatform Platform)
	{
		return Infos[Platform].bSupportsShaderPipelines;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsROV(const FStaticShaderPlatform Platform)
	{
		return Infos[Platform].bSupportsROV;
	}