Skip to content

Thread group count is above the maximum allowed limit. Maximum allowed thread group count is 65535. #3

Open
@SlimeQ

Description

@SlimeQ

I'm trying to run this thing in Unity 2022.2.3 and getting this error out of the box with no changes:

Thread group count is above the maximum allowed limit. Maximum allowed thread group count is 65535.

From what I can tell, this is happening because m_threadGroupsPerGridCell is 125000 when clearing the grid:

m_commandBuffer.BeginSample("ClearGrid");
m_commandBuffer.DispatchCompute(m_computeShader, m_kernel_clearGrid, m_threadGroupsPerGridCell, 1, 1);
m_commandBuffer.EndSample("ClearGrid");

and that value is calculated based on values from the inspector

m_threadGroupsPerGridCell = Mathf.CeilToInt((gridX * gridY * gridZ) / 8f);

the grid appears to be set to 100x100x100, which pushes this value to 125000.

What I can't figure out is why the project is in this state; was there a change at some point that made the max thread count lower? Or was this some sort of typo or something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions