I have a foliage renderer that draws instances using Graphics.DrawMeshInstancedIndirect (DMII) and am currently investigating the CPU frame time. I disabled shadow casting, receiving and light probe usage
Graphics.DrawMeshInstancedIndirect(mesh, 0, material, bounds, argsBuffer, 0, null, UnityEngine.Rendering.ShadowCastingMode.Off, false, 0, null, UnityEngine.Rendering.LightProbeUsage.Off);
Still, turning on my foliage renderer adds about 1.5 ms - 2.0 ms of CPU rendering overhead according to the standalone profiler. My foliage renderer submits around 30 DMII calls on average. 1.5 ms seems quite excessive to me. Is that normal? If so, what’s taking so long there?
The GPU frame time barely increases, from ~4.4 ms to ~4.9 ms, but it looks like Gfx.WaitForPresentOnGfxThread increases substantially (see images)
(First) foliage renderer off. (Second) foliage renderer on.