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. ShaderStage

dawn.ShaderStage

Bit flags for GPU shader stages.

Specifies which shader stages a resource or operation applies to. Used in bind group layouts and other resource binding contexts.

ShaderStage = {
  /**
   * Vertex shader stage (render pipelines only).
   */
  VERTEX: 0x1,

  /**
   * Fragment/pixel shader stage (render pipelines only).
   */
  FRAGMENT: 0x2,

  /**
   * Compute shader stage.
   * Used for compute dispatch operations.
   */
  COMPUTE: 0x4,
} as const
VERTEX(number)
– Vertex shader stage (render pipelines only).
FRAGMENT(number)
– Fragment/pixel shader stage (render pipelines only).
COMPUTE(number)
– Compute shader stage. Used for compute dispatch operations.
Previous
ShaderModuleHandle
Next
WGPU