Describes a buffer-to-buffer copy operation via sg_copy_buffer_to_buffer()
.src
.buffer the source buffer
.offset byte offset into the source buffer
.dst
.buffer the destination buffer
.offset byte offset into the destination buffer
.size number of bytes to copy (must be > 0)
Caveats (all checked by the validation layer):
- sg_copy_buffer_to_buffer() must be called outside a pass
- the source buffer must have been created with .usage.copy_src
- the destination buffer must have been created with .usage.copy_dst
- the source and destination buffer cannot be identical
- src and dst offset must be 4-byte aligned
- WebGL2 specific: when copying into an index buffer, the source
buffer must have been created with .usage.index_buffer or
.usage.staging_index_buffer (this requirement can be checked
via sg_query_features().separate_buffer_types)
sg_copy_buffer_to_buffer_desc
Describes a buffer-to-buffer copy operation via sg_copy_buffer_to_buffer()
.src .buffer the source buffer .offset byte offset into the source buffer .dst .buffer the destination buffer .offset byte offset into the destination buffer .size number of bytes to copy (must be > 0)
Caveats (all checked by the validation layer): - sg_copy_buffer_to_buffer() must be called outside a pass - the source buffer must have been created with .usage.copy_src - the destination buffer must have been created with .usage.copy_dst - the source and destination buffer cannot be identical - src and dst offset must be 4-byte aligned - WebGL2 specific: when copying into an index buffer, the source buffer must have been created with .usage.index_buffer or .usage.staging_index_buffer (this requirement can be checked via sg_query_features().separate_buffer_types)