This may be a stupid question but I'm currently failing to see the purpose of the ConsumeStructuredBuffer if it is impossible to tell when it is empty.
The obvious use for such a buffer is to read in an arbitrary, unknown number of elements and process those in a shader. In order to make sure they are all processed, enough threads for a "maximum load" have to be used. So normally you'll end up with more threads than data to process. This is acceptable as long as you can tell those threads that there's nothing to do for them, but it seems it isn't possible to retrieve the internal counter of append/consume buffers on the GPU, or even to tell when they're empty. Sure, you can query the counter on the CPU and copy it into a cbuffer or similar but that pretty much takes away the whole point of having a supposedly CPU-independent data structure, doesn't it? And if I know the counter through such means as a constant, I wouldn't need the consume behaviour at all but could rather just step through each element as through a normal StructuredBuffer.
Surely I must be missing something here... or?