bSupportsVolumeTextureAtomics

bSupportsVolumeTextureAtomics

#Overview

name: bSupportsVolumeTextureAtomics

The value of this variable can be defined or overridden in .ini config files. 7 .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 bSupportsVolumeTextureAtomics is to indicate whether the current shader platform supports atomic operations on volume textures. This is a capability related to the rendering system, specifically for advanced graphics features.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine. It’s part of the DataDrivenShaderPlatformInfo system, which provides information about various shader platform capabilities.

The value of this variable is set in multiple places:

  1. It’s initially set to true in the SetDefaultValues function of FGenericDataDrivenShaderPlatformInfo.
  2. It can be overridden through configuration files, as seen in the ParseDataDrivenShaderInfo function.

This variable interacts with other shader platform capability flags within the FGenericDataDrivenShaderPlatformInfo class. It’s part of a larger set of flags that describe the features supported by a particular shader platform.

Developers must be aware that this variable’s value can vary depending on the target platform. Not all platforms support volume texture atomics, so code that relies on this feature should check this flag before attempting to use such functionality.

Best practices when using this variable include:

  1. Always check the value of this flag before using volume texture atomic operations in shaders.
  2. Use the GetSupportsVolumeTextureAtomics function to query this capability, rather than accessing the variable directly.
  3. Consider providing fallback methods for platforms that don’t support volume texture atomics.
  4. Be aware that this setting can be configured through data-driven methods, so its value might change based on configuration files.

#Setting Variables

#References In INI files

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

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

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

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

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

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

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:133, section: [ShaderPlatform METAL_MACES3_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:145

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::SetDefaultValues

Source code excerpt:

	bSupportsVertexShaderSRVs = true; // Explicitly overriden to false for ES 3.1 platforms via DDPI ini
	bSupportsManualVertexFetch = true;
	bSupportsVolumeTextureAtomics = true;
	bSupportsClipDistance = true;
	bSupportsShaderPipelines = true;
	MaxSamplers = 16;
}

void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo(const FConfigSection& Section, uint32 Index)

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

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bSupportsVertexShaderLayer);
	GET_SECTION_BINDLESS_SUPPORT_HELPER(BindlessSupport);
	GET_SECTION_BOOL_HELPER(bSupportsVolumeTextureAtomics);
	GET_SECTION_BOOL_HELPER(bSupportsROV);
	GET_SECTION_BOOL_HELPER(bSupportsOIT);
	GET_SECTION_SUPPORT_HELPER(bSupportsRealTypes);
	GET_SECTION_INT_HELPER(EnablesHLSL2021ByDefault);
	GET_SECTION_BOOL_HELPER(bSupportsSceneDataCompressedTransforms);
	GET_SECTION_BOOL_HELPER(bSupportsSwapchainUAVs);

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bSupportsVertexShaderLayer : 1;
	uint32 BindlessSupport : int32(ERHIBindlessSupport::NumBits);
	uint32 bSupportsVolumeTextureAtomics : 1;
	uint32 bSupportsROV : 1;
	uint32 bSupportsOIT : 1;
	uint32 bSupportsRealTypes : int32(ERHIFeatureSupport::NumBits);
	uint32 EnablesHLSL2021ByDefault : 2; // 0: disabled, 1: global shaders only, 2: all shaders
	uint32 bSupportsSceneDataCompressedTransforms : 1;
	uint32 bIsPreviewPlatform : 1;

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsVolumeTextureAtomics

Source code excerpt:

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

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