Navigation
API > API/Runtime > API/Runtime/RenderCore > API/Runtime/RenderCore/FComputeShaderUtils__GetGroupCou-_1
References
| Module | RenderCore |
| Header | /Engine/Source/Runtime/RenderCore/Public/RenderGraphUtils.h |
| Include | #include "RenderGraphUtils.h" |
namespace FComputeShaderUtils
{
FIntVector FComputeShaderUtils&58;&58;GetGroupCountWrapped
&40;
const int32 ThreadCount,
const int32 GroupSize
&41;
}
Remarks
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.