upload
Upload data into the ring buffer and return a slice covering the written region.
Upload decision:
If the current buffer has enough remaining space, append at currentOffset.
Otherwise, if the buffer is large enough, rotate() and write from offset 0.
If the buffer is still too small for this upload, grow the ring and write from 0.
Return
The uploaded GpuBufferSlice. Its lifetime is tied to the underlying ring buffer.
Parameters
data
The data to upload. Its remaining() bytes will be copied.