Search Unity

Will ECB be Burstable in the future?

Discussion in 'Burst' started by AndesSunset, Jan 31, 2019.

  1. AndesSunset

    AndesSunset

    Joined:
    Jan 28, 2019
    Posts:
    60
    It is dumb to assume that Unity will make/wants to make EntityCommandBuffer usable in Burst-compiled jobs in the future?

    Over the months @Joachim_Ante has called the lack of Burst support a bug, or a known issue, that's not available yet. Would it be possible for anyone to comment on the likelyhood of this happening down the road? If there aren't plans to do it, that would be useful information to know as well. :) Thank you - Any info would be very much appreciated!
     
  2. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    Isn't it actually a good practice to do all the math / memory operations in one burst Job and then the commandbuffer stuff in a second non-burst job that depends on the first one ?
     
    AndesSunset likes this.
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    It's "almost" burstable. Instantiate already can be bursted, Add/SetComponents support will be available soon-ish? I guess.

    Take a look what I've dug up. I've almost managed to add burst to the Add/SetComponent by using pre-made typeIndex.
    Although, that doesn't include a case where actual entity offsets in memory could've changed, so I've abandoned it there.

    https://forum.unity.com/threads/anyone-got-burst-working-with-entitycommandbuffer.543789/

    With some cleaver hacks it should be possible already. (Add/SetComponent);

    Although I agree that is better to separate math / ECB from each other, that will yield better architecture for the future features.

    If only "unsafe" Add/Set could be added to the ECB.Concurrent by default, that would be really nice from UT.

    Rest of the features I haven't checked yet, but it probably will be supported in the future.
     
    AndesSunset likes this.
  4. AndesSunset

    AndesSunset

    Joined:
    Jan 28, 2019
    Posts:
    60

    Thanks guys, for both responses.

    Can you help me better understand this pattern? Why would it be preferable to split this one one burst Job, and one nonburst Job, rather than doing it all in a burst job (if it were possible)?

    Thank you. :)
     
    Last edited: Jan 31, 2019