namespace Brutal.TextureApi.Abstractions;
///
/// Represents a region of texture data to be copied to a staging buffer.
///
public class StagingRegion
{
///
/// Offset from the start of the texture data to start copying from.
///
public ByteSize SourceStartOffset;
///
/// Offset within the destination staging buffer to start copying data to.
///
public ByteSize DestinationOffset;
///
/// How many bytes of data to copy.
///
public ByteSize SizeInBytes;
///
/// How many blocks wide is a single row of image data.
///
public int RowWidthInBlocks;
///
/// How many bytes does a block take up. This is directly related
/// to the of the texture data that's being staged.
///
public ByteSize BlockSizeBytes;
///
/// How many bytes from the start of one one row of the texture to the start
/// of the next row.
///
/// This can be > BlockSizeBytes * RowWidthInBlocks. Specifically this is the case
/// for some KTX version 1 textures because they are padded to support OpenGL texture uploading.
/// Almost all other formats will have RowPitch == RowwidthInBlocks * BlockSizeBytes but
/// do not just assume that is the case and use this field for memory calculations on texture data.
///
public required ByteSize RowPitch;
}