shacklettbp / madrona

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The conflict arising from many-to-one parallel reading and the definition of IBufferElementData(or List) Component(ike Unity's ECS)

ShawnshanksGui opened this issue · comments

Hi,
1) How does Madrona address the conflict of many-to-one parallel reading?
2) Does Madrona support the definition of IBufferElementData(or List) Component, like Unity's ECS, the length of which is not fixed?"

Sorry for the error,:
"many-to-one parallel reading" --> "parallel many-to-one memory writing"

  1. You can use native C++ atomics. We use this in some situations. GPU atomics can be very fast.
  2. Not really. You can have a component which is a pointer, and then allocate variable length data in manually in a buffer which the pointer addresses. For temporary data that only lives one frame, this is reasonably fast using the TmpAllocator api. We don't have an efficient API for variable sized data that needs to last more than one frame while still being allocated and deallocated frequently. Frankly, we haven't needed it so far. Do you have a use case you're interested in?

Closing this, feel free to follow up with more questions.