Search Unity

Buggyness with Graphics.DrawMeshInstancedIndirect on macOS

Discussion in 'General Graphics' started by Aaron-Meyers, Apr 18, 2019.

  1. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    I'm working on a project that involves drawing some pretty massive point cloud sequences. I use Graphics.DrawMeshInstancedIndirect to draw them, but I've found that my MacBook Pro will completely lock up when I get to frames where the point count is beyond a certain threshold. The same frames in the sequence are not a problem for my windows PC (with a 980ti) or for a build of the scene on an iPad Pro.

    I attempted to come up with a workaround where I'd split apart the drawing into a couple smaller calls to Graphics.DrawMeshInstancedIndirect and pass an offset to the shader so each draw call knows which part of the accompanying buffer it should use. I picked a maximum of 150,000 points per call because I don't know the exact threshold for where the aforementioned lockup occurs, but 150k works fine (some of the biggest frames have between 450k and 500k I believe).

    Anyways, my workaround technique works perfectly on the windows computer and the iPad Pro, but on the MacBook Pro, most of the time there are clearly blocks of missing points. It's hard to tell what's going on, but if I had to guess, it seems like unity_InstanceID is not always going from 0 -> n in the shader.

    It's a 2018 MacBook Pro with a Radeon Pro Vega 20 running macOS Mojave and Unity 2019.3.9

    Seems like there is general abounding buggyness with Graphics.DrawMeshInstancedIndirect on macOS... any solutions or suggestions?
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hey, it’s probably best to submit a bug report for this, thanks