bSupportsMeshShadersTier0

bSupportsMeshShadersTier0

#Overview

name: bSupportsMeshShadersTier0

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

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bSupportsMeshShadersTier0 is to indicate whether a specific shader platform supports Mesh Shaders Tier 0, which is a feature of modern graphics APIs that allows for more efficient geometry processing.

This setting variable is primarily used within the Unreal Engine’s Rendering Hardware Interface (RHI) subsystem. It’s part of the data-driven shader platform information system, which allows for flexible configuration of shader platform capabilities.

The value of this variable is set through the parsing of a configuration section, as seen in the ParseDataDrivenShaderInfo function in DataDrivenShaderPlatformInfo.cpp. It’s loaded from a configuration file, likely an .ini file, allowing for easy modification without recompiling the engine.

This variable interacts closely with bSupportsMeshShadersTier1, which likely indicates support for more advanced mesh shader features. It’s also used alongside other mesh shader-related variables like bSupportsMeshShadersWithClipDistance and MaxMeshShaderThreadGroupSize.

Developers must be aware that this variable is platform-specific. It’s stored in an array indexed by FStaticShaderPlatform, meaning its value can differ across different rendering platforms (e.g., DirectX, Vulkan, etc.).

Best practices when using this variable include:

  1. Always check its value using the provided GetSupportsMeshShadersTier0 function rather than accessing it directly.
  2. Be prepared to provide fallback rendering paths for platforms that don’t support mesh shaders.
  3. When developing new rendering features, consider the implications of this variable being false and design your system to gracefully handle such cases.
  4. If you’re extending the engine’s platform support, ensure you correctly set this variable for new platforms to accurately reflect their capabilities.

#Setting Variables

#References In INI files

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

#References in C++ code

#Callsites

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

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

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bRequiresDisableForwardLocalLights);
	GET_SECTION_BOOL_HELPER(bCompileSignalProcessingPipeline);
	GET_SECTION_BOOL_HELPER(bSupportsMeshShadersTier0);
	GET_SECTION_BOOL_HELPER(bSupportsMeshShadersTier1);
	GET_SECTION_BOOL_HELPER(bSupportsMeshShadersWithClipDistance);
	GET_SECTION_INT_HELPER(MaxMeshShaderThreadGroupSize);
	GET_SECTION_BOOL_HELPER(bRequiresUnwrappedMeshShaderArgs);
	GET_SECTION_BOOL_HELPER(bSupportsPerPixelDBufferMask);
	GET_SECTION_BOOL_HELPER(bIsHlslcc);

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

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::UpdatePreviewPlatforms

Source code excerpt:

				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsInlineRayTracing);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsRayTracingShaders);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMeshShadersTier0);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMeshShadersTier1);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMobileMultiView);

				// Settings that need to match the runtime
				PREVIEW_USE_RUNTIME_VALUE(bSupportsGPUScene);
				PREVIEW_USE_RUNTIME_VALUE(MaxMeshShaderThreadGroupSize);

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bRequiresDisableForwardLocalLights : 1;
	uint32 bCompileSignalProcessingPipeline : 1;
	uint32 bSupportsMeshShadersTier0 : 1;
	uint32 bSupportsMeshShadersTier1 : 1;
	uint32 bSupportsMeshShadersWithClipDistance : 1;
	uint32 MaxMeshShaderThreadGroupSize : 10;
	uint32 bRequiresUnwrappedMeshShaderArgs : 1;
	uint32 bSupportsPerPixelDBufferMask : 1;
	uint32 bIsHlslcc : 1;

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsMeshShadersTier0

Source code excerpt:

	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsMeshShadersTier0;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsMeshShadersTier1(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsMeshShadersTier1;