Enums

These enums are defined in wgpu.enums, but are also available from the root wgpu namespace.

Enums are choices; exactly one field must be selected. Enum values are strings, so instead of wgpu.TextureFormat.rgba8unorm, one can also write "rgba8unorm".

wgpu.enums.AddressMode
  • “clamp_to_edge”

  • “repeat”

  • “mirror_repeat”

wgpu.enums.AutoLayoutMode
  • “auto”

wgpu.enums.BlendFactor
  • “zero”

  • “one”

  • “src”

  • “one_minus_src”

  • “src_alpha”

  • “one_minus_src_alpha”

  • “dst”

  • “one_minus_dst”

  • “dst_alpha”

  • “one_minus_dst_alpha”

  • “src_alpha_saturated”

  • “constant”

  • “one_minus_constant”

wgpu.enums.BlendOperation
  • “add”

  • “subtract”

  • “reverse_subtract”

  • “min”

  • “max”

wgpu.enums.BufferBindingType
  • “uniform”

  • “storage”

  • “read_only_storage”

wgpu.enums.BufferMapState
  • “unmapped”

  • “pending”

  • “mapped”

wgpu.enums.CanvasAlphaMode
  • “opaque”

  • “premultiplied”

wgpu.enums.CompareFunction
  • “never”

  • “less”

  • “equal”

  • “less_equal”

  • “greater”

  • “not_equal”

  • “greater_equal”

  • “always”

wgpu.enums.CompilationMessageType
  • “error”

  • “warning”

  • “info”

wgpu.enums.CullMode
  • “none”

  • “front”

  • “back”

wgpu.enums.DeviceLostReason
  • “unknown”

  • “destroyed”

wgpu.enums.ErrorFilter
  • “validation”

  • “out_of_memory”

  • “internal”

wgpu.enums.FeatureName
  • “depth_clip_control”

  • “depth32float_stencil8”

  • “texture_compression_bc”

  • “texture_compression_etc2”

  • “texture_compression_astc”

  • “timestamp_query”

  • “indirect_first_instance”

  • “shader_f16”

  • “rg11b10ufloat_renderable”

  • “bgra8unorm_storage”

  • “float32_filterable”

wgpu.enums.FilterMode
  • “nearest”

  • “linear”

wgpu.enums.FrontFace
  • “ccw”

  • “cw”

wgpu.enums.IndexFormat
  • “uint16”

  • “uint32”

wgpu.enums.LoadOp
  • “load”

  • “clear”

wgpu.enums.MipmapFilterMode
  • “nearest”

  • “linear”

wgpu.enums.PipelineErrorReason
  • “validation”

  • “internal”

wgpu.enums.PowerPreference
  • “low_power”

  • “high_performance”

wgpu.enums.PrimitiveTopology
  • “point_list”

  • “line_list”

  • “line_strip”

  • “triangle_list”

  • “triangle_strip”

wgpu.enums.QueryType
  • “occlusion”

  • “timestamp”

wgpu.enums.SamplerBindingType
  • “filtering”

  • “non_filtering”

  • “comparison”

wgpu.enums.StencilOperation
  • “keep”

  • “zero”

  • “replace”

  • “invert”

  • “increment_clamp”

  • “decrement_clamp”

  • “increment_wrap”

  • “decrement_wrap”

wgpu.enums.StorageTextureAccess
  • “write_only”

  • “read_only”

  • “read_write”

wgpu.enums.StoreOp
  • “store”

  • “discard”

wgpu.enums.TextureAspect
  • “all”

  • “stencil_only”

  • “depth_only”

wgpu.enums.TextureDimension
  • “d1”

  • “d2”

  • “d3”

