I think the new append/consume types for structured buffers and byte buffers are very cool. However, I do have a question about something.
It looks like the AppendByteAddressBuffer type has an IncrementCounter method, which I like. This way, I know exactly how many items are in the buffer at the time of insertion. However, for AppendStructuredBuffer, the counter is hidden and the Append method does not return anything (such as the total number of items in the buffer).
I can't really append something and then call GetDimensions, as a parallel copy of the shader could be inserting something before I call GetDimensions in the other copy, which would result in a potentially incorrect count. Wouldn't it be better to also have an IncrementCounter method on the structured buffer type so the programmer knows exactly how many items are in it at the time of insertion? Or does the byte address buffer type use an atomic operation on an integer, while the structured buffer type uses a special instruction that HW people can optimize for?
Thanks,
Seth