Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

make ComputeBuffer job friendly

Discussion in 'Entity Component System' started by laurentlavigne, Jan 21, 2018.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,987
    at this time, SetData takes an array, jobs only output NativeArray, which then need to be ToArray-ified first, but ToArray and CopyTo allocates an array internally, and this makes the GC sad.

    I think the Job team will take the minimalist route and add a non alloc CopyTo, but in case they don't, it would help a lot to have SetData (NativeArray).
     
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Joachim confirmed that this will all happen, but it is early in beta. Officially they did not add the job system yet...
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,987
    good to let me know, I'll stop chasing the windmills
    I missed that, was it in the mailing list?
     
  4. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    One of the other forum threads...

    Lennart