Describes an image-to-image copy operation via sg_copy_image_to_image().
.src
.image the source image
.mip_level the source mip level
.x, .y the source x,y location
.slice the array or 3d slice
.dst
.image the destination image
.mip_level the destination mip level
.x, .y the destination x,y location
.slice the array or 3d slice
.size
.width copy region width in pixels
.height copy region height in pixels
.num_slices number of array or 3d slices to copy
Note on default values:
.size
The size default is the 'rest after offset' for the source mip
level, e.g.:
.size.width = src_mip_width - .src.x
.size.height = src_mip_height - .src.y
.size.num_slices = src_mip_depth_or_slices - .src.slice
Caveats (all checked by the validation layer):
- sg_copy_image_to_image() must be called outside a pass
- for compressed image formats, .size.width and .size.height must be
a multiple of the compression block size or fall on the mip level
width / height
- the source and destination image must not be the same
- the source image must have been created with .usage.copy_src
- the destination image must have been created with .usage.copy_dst
- the source and destination image pixel format must be identical
- copying between 3D images and non-3D-images is not allowed
- copying between multi-sampled images is not allowed
- copying into pass attachments is not allowed (from pass attachments
is fine)
- when sg_features.copy_image_to_image_relaxed_pixel_format is false, the
pixel format must be renderable (this restriction applies to GL < 4.3
and GLES < 3.2, e.g. also on WebGL2)
- when copying between depth- or depth-stencil-images, only
entire mip levels can be copied
sg_copy_image_to_image_desc
Describes an image-to-image copy operation via sg_copy_image_to_image().
.src .image the source image .mip_level the source mip level .x, .y the source x,y location .slice the array or 3d slice .dst .image the destination image .mip_level the destination mip level .x, .y the destination x,y location .slice the array or 3d slice .size .width copy region width in pixels .height copy region height in pixels .num_slices number of array or 3d slices to copy
Note on default values:
.size The size default is the 'rest after offset' for the source mip level, e.g.: .size.width = src_mip_width - .src.x .size.height = src_mip_height - .src.y .size.num_slices = src_mip_depth_or_slices - .src.slice
Caveats (all checked by the validation layer): - sg_copy_image_to_image() must be called outside a pass - for compressed image formats, .size.width and .size.height must be a multiple of the compression block size or fall on the mip level width / height - the source and destination image must not be the same - the source image must have been created with .usage.copy_src - the destination image must have been created with .usage.copy_dst - the source and destination image pixel format must be identical - copying between 3D images and non-3D-images is not allowed - copying between multi-sampled images is not allowed - copying into pass attachments is not allowed (from pass attachments is fine) - when sg_features.copy_image_to_image_relaxed_pixel_format is false, the pixel format must be renderable (this restriction applies to GL < 4.3 and GLES < 3.2, e.g. also on WebGL2) - when copying between depth- or depth-stencil-images, only entire mip levels can be copied