Constant lf_gfx::BUFFER_PADDING

source ·
pub const BUFFER_PADDING: BufferAddress = 256;
Expand description

Some operations care about alignment in such a way that it is often easier to simply round all buffer sizes up to the nearest multiple of some power of two. This constant gives that power of two, and the corresponding LfDeviceExt::create_buffer_padded, [LfDeviceExt::new_buffer_init_padded] and LfQueueExt::write_buffer_padded all extend their data lengths to the nearest multiple of this constant.