bSupportsComputeFramework

bSupportsComputeFramework

#Overview

name: bSupportsComputeFramework

The value of this variable can be defined or overridden in .ini config files. 5 .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 bSupportsComputeFramework is to indicate whether a specific shader platform supports the compute framework in Unreal Engine 5. This setting variable is primarily related to the rendering system and shader capabilities.

The Unreal Engine subsystem that relies on this setting variable is the RHI (Rendering Hardware Interface) module, as evidenced by its presence in the RHI source files.

The value of this variable is set within the ParseDataDrivenShaderInfo function in the FGenericDataDrivenShaderPlatformInfo class. It is parsed from a data-driven configuration, likely loaded from an external file or configuration system.

This variable interacts with other shader platform capabilities flags, such as bTargetsTiledGPU, bSupportsAnisotropicMaterials, and bSupportsDualSourceBlending. These flags collectively define the features and capabilities of a specific shader platform.

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 flag before attempting to use compute shaders or other compute-related features in rendering code.

Best practices when using this variable include:

  1. Always check its value before utilizing compute shader features in your rendering pipeline.
  2. Use the provided GetSupportsComputeFramework static function to query the value, ensuring proper encapsulation and potential future-proofing.
  3. Consider providing fallback rendering paths for platforms that don’t support the compute framework.
  4. Keep in mind that this is part of a data-driven system, so the values may be configurable or updatable without code changes.

#Setting Variables

#References In INI files

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

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

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

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

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:153, section: [ShaderPlatform PCD3D_ES3_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:248

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bTargetsTiledGPU);
	GET_SECTION_BOOL_HELPER(bNeedsOfflineCompiler);
	GET_SECTION_BOOL_HELPER(bSupportsComputeFramework);
	GET_SECTION_BOOL_HELPER(bSupportsAnisotropicMaterials);
	GET_SECTION_BOOL_HELPER(bSupportsDualSourceBlending);
	GET_SECTION_BOOL_HELPER(bRequiresGeneratePrevTransformBuffer);
	GET_SECTION_BOOL_HELPER(bRequiresRenderTargetDuringRaster);
	GET_SECTION_BOOL_HELPER(bRequiresDisableForwardLocalLights);
	GET_SECTION_BOOL_HELPER(bCompileSignalProcessingPipeline);

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bTargetsTiledGPU : 1;
	uint32 bNeedsOfflineCompiler : 1;
	uint32 bSupportsComputeFramework : 1;
	uint32 bSupportsAnisotropicMaterials : 1;
	uint32 bSupportsDualSourceBlending : 1;
	uint32 bRequiresGeneratePrevTransformBuffer : 1;
	uint32 bRequiresRenderTargetDuringRaster : 1;
	uint32 bRequiresDisableForwardLocalLights : 1;
	uint32 bCompileSignalProcessingPipeline : 1;

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsComputeFramework

Source code excerpt:

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

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