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"
.
- class wgpu.enums.AddressMode
- clamp_to_edge = 'clamp-to-edge'
- mirror_repeat = 'mirror-repeat'
- repeat = 'repeat'
- class wgpu.enums.BlendFactor
- constant = 'constant'
- dst = 'dst'
- dst_alpha = 'dst-alpha'
- one = 'one'
- one_minus_constant = 'one-minus-constant'
- one_minus_dst = 'one-minus-dst'
- one_minus_dst_alpha = 'one-minus-dst-alpha'
- one_minus_src = 'one-minus-src'
- one_minus_src1 = 'one-minus-src1'
- one_minus_src1_alpha = 'one-minus-src1-alpha'
- one_minus_src_alpha = 'one-minus-src-alpha'
- src = 'src'
- src1 = 'src1'
- src1_alpha = 'src1-alpha'
- src_alpha = 'src-alpha'
- src_alpha_saturated = 'src-alpha-saturated'
- zero = 'zero'
- class wgpu.enums.BlendOperation
- add = 'add'
- max = 'max'
- min = 'min'
- reverse_subtract = 'reverse-subtract'
- subtract = 'subtract'
- class wgpu.enums.BufferBindingType
- read_only_storage = 'read-only-storage'
- storage = 'storage'
- uniform = 'uniform'
- class wgpu.enums.CompareFunction
- always = 'always'
- equal = 'equal'
- greater = 'greater'
- greater_equal = 'greater-equal'
- less = 'less'
- less_equal = 'less-equal'
- never = 'never'
- not_equal = 'not-equal'
- class wgpu.enums.ErrorFilter
- internal = 'internal'
- out_of_memory = 'out-of-memory'
- validation = 'validation'
- class wgpu.enums.FeatureName
- bgra8unorm_storage = 'bgra8unorm-storage'
- clip_distances = 'clip-distances'
- depth32float_stencil8 = 'depth32float-stencil8'
- depth_clip_control = 'depth-clip-control'
- dual_source_blending = 'dual-source-blending'
- float32_blendable = 'float32-blendable'
- float32_filterable = 'float32-filterable'
- indirect_first_instance = 'indirect-first-instance'
- rg11b10ufloat_renderable = 'rg11b10ufloat-renderable'
- shader_f16 = 'shader-f16'
- subgroups = 'subgroups'
- texture_compression_astc = 'texture-compression-astc'
- texture_compression_astc_sliced_d3 = 'texture-compression-astc-sliced-3d'
- texture_compression_bc = 'texture-compression-bc'
- texture_compression_bc_sliced_d3 = 'texture-compression-bc-sliced-3d'
- texture_compression_etc2 = 'texture-compression-etc2'
- timestamp_query = 'timestamp-query'
- class wgpu.enums.PrimitiveTopology
- line_list = 'line-list'
- line_strip = 'line-strip'
- point_list = 'point-list'
- triangle_list = 'triangle-list'
- triangle_strip = 'triangle-strip'
- class wgpu.enums.SamplerBindingType
- comparison = 'comparison'
- filtering = 'filtering'
- non_filtering = 'non-filtering'
- class wgpu.enums.StencilOperation
- decrement_clamp = 'decrement-clamp'
- decrement_wrap = 'decrement-wrap'
- increment_clamp = 'increment-clamp'
- increment_wrap = 'increment-wrap'
- invert = 'invert'
- keep = 'keep'
- replace = 'replace'
- zero = 'zero'
- class wgpu.enums.StorageTextureAccess
- read_only = 'read-only'
- read_write = 'read-write'
- write_only = 'write-only'
- class wgpu.enums.TextureAspect
- all = 'all'
- depth_only = 'depth-only'
- stencil_only = 'stencil-only'
- class wgpu.enums.TextureFormat
- astc_10x10_unorm = 'astc-10x10-unorm'
- astc_10x10_unorm_srgb = 'astc-10x10-unorm-srgb'
- astc_10x5_unorm = 'astc-10x5-unorm'
- astc_10x5_unorm_srgb = 'astc-10x5-unorm-srgb'
- astc_10x6_unorm = 'astc-10x6-unorm'
- astc_10x6_unorm_srgb = 'astc-10x6-unorm-srgb'
- astc_10x8_unorm = 'astc-10x8-unorm'
- astc_10x8_unorm_srgb = 'astc-10x8-unorm-srgb'
- astc_12x10_unorm = 'astc-12x10-unorm'
- astc_12x10_unorm_srgb = 'astc-12x10-unorm-srgb'
- astc_12x12_unorm = 'astc-12x12-unorm'
- astc_12x12_unorm_srgb = 'astc-12x12-unorm-srgb'
- astc_4x4_unorm = 'astc-4x4-unorm'
- astc_4x4_unorm_srgb = 'astc-4x4-unorm-srgb'
- astc_5x4_unorm = 'astc-5x4-unorm'
- astc_5x4_unorm_srgb = 'astc-5x4-unorm-srgb'
- astc_5x5_unorm = 'astc-5x5-unorm'
- astc_5x5_unorm_srgb = 'astc-5x5-unorm-srgb'
- astc_6x5_unorm = 'astc-6x5-unorm'
- astc_6x5_unorm_srgb = 'astc-6x5-unorm-srgb'
- astc_6x6_unorm = 'astc-6x6-unorm'
- astc_6x6_unorm_srgb = 'astc-6x6-unorm-srgb'
- astc_8x5_unorm = 'astc-8x5-unorm'
- astc_8x5_unorm_srgb = 'astc-8x5-unorm-srgb'
- astc_8x6_unorm = 'astc-8x6-unorm'
- astc_8x6_unorm_srgb = 'astc-8x6-unorm-srgb'
- astc_8x8_unorm = 'astc-8x8-unorm'
- astc_8x8_unorm_srgb = 'astc-8x8-unorm-srgb'
- bc1_rgba_unorm = 'bc1-rgba-unorm'
- bc1_rgba_unorm_srgb = 'bc1-rgba-unorm-srgb'
- bc2_rgba_unorm = 'bc2-rgba-unorm'
- bc2_rgba_unorm_srgb = 'bc2-rgba-unorm-srgb'
- bc3_rgba_unorm = 'bc3-rgba-unorm'
- bc3_rgba_unorm_srgb = 'bc3-rgba-unorm-srgb'
- bc4_r_snorm = 'bc4-r-snorm'
- bc4_r_unorm = 'bc4-r-unorm'
- bc5_rg_snorm = 'bc5-rg-snorm'
- bc5_rg_unorm = 'bc5-rg-unorm'
- bc6h_rgb_float = 'bc6h-rgb-float'
- bc6h_rgb_ufloat = 'bc6h-rgb-ufloat'
- bc7_rgba_unorm = 'bc7-rgba-unorm'
- bc7_rgba_unorm_srgb = 'bc7-rgba-unorm-srgb'
- bgra8unorm = 'bgra8unorm'
- bgra8unorm_srgb = 'bgra8unorm-srgb'
- depth16unorm = 'depth16unorm'
- depth24plus = 'depth24plus'
- depth24plus_stencil8 = 'depth24plus-stencil8'
- depth32float = 'depth32float'
- depth32float_stencil8 = 'depth32float-stencil8'
- eac_r11snorm = 'eac-r11snorm'
- eac_r11unorm = 'eac-r11unorm'
- eac_rg11snorm = 'eac-rg11snorm'
- eac_rg11unorm = 'eac-rg11unorm'
- etc2_rgb8a1unorm = 'etc2-rgb8a1unorm'
- etc2_rgb8a1unorm_srgb = 'etc2-rgb8a1unorm-srgb'
- etc2_rgb8unorm = 'etc2-rgb8unorm'
- etc2_rgb8unorm_srgb = 'etc2-rgb8unorm-srgb'
- etc2_rgba8unorm = 'etc2-rgba8unorm'
- etc2_rgba8unorm_srgb = 'etc2-rgba8unorm-srgb'
- r16float = 'r16float'
- r16sint = 'r16sint'
- r16uint = 'r16uint'
- r32float = 'r32float'
- r32sint = 'r32sint'
- r32uint = 'r32uint'
- r8sint = 'r8sint'
- r8snorm = 'r8snorm'
- r8uint = 'r8uint'
- r8unorm = 'r8unorm'
- rg11b10ufloat = 'rg11b10ufloat'
- rg16float = 'rg16float'
- rg16sint = 'rg16sint'
- rg16uint = 'rg16uint'
- rg32float = 'rg32float'
- rg32sint = 'rg32sint'
- rg32uint = 'rg32uint'
- rg8sint = 'rg8sint'
- rg8snorm = 'rg8snorm'
- rg8uint = 'rg8uint'
- rg8unorm = 'rg8unorm'
- rgb10a2uint = 'rgb10a2uint'
- rgb10a2unorm = 'rgb10a2unorm'
- rgb9e5ufloat = 'rgb9e5ufloat'
- rgba16float = 'rgba16float'
- rgba16sint = 'rgba16sint'
- rgba16uint = 'rgba16uint'
- rgba32float = 'rgba32float'
- rgba32sint = 'rgba32sint'
- rgba32uint = 'rgba32uint'
- rgba8sint = 'rgba8sint'
- rgba8snorm = 'rgba8snorm'
- rgba8uint = 'rgba8uint'
- rgba8unorm = 'rgba8unorm'
- rgba8unorm_srgb = 'rgba8unorm-srgb'
- stencil8 = 'stencil8'
- class wgpu.enums.TextureSampleType
- depth = 'depth'
- float = 'float'
- sint = 'sint'
- uint = 'uint'
- unfilterable_float = 'unfilterable-float'
- class wgpu.enums.TextureViewDimension
- cube = 'cube'
- cube_array = 'cube-array'
- d1 = '1d'
- d2 = '2d'
- d2_array = '2d-array'
- d3 = '3d'
- class wgpu.enums.VertexFormat
- float16 = 'float16'
- float16x2 = 'float16x2'
- float16x4 = 'float16x4'
- float32 = 'float32'
- float32x2 = 'float32x2'
- float32x3 = 'float32x3'
- float32x4 = 'float32x4'
- sint16 = 'sint16'
- sint16x2 = 'sint16x2'
- sint16x4 = 'sint16x4'
- sint32 = 'sint32'
- sint32x2 = 'sint32x2'
- sint32x3 = 'sint32x3'
- sint32x4 = 'sint32x4'
- sint8 = 'sint8'
- sint8x2 = 'sint8x2'
- sint8x4 = 'sint8x4'
- snorm16 = 'snorm16'
- snorm16x2 = 'snorm16x2'
- snorm16x4 = 'snorm16x4'
- snorm8 = 'snorm8'
- snorm8x2 = 'snorm8x2'
- snorm8x4 = 'snorm8x4'
- uint16 = 'uint16'
- uint16x2 = 'uint16x2'
- uint16x4 = 'uint16x4'
- uint32 = 'uint32'
- uint32x2 = 'uint32x2'
- uint32x3 = 'uint32x3'
- uint32x4 = 'uint32x4'
- uint8 = 'uint8'
- uint8x2 = 'uint8x2'
- uint8x4 = 'uint8x4'
- unorm10_10_10_2 = 'unorm10-10-10-2'
- unorm16 = 'unorm16'
- unorm16x2 = 'unorm16x2'
- unorm16x4 = 'unorm16x4'
- unorm8 = 'unorm8'
- unorm8x2 = 'unorm8x2'
- unorm8x4 = 'unorm8x4'
- unorm8x4_bgra = 'unorm8x4-bgra'