wgpu.enums.TextureFormat
  • “r8unorm”

  • “r8snorm”

  • “r8uint”

  • “r8sint”

  • “r16uint”

  • “r16sint”

  • “r16float”

  • “rg8unorm”

  • “rg8snorm”

  • “rg8uint”

  • “rg8sint”

  • “r32uint”

  • “r32sint”

  • “r32float”

  • “rg16uint”

  • “rg16sint”

  • “rg16float”

  • “rgba8unorm”

  • “rgba8unorm_srgb”

  • “rgba8snorm”

  • “rgba8uint”

  • “rgba8sint”

  • “bgra8unorm”

  • “bgra8unorm_srgb”

  • “rgb9e5ufloat”

  • “rgb10a2uint”

  • “rgb10a2unorm”

  • “rg11b10ufloat”

  • “rg32uint”

  • “rg32sint”

  • “rg32float”

  • “rgba16uint”

  • “rgba16sint”

  • “rgba16float”

  • “rgba32uint”

  • “rgba32sint”

  • “rgba32float”

  • “stencil8”

  • “depth16unorm”

  • “depth24plus”

  • “depth24plus_stencil8”

  • “depth32float”

  • “depth32float_stencil8”

  • “bc1_rgba_unorm”

  • “bc1_rgba_unorm_srgb”

  • “bc2_rgba_unorm”

  • “bc2_rgba_unorm_srgb”

  • “bc3_rgba_unorm”

  • “bc3_rgba_unorm_srgb”

  • “bc4_r_unorm”

  • “bc4_r_snorm”

  • “bc5_rg_unorm”

  • “bc5_rg_snorm”

  • “bc6h_rgb_ufloat”

  • “bc6h_rgb_float”

  • “bc7_rgba_unorm”

  • “bc7_rgba_unorm_srgb”

  • “etc2_rgb8unorm”

  • “etc2_rgb8unorm_srgb”

  • “etc2_rgb8a1unorm”

  • “etc2_rgb8a1unorm_srgb”

  • “etc2_rgba8unorm”

  • “etc2_rgba8unorm_srgb”

  • “eac_r11unorm”

  • “eac_r11snorm”

  • “eac_rg11unorm”

  • “eac_rg11snorm”

  • “astc_4x4_unorm”

  • “astc_4x4_unorm_srgb”

  • “astc_5x4_unorm”

  • “astc_5x4_unorm_srgb”

  • “astc_5x5_unorm”

  • “astc_5x5_unorm_srgb”

  • “astc_6x5_unorm”

  • “astc_6x5_unorm_srgb”

  • “astc_6x6_unorm”

  • “astc_6x6_unorm_srgb”

  • “astc_8x5_unorm”

  • “astc_8x5_unorm_srgb”

  • “astc_8x6_unorm”

  • “astc_8x6_unorm_srgb”

  • “astc_8x8_unorm”

  • “astc_8x8_unorm_srgb”

  • “astc_10x5_unorm”

  • “astc_10x5_unorm_srgb”

  • “astc_10x6_unorm”

  • “astc_10x6_unorm_srgb”

  • “astc_10x8_unorm”

  • “astc_10x8_unorm_srgb”

  • “astc_10x10_unorm”

  • “astc_10x10_unorm_srgb”

  • “astc_12x10_unorm”

  • “astc_12x10_unorm_srgb”

  • “astc_12x12_unorm”

  • “astc_12x12_unorm_srgb”

wgpu.enums.TextureSampleType
  • “float”

  • “unfilterable_float”

  • “depth”

  • “sint”

  • “uint”

wgpu.enums.TextureViewDimension
  • “d1”

  • “d2”

  • “d2_array”

  • “cube”

  • “cube_array”

  • “d3”

wgpu.enums.VertexFormat
  • “uint8x2”

  • “uint8x4”

  • “sint8x2”

  • “sint8x4”

  • “unorm8x2”

  • “unorm8x4”

  • “snorm8x2”

  • “snorm8x4”

  • “uint16x2”

  • “uint16x4”

  • “sint16x2”

  • “sint16x4”

  • “unorm16x2”

  • “unorm16x4”

  • “snorm16x2”

  • “snorm16x4”

  • “float16x2”

  • “float16x4”

  • “float32”

  • “float32x2”

  • “float32x3”

  • “float32x4”

  • “uint32”

  • “uint32x2”

  • “uint32x3”

  • “uint32x4”

  • “sint32”

  • “sint32x2”

  • “sint32x3”

  • “sint32x4”

  • “unorm10_10_10_2”

wgpu.enums.VertexStepMode
  • “vertex”

  • “instance”