bSupportsWave64

bSupportsWave64

#Overview

name: bSupportsWave64

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 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bSupportsWave64 is to indicate whether a specific shader platform supports Wave64 operations. Wave64 refers to the ability to perform operations across 64 threads in a wavefront or warp, which is particularly relevant for GPU compute shaders and certain graphics operations.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) subsystem of Unreal Engine 5. 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 during the parsing of shader platform information, specifically in the ParseDataDrivenShaderInfo function of the FGenericDataDrivenShaderPlatformInfo class. It’s likely populated from a configuration file or another data source that defines shader platform capabilities.

bSupportsWave64 interacts with other shader platform capability variables, such as SupportsBarycentricsIntrinsics and SupportsBarycentricsSemantic, as they are parsed and stored together in the same data structure.

Developers must be aware that this variable is platform-specific and its value may vary depending on the target hardware and graphics API. It’s crucial to check this capability before attempting to use Wave64 operations in shaders or compute kernels.

Best practices when using this variable include:

  1. Always check the value using the GetSupportsWave64 function before relying on Wave64 functionality in shaders.
  2. Provide fallback implementations for platforms that don’t support Wave64 operations.
  3. Use this information to optimize shader code by leveraging Wave64 operations when available, potentially improving performance on supported hardware.
  4. Keep in mind that this is part of a larger set of shader platform capabilities, and should be considered alongside other relevant features when designing cross-platform shader code.

#Setting Variables

#References In INI files

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

#References in C++ code

#Callsites

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

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

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(SupportsBarycentricsIntrinsics);
	GET_SECTION_SUPPORT_HELPER(SupportsBarycentricsSemantic);
	GET_SECTION_BOOL_HELPER(bSupportsWave64);
#undef GET_SECTION_BOOL_HELPER
#undef GET_SECTION_INT_HELPER
#undef GET_SECTION_SUPPORT_HELPER
#undef ADD_TO_PROPERTIES_STRING
#undef ADD_PROPERTY_TO_SHADERPLATFORM_FUNCTIONMAP

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 SupportsBarycentricsIntrinsics : 1;
	uint32 SupportsBarycentricsSemantic : int32(ERHIFeatureSupport::NumBits);
	uint32 bSupportsWave64 : 1;

	// NOTE: When adding fields, you must also add to ParseDataDrivenShaderInfo!
	uint32 bContainsValidPlatformInfo : 1;

	FGenericDataDrivenShaderPlatformInfo()
	{

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsWave64

Source code excerpt:

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

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