Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Documentation
IntroductionType SafetyTensor ExpressionsTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformancePyTorch CompatibilityBenchmarksDType Coverage
Introduction
createdestroyBufferUsageMapModeShaderStageBufferHandleDeviceHandleAdapterHandleShaderModuleHandleComputePipelineHandleBindGroupHandleBindGroupLayoutHandleCommandEncoderHandleCommandBufferHandleComputePassEncoderHandleQuerySetHandleQueueHandleWGPUBufferWGPUShaderModuleWGPUBindGroupLayoutWGPUBindGroupWGPUComputePipelineWGPUQuerySetWGPUComputePassEncoderWGPUCommandBufferWGPUCommandEncoderWGPUQueueWGPULimitsBufferDescriptorShaderModuleDescriptorComputePipelineDescriptorBufferBindingBindGroupEntryBindGroupDescriptorQuerySetDescriptorWGPUDeviceWGPUSupportedFeaturesWGPUAdapterWGPU
torch.js· 2026
LegalTerms of UsePrivacy Policy
/
/
  1. docs
  2. dawn
  3. dawn
  4. BufferDescriptor

dawn.BufferDescriptor

export interface BufferDescriptor {
  /**
   * Size of the buffer in bytes.
   */
  size: number;

  /**
   * Combined {@link BufferUsage} flags for this buffer.
   */
  usage: number;

  /**
   * If true, buffer is created in mapped state for initial data.
   * Default: false
   */
  mappedAtCreation?: boolean;
}
size(number)
– Size of the buffer in bytes.
usage(number)
– Combined BufferUsage flags for this buffer.
mappedAtCreation(boolean)optional
– If true, buffer is created in mapped state for initial data. Default: false

Descriptor for creating a GPU buffer.

Previous
BufferBinding
Next
BufferHandle