GPUTexelCopyBufferLayout constructor

GPUTexelCopyBufferLayout({
  1. int offset,
  2. int bytesPerRow,
  3. int rowsPerImage,
})

How texels are arranged in a buffer.

bytesPerRow must be a multiple of 256 for a copy — paddedBytesPerRow is that arithmetic — and may be anything for a writeTexture, which is the one asymmetry in this API worth remembering.

Implementation

external factory GPUTexelCopyBufferLayout({
  int offset,
  int bytesPerRow,
  int rowsPerImage,
});