webgpu-feature-detector
    Preparing search index...

    Function getBlockInfoForTextureFormat

    • Returns the size of a block for a given texture format For a depth-stencil format it return the size of the depth aspect unless you specify the stencil-only aspect.

      Parameters

      • format: GPUTextureFormat
      • aspect: GPUTextureAspect = 'all'

      Returns
          | {
              blockHeight: 1
              | 4
              | 5
              | 6
              | 8
              | 10
              | 12;
              blockWidth: 1 | 4 | 5 | 6 | 8 | 10 | 12;
              bytesPerBlock: 1 | 2 | 4 | 8 | 16 | undefined;
          }
          | { blockHeight: number; blockWidth: number }