/Engine/Source/Runtime/RenderCore/Public/RenderGraphUtils.h
Compute the number of groups to dispatch and allow wrapping to Y and Z dimension if X group count overflows. Calculate the linear group index as (or use GetUnWrappedDispatchGroupId(GroupId) in ComputeShaderUtils.ush): uint LinearGroupId = GroupId.X + (GroupId.Z * WrappedGroupStride + GroupId.Y) * WrappedGroupStride; Note that you must use an early out because LinearGroupId may be larger than the ideal due to wrapping.
namespace FComputeShaderUtils { FIntVector FComputeShaderUtils::GetGroupCountWrapped ( const int32 ThreadCount, const int32 GroupSize ) }