+ /** Returns a pointer to the start of data in client memory. */
+ virtual const void *get_data_pointer() const = 0;
+
+ /** Returns the alignment required for the data, in bytes. The offset is
+ guaranteed to be a multiple of this. */
+ virtual unsigned get_alignment() const { return 1; }
+
+ /** Updates the offsets for the chain so that data from different objects
+ does not overlap. Should be called if either data size or alignment
+ changes. */
+ void update_offset();
+
+ /** Returns the offset where the data should be uploaded. */
+ unsigned get_offset() const { return offset; }
+
+ /** Called when the offset for the data has changed. */