Posts

Post not yet marked as solved
2 Replies
@somenet, I am probably having the same issue as you. I am trying to test the limits of how many quads I can render in a single drawMeshThreadgroups call in a MacBook M2 Max with 32GB of RAM. [render_command_encoder_metal drawMeshThreadgroups:threadgroups_per_grid                      threadsPerObjectThreadgroup:threads_per_object_threadgroup                          threadsPerMeshThreadgroup:threads_per_mesh_threadgroup]; If I set a grid of 64 x 32 (2048) object thread groups to draw a quad each I get the perfect expected chess pattern (see left side of image below). If I set anything that goes over 2048 thread groups, like for example a grid of 64 x 64 thread groups to draw a quad each, I get only the first 2048 thread groups to do anything. I can push much more quads by using each object thread group to generate a bunch of mesh thread groups and get each mesh thread group to draw a quad. See image below for an example of a 64 x 32 grid of object thread groups generating a 2 x 2 grid of mesh thread groups and a 4 x 2 grid of mesh thread groups (each mesh thread group generates a quad). I even pushed it all the way to the 32 x 32 mesh thread groups to test the documented limit of "1024 mesh thread groups / object thread group" on the grid of 64 x 32 object thread groups to get 2097152 quads (4194304 triangle primitives) and it works fine. Any pointers on more Metal mesh shader examples or discussions and possibly limits for grid sizes of object thread groups per drawMeshThreadgroups call would be appreciated.