Search Unity

Graphics.ExecuteCommandBufferAsync with ComputeShader calling UpdateRendererBoundingVolumes

Discussion in 'General Graphics' started by SLGSimon, Apr 17, 2020.

  1. SLGSimon

    SLGSimon

    Joined:
    Jul 23, 2019
    Posts:
    70
    When I use
    Graphics.ExecuteCommandBufferAsync
    to dispatch a compute shader, I get a call to
    UpdateRendererBoundingVolumes
    before actually dispatching the shader on the render thread.


    The first
    MeshInstancedRenderer.LateUpdate()
    here calls
    Graphics.ExecuteCommandBufferAsync
    and you can see there are multiple calls before the actual internal call to
    ComputeShader.Dispatch
    . The following instances however don't get this and take no time to dispatch.

    What causes this? Is there a way to stop it? I've had to go back to just calling
    ComputeShader.Dispatch
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    1,907
    @SLGSimon
    Did you figure out what was causing the problem?
     
  3. SLGSimon

    SLGSimon

    Joined:
    Jul 23, 2019
    Posts:
    70
  4. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    24
    Did anyone get a solution to this? Seems like a pretty big issue. Makes async compute not really usable for us
     
  5. SLGSimon

    SLGSimon

    Joined:
    Jul 23, 2019
    Posts:
    70
    I don't think I opened an issue with Unity for it, so probably a good idea to if you can.
     
unityunity