Search Unity

make ComputeBuffer job friendly

Discussion in 'Data Oriented Technology Stack' started by laurentlavigne, Jan 21, 2018.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,015
    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,289
    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:
    2,015
    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,289
    One of the other forum threads...

    Lennart