Structs

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

The classes below are dataclasses; they are used for typing, (static and dynamic) autocompletion, and docs. The recommended way to use wgpu structs is to instantiate these classes, since that results in a code that is readable and type-checkable. However, structs can also be defined using plain Python dicts. Their fields are checked at runtime.

class wgpu.structs.BindGroupDescriptor(*, label: 'str' = '', layout: 'classes.GPUBindGroupLayout', entries: 'Sequence[BindGroupEntryStruct]')
entries: Sequence[BindGroupEntry | dict]
label: str = ''
layout: GPUBindGroupLayout
class wgpu.structs.BindGroupEntry(*, binding: 'int', resource: 'classes.GPUBuffer | classes.GPUSampler | classes.GPUTexture | classes.GPUTextureView | object | BufferBindingStruct')
binding: int
resource: GPUBuffer | GPUSampler | GPUTexture | GPUTextureView | object | BufferBinding | dict
class wgpu.structs.BindGroupLayoutDescriptor(*, label: 'str' = '', entries: 'Sequence[BindGroupLayoutEntryStruct]')
entries: Sequence[BindGroupLayoutEntry | dict]
label: str = ''
class wgpu.structs.BindGroupLayoutEntry(*, binding: 'int', visibility: 'flags.ShaderStageFlags', buffer: 'BufferBindingLayoutStruct | None' = None, sampler: 'SamplerBindingLayoutStruct | None' = None, texture: 'TextureBindingLayoutStruct | None' = None, storage_texture: 'StorageTextureBindingLayoutStruct | None' = None, external_texture: 'ExternalTextureBindingLayoutStruct | None' = None)
binding: int
buffer: BufferBindingLayout | dict | None = None
external_texture: ExternalTextureBindingLayout | dict | None = None
sampler: SamplerBindingLayout | dict | None = None
storage_texture: StorageTextureBindingLayout | dict | None = None
texture: TextureBindingLayout | dict | None = None
visibility: int | str

flags.ShaderStage

class wgpu.structs.BlendComponent(*, operation: 'enums.BlendOperationEnum' = 'add', src_factor: 'enums.BlendFactorEnum' = 'one', dst_factor: 'enums.BlendFactorEnum' = 'zero')
dst_factor: Literal['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', 'src1', 'one-minus-src1', 'src1-alpha', 'one-minus-src1-alpha'] | str = 'zero'

enums.BlendFactor

operation: Literal['add', 'subtract', 'reverse-subtract', 'min', 'max'] | str = 'add'

enums.BlendOperation

src_factor: Literal['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', 'src1', 'one-minus-src1', 'src1-alpha', 'one-minus-src1-alpha'] | str = 'one'

enums.BlendFactor

class wgpu.structs.BlendState(*, color: 'BlendComponentStruct', alpha: 'BlendComponentStruct')
alpha: BlendComponent | dict
color: BlendComponent | dict
class wgpu.structs.BufferBinding(*, buffer: 'classes.GPUBuffer', offset: 'int' = 0, size: 'int | None' = None)
buffer: GPUBuffer
offset: int = 0
size: int | None = None
class wgpu.structs.BufferBindingLayout(*, type: 'enums.BufferBindingTypeEnum' = 'uniform', has_dynamic_offset: 'bool' = False, min_binding_size: 'int' = 0)
has_dynamic_offset: bool = False
min_binding_size: int = 0
type: Literal['uniform', 'storage', 'read-only-storage'] | str = 'uniform'

enums.BufferBindingType

class wgpu.structs.BufferDescriptor(*, label: 'str' = '', size: 'int', usage: 'flags.BufferUsageFlags', mapped_at_creation: 'bool' = False)
label: str = ''
mapped_at_creation: bool = False
size: int
usage: int | str

flags.BufferUsage

class wgpu.structs.CanvasConfiguration(*, device: 'classes.GPUDevice', format: 'enums.TextureFormatEnum', usage: 'flags.TextureUsageFlags' = 16, view_formats: 'Sequence[enums.TextureFormatEnum]' = (), color_space: 'str' = 'srgb', tone_mapping: 'CanvasToneMappingStruct | None' = None, alpha_mode: 'enums.CanvasAlphaModeEnum' = 'opaque')
alpha_mode: Literal['opaque', 'premultiplied'] | str = 'opaque'

enums.CanvasAlphaMode

color_space: str = 'srgb'
device: GPUDevice
format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str

enums.TextureFormat

tone_mapping: CanvasToneMapping | dict | None = None
usage: int | str = 16

flags.TextureUsage

view_formats: Sequence[Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str] = ()

list[enums.TextureFormat]

class wgpu.structs.CanvasToneMapping(*, mode: 'enums.CanvasToneMappingModeEnum' = 'standard')
mode: Literal['standard', 'extended'] | str = 'standard'

enums.CanvasToneMappingMode

class wgpu.structs.Color(*, r: 'float', g: 'float', b: 'float', a: 'float')
a: float
b: float
g: float
r: float
class wgpu.structs.ColorTargetState(*, format: 'enums.TextureFormatEnum', blend: 'BlendStateStruct | None' = None, write_mask: 'flags.ColorWriteFlags' = 15)
blend: BlendState | dict | None = None
format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str

enums.TextureFormat

write_mask: int | str = 15

flags.ColorWrite

class wgpu.structs.CommandBufferDescriptor(*, label: 'str' = '')
label: str = ''
class wgpu.structs.CommandEncoderDescriptor(*, label: 'str' = '')
label: str = ''
class wgpu.structs.ComputePassDescriptor(*, label: 'str' = '', timestamp_writes: 'ComputePassTimestampWritesStruct | None' = None)
label: str = ''
timestamp_writes: ComputePassTimestampWrites | dict | None = None
class wgpu.structs.ComputePassTimestampWrites(*, query_set: 'classes.GPUQuerySet', beginning_of_pass_write_index: 'int | None' = None, end_of_pass_write_index: 'int | None' = None)
beginning_of_pass_write_index: int | None = None
end_of_pass_write_index: int | None = None
query_set: GPUQuerySet
class wgpu.structs.ComputePipelineDescriptor(*, label: 'str' = '', layout: 'classes.GPUPipelineLayout | enums.AutoLayoutModeEnum', compute: 'ProgrammableStageStruct')
compute: ProgrammableStage | dict
label: str = ''
layout: GPUPipelineLayout | Literal['auto'] | str

GPUPipelineLayout | enums.AutoLayoutMode

class wgpu.structs.CopyExternalImageDestInfo(*, texture: 'classes.GPUTexture', mip_level: 'int' = 0, origin: 'tuple[int, int, int] | Origin3DStruct | None' = None, aspect: 'enums.TextureAspectEnum' = 'all', color_space: 'str' = 'srgb', premultiplied_alpha: 'bool' = False)
aspect: Literal['all', 'stencil-only', 'depth-only'] | str = 'all'

enums.TextureAspect

color_space: str = 'srgb'
mip_level: int = 0
origin: tuple[int, int, int] | Origin3D | dict | None = None
premultiplied_alpha: bool = False
texture: GPUTexture
class wgpu.structs.CopyExternalImageSourceInfo(*, source: 'ArrayLike | CanvasLike | object', origin: 'tuple[int, int] | Origin2DStruct | None' = None, flip_y: 'bool' = False)
flip_y: bool = False
origin: tuple[int, int] | Origin2D | dict | None = None
source: memoryview | object
class wgpu.structs.DepthStencilState(*, format: 'enums.TextureFormatEnum', depth_write_enabled: 'bool | None' = None, depth_compare: 'enums.CompareFunctionEnum | None' = None, stencil_front: 'StencilFaceStateStruct | None' = None, stencil_back: 'StencilFaceStateStruct | None' = None, stencil_read_mask: 'int' = 4294967295, stencil_write_mask: 'int' = 4294967295, depth_bias: 'int' = 0, depth_bias_slope_scale: 'float' = 0, depth_bias_clamp: 'float' = 0)
depth_bias: int = 0
depth_bias_clamp: float = 0
depth_bias_slope_scale: float = 0
depth_compare: Literal['never', 'less', 'equal', 'less-equal', 'greater', 'not-equal', 'greater-equal', 'always'] | str | None = None

enums.CompareFunction

depth_write_enabled: bool | None = None
format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str

enums.TextureFormat

stencil_back: StencilFaceState | dict | None = None
stencil_front: StencilFaceState | dict | None = None
stencil_read_mask: int = 4294967295
stencil_write_mask: int = 4294967295
class wgpu.structs.DeviceDescriptor(*, label: 'str' = '', required_features: 'Sequence[enums.FeatureNameEnum]' = (), required_limits: 'dict[str, int | None] | None' = None, default_queue: 'QueueDescriptorStruct | None' = None)
default_queue: QueueDescriptor | dict | None = None
label: str = ''
required_features: Sequence[Literal['core-features-and-limits', 'depth-clip-control', 'depth32float-stencil8', 'texture-compression-bc', 'texture-compression-bc-sliced-3d', 'texture-compression-etc2', 'texture-compression-astc', 'texture-compression-astc-sliced-3d', 'timestamp-query', 'indirect-first-instance', 'shader-f16', 'rg11b10ufloat-renderable', 'bgra8unorm-storage', 'float32-filterable', 'float32-blendable', 'clip-distances', 'dual-source-blending', 'subgroups', 'texture-formats-tier1', 'texture-formats-tier2', 'primitive-index'] | str] = ()

list[enums.FeatureName]

required_limits: dict[str, int | None] | None = None
class wgpu.structs.Extent3D(*, width: 'int', height: 'int' = 1, depth_or_array_layers: 'int' = 1)
depth_or_array_layers: int = 1
height: int = 1
width: int
class wgpu.structs.ExternalTextureBindingLayout
class wgpu.structs.ExternalTextureDescriptor(*, label: 'str' = '', source: 'ArrayLike | object', color_space: 'str' = 'srgb')
color_space: str = 'srgb'
label: str = ''
source: memoryview | object
class wgpu.structs.FragmentState(*, module: 'classes.GPUShaderModule', entry_point: 'str | None' = None, constants: 'dict[str, float] | None' = None, targets: 'Sequence[ColorTargetStateStruct]')
constants: dict[str, float] | None = None
entry_point: str | None = None
module: GPUShaderModule
targets: Sequence[ColorTargetState | dict]
class wgpu.structs.MultisampleState(*, count: 'int' = 1, mask: 'int' = 4294967295, alpha_to_coverage_enabled: 'bool' = False)
alpha_to_coverage_enabled: bool = False
count: int = 1
mask: int = 4294967295
class wgpu.structs.Origin2D(*, x: 'int' = 0, y: 'int' = 0)
x: int = 0
y: int = 0
class wgpu.structs.Origin3D(*, x: 'int' = 0, y: 'int' = 0, z: 'int' = 0)
x: int = 0
y: int = 0
z: int = 0
class wgpu.structs.PipelineErrorInit(*, reason: 'enums.PipelineErrorReasonEnum')
reason: Literal['validation', 'internal'] | str

enums.PipelineErrorReason

class wgpu.structs.PipelineLayoutDescriptor(*, label: 'str' = '', bind_group_layouts: 'Sequence[classes.GPUBindGroupLayout]')
bind_group_layouts: Sequence[GPUBindGroupLayout]
label: str = ''
class wgpu.structs.PrimitiveState(*, topology: 'enums.PrimitiveTopologyEnum' = 'triangle-list', strip_index_format: 'enums.IndexFormatEnum | None' = None, front_face: 'enums.FrontFaceEnum' = 'ccw', cull_mode: 'enums.CullModeEnum' = 'none', unclipped_depth: 'bool' = False)
cull_mode: Literal['none', 'front', 'back'] | str = 'none'

enums.CullMode

front_face: Literal['ccw', 'cw'] | str = 'ccw'

enums.FrontFace

strip_index_format: Literal['uint16', 'uint32'] | str | None = None

enums.IndexFormat

topology: Literal['point-list', 'line-list', 'line-strip', 'triangle-list', 'triangle-strip'] | str = 'triangle-list'

enums.PrimitiveTopology

unclipped_depth: bool = False
class wgpu.structs.ProgrammableStage(*, module: 'classes.GPUShaderModule', entry_point: 'str | None' = None, constants: 'dict[str, float] | None' = None)
constants: dict[str, float] | None = None
entry_point: str | None = None
module: GPUShaderModule
class wgpu.structs.QuerySetDescriptor(*, label: 'str' = '', type: 'enums.QueryTypeEnum', count: 'int')
count: int
label: str = ''
type: Literal['occlusion', 'timestamp'] | str

enums.QueryType

class wgpu.structs.QueueDescriptor(*, label: 'str' = '')
label: str = ''
class wgpu.structs.RenderBundleDescriptor(*, label: 'str' = '')
label: str = ''
class wgpu.structs.RenderBundleEncoderDescriptor(*, label: 'str' = '', color_formats: 'Sequence[enums.TextureFormatEnum]', depth_stencil_format: 'enums.TextureFormatEnum | None' = None, sample_count: 'int' = 1, depth_read_only: 'bool' = False, stencil_read_only: 'bool' = False)
color_formats: Sequence[Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str]

list[enums.TextureFormat]

depth_read_only: bool = False
depth_stencil_format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str | None = None

enums.TextureFormat

label: str = ''
sample_count: int = 1
stencil_read_only: bool = False
class wgpu.structs.RenderPassColorAttachment(*, view: 'classes.GPUTexture | classes.GPUTextureView', depth_slice: 'int | None' = None, resolve_target: 'classes.GPUTexture | classes.GPUTextureView | None' = None, clear_value: 'tuple[float, float, float, float] | ColorStruct | None' = None, load_op: 'enums.LoadOpEnum', store_op: 'enums.StoreOpEnum')
clear_value: tuple[float, float, float, float] | Color | dict | None = None
depth_slice: int | None = None
load_op: Literal['load', 'clear'] | str

enums.LoadOp

resolve_target: GPUTexture | GPUTextureView | None = None
store_op: Literal['store', 'discard'] | str

enums.StoreOp

view: GPUTexture | GPUTextureView
class wgpu.structs.RenderPassDepthStencilAttachment(*, view: 'classes.GPUTexture | classes.GPUTextureView', depth_clear_value: 'float | None' = None, depth_load_op: 'enums.LoadOpEnum | None' = None, depth_store_op: 'enums.StoreOpEnum | None' = None, depth_read_only: 'bool' = False, stencil_clear_value: 'int' = 0, stencil_load_op: 'enums.LoadOpEnum | None' = None, stencil_store_op: 'enums.StoreOpEnum | None' = None, stencil_read_only: 'bool' = False)
depth_clear_value: float | None = None
depth_load_op: Literal['load', 'clear'] | str | None = None

enums.LoadOp

depth_read_only: bool = False
depth_store_op: Literal['store', 'discard'] | str | None = None

enums.StoreOp

stencil_clear_value: int = 0
stencil_load_op: Literal['load', 'clear'] | str | None = None

enums.LoadOp

stencil_read_only: bool = False
stencil_store_op: Literal['store', 'discard'] | str | None = None

enums.StoreOp

view: GPUTexture | GPUTextureView
class wgpu.structs.RenderPassDescriptor(*, label: 'str' = '', color_attachments: 'Sequence[RenderPassColorAttachmentStruct]', depth_stencil_attachment: 'RenderPassDepthStencilAttachmentStruct | None' = None, occlusion_query_set: 'classes.GPUQuerySet | None' = None, timestamp_writes: 'RenderPassTimestampWritesStruct | None' = None, max_draw_count: 'int' = 50000000)
color_attachments: Sequence[RenderPassColorAttachment | dict]
depth_stencil_attachment: RenderPassDepthStencilAttachment | dict | None = None
label: str = ''
max_draw_count: int = 50000000
occlusion_query_set: GPUQuerySet | None = None
timestamp_writes: RenderPassTimestampWrites | dict | None = None
class wgpu.structs.RenderPassLayout(*, label: 'str' = '', color_formats: 'Sequence[enums.TextureFormatEnum]', depth_stencil_format: 'enums.TextureFormatEnum | None' = None, sample_count: 'int' = 1)
color_formats: Sequence[Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str]

list[enums.TextureFormat]

depth_stencil_format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str | None = None

enums.TextureFormat

label: str = ''
sample_count: int = 1
class wgpu.structs.RenderPassTimestampWrites(*, query_set: 'classes.GPUQuerySet', beginning_of_pass_write_index: 'int | None' = None, end_of_pass_write_index: 'int | None' = None)
beginning_of_pass_write_index: int | None = None
end_of_pass_write_index: int | None = None
query_set: GPUQuerySet
class wgpu.structs.RenderPipelineDescriptor(*, label: 'str' = '', layout: 'classes.GPUPipelineLayout | enums.AutoLayoutModeEnum', vertex: 'VertexStateStruct', primitive: 'PrimitiveStateStruct | None' = None, depth_stencil: 'DepthStencilStateStruct | None' = None, multisample: 'MultisampleStateStruct | None' = None, fragment: 'FragmentStateStruct | None' = None)
depth_stencil: DepthStencilState | dict | None = None
fragment: FragmentState | dict | None = None
label: str = ''
layout: GPUPipelineLayout | Literal['auto'] | str

GPUPipelineLayout | enums.AutoLayoutMode

multisample: MultisampleState | dict | None = None
primitive: PrimitiveState | dict | None = None
vertex: VertexState | dict
class wgpu.structs.RequestAdapterOptions(*, feature_level: 'str' = 'core', power_preference: 'enums.PowerPreferenceEnum | None' = None, force_fallback_adapter: 'bool' = False, xr_compatible: 'bool' = False)
feature_level: str = 'core'
force_fallback_adapter: bool = False
power_preference: Literal['low-power', 'high-performance'] | str | None = None

enums.PowerPreference

xr_compatible: bool = False
class wgpu.structs.SamplerBindingLayout(*, type: 'enums.SamplerBindingTypeEnum' = 'filtering')
type: Literal['filtering', 'non-filtering', 'comparison'] | str = 'filtering'

enums.SamplerBindingType

class wgpu.structs.SamplerDescriptor(*, label: 'str' = '', address_mode_u: 'enums.AddressModeEnum' = 'clamp-to-edge', address_mode_v: 'enums.AddressModeEnum' = 'clamp-to-edge', address_mode_w: 'enums.AddressModeEnum' = 'clamp-to-edge', mag_filter: 'enums.FilterModeEnum' = 'nearest', min_filter: 'enums.FilterModeEnum' = 'nearest', mipmap_filter: 'enums.MipmapFilterModeEnum' = 'nearest', lod_min_clamp: 'float' = 0, lod_max_clamp: 'float' = 32, compare: 'enums.CompareFunctionEnum | None' = None, max_anisotropy: 'int' = 1)
address_mode_u: Literal['clamp-to-edge', 'repeat', 'mirror-repeat'] | str = 'clamp-to-edge'

enums.AddressMode

address_mode_v: Literal['clamp-to-edge', 'repeat', 'mirror-repeat'] | str = 'clamp-to-edge'

enums.AddressMode

address_mode_w: Literal['clamp-to-edge', 'repeat', 'mirror-repeat'] | str = 'clamp-to-edge'

enums.AddressMode

compare: Literal['never', 'less', 'equal', 'less-equal', 'greater', 'not-equal', 'greater-equal', 'always'] | str | None = None

enums.CompareFunction

label: str = ''
lod_max_clamp: float = 32
lod_min_clamp: float = 0
mag_filter: Literal['nearest', 'linear'] | str = 'nearest'

enums.FilterMode

max_anisotropy: int = 1
min_filter: Literal['nearest', 'linear'] | str = 'nearest'

enums.FilterMode

mipmap_filter: Literal['nearest', 'linear'] | str = 'nearest'

enums.MipmapFilterMode

class wgpu.structs.ShaderModuleCompilationHint(*, entry_point: 'str', layout: 'classes.GPUPipelineLayout | enums.AutoLayoutModeEnum | None' = None)
entry_point: str
layout: GPUPipelineLayout | Literal['auto'] | str | None = None

GPUPipelineLayout | enums.AutoLayoutMode

class wgpu.structs.ShaderModuleDescriptor(*, label: 'str' = '', code: 'str', compilation_hints: 'Sequence[ShaderModuleCompilationHintStruct]' = ())
code: str
compilation_hints: Sequence[ShaderModuleCompilationHint | dict] = ()
label: str = ''
class wgpu.structs.StencilFaceState(*, compare: 'enums.CompareFunctionEnum' = 'always', fail_op: 'enums.StencilOperationEnum' = 'keep', depth_fail_op: 'enums.StencilOperationEnum' = 'keep', pass_op: 'enums.StencilOperationEnum' = 'keep')
compare: Literal['never', 'less', 'equal', 'less-equal', 'greater', 'not-equal', 'greater-equal', 'always'] | str = 'always'

enums.CompareFunction

depth_fail_op: Literal['keep', 'zero', 'replace', 'invert', 'increment-clamp', 'decrement-clamp', 'increment-wrap', 'decrement-wrap'] | str = 'keep'

enums.StencilOperation

fail_op: Literal['keep', 'zero', 'replace', 'invert', 'increment-clamp', 'decrement-clamp', 'increment-wrap', 'decrement-wrap'] | str = 'keep'

enums.StencilOperation

pass_op: Literal['keep', 'zero', 'replace', 'invert', 'increment-clamp', 'decrement-clamp', 'increment-wrap', 'decrement-wrap'] | str = 'keep'

enums.StencilOperation

class wgpu.structs.StorageTextureBindingLayout(*, access: 'enums.StorageTextureAccessEnum' = 'write-only', format: 'enums.TextureFormatEnum', view_dimension: 'enums.TextureViewDimensionEnum' = '2d')
access: Literal['write-only', 'read-only', 'read-write'] | str = 'write-only'

enums.StorageTextureAccess

format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str

enums.TextureFormat

view_dimension: Literal['1d', '2d', '2d-array', 'cube', 'cube-array', '3d'] | str = '2d'

enums.TextureViewDimension

class wgpu.structs.TexelCopyBufferInfo(*, offset: 'int' = 0, bytes_per_row: 'int | None' = None, rows_per_image: 'int | None' = None, buffer: 'classes.GPUBuffer')
buffer: GPUBuffer
bytes_per_row: int | None = None
offset: int = 0
rows_per_image: int | None = None
class wgpu.structs.TexelCopyBufferLayout(*, offset: 'int' = 0, bytes_per_row: 'int | None' = None, rows_per_image: 'int | None' = None)
bytes_per_row: int | None = None
offset: int = 0
rows_per_image: int | None = None
class wgpu.structs.TexelCopyTextureInfo(*, texture: 'classes.GPUTexture', mip_level: 'int' = 0, origin: 'tuple[int, int, int] | Origin3DStruct | None' = None, aspect: 'enums.TextureAspectEnum' = 'all')
aspect: Literal['all', 'stencil-only', 'depth-only'] | str = 'all'

enums.TextureAspect

mip_level: int = 0
origin: tuple[int, int, int] | Origin3D | dict | None = None
texture: GPUTexture
class wgpu.structs.TextureBindingLayout(*, sample_type: 'enums.TextureSampleTypeEnum' = 'float', view_dimension: 'enums.TextureViewDimensionEnum' = '2d', multisampled: 'bool' = False)
multisampled: bool = False
sample_type: Literal['float', 'unfilterable-float', 'depth', 'sint', 'uint'] | str = 'float'

enums.TextureSampleType

view_dimension: Literal['1d', '2d', '2d-array', 'cube', 'cube-array', '3d'] | str = '2d'

enums.TextureViewDimension

class wgpu.structs.TextureDescriptor(*, label: 'str' = '', size: 'tuple[int, int, int] | Extent3DStruct', mip_level_count: 'int' = 1, sample_count: 'int' = 1, dimension: 'enums.TextureDimensionEnum' = '2d', format: 'enums.TextureFormatEnum', usage: 'flags.TextureUsageFlags', view_formats: 'Sequence[enums.TextureFormatEnum]' = ())
dimension: Literal['1d', '2d', '3d'] | str = '2d'

enums.TextureDimension

format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str

enums.TextureFormat

label: str = ''
mip_level_count: int = 1
sample_count: int = 1
size: tuple[int, int, int] | Extent3D | dict
usage: int | str

flags.TextureUsage

view_formats: Sequence[Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str] = ()

list[enums.TextureFormat]

class wgpu.structs.TextureViewDescriptor(*, label: 'str' = '', format: 'enums.TextureFormatEnum | None' = None, dimension: 'enums.TextureViewDimensionEnum | None' = None, usage: 'flags.TextureUsageFlags' = 0, aspect: 'enums.TextureAspectEnum' = 'all', base_mip_level: 'int' = 0, mip_level_count: 'int | None' = None, base_array_layer: 'int' = 0, array_layer_count: 'int | None' = None)
array_layer_count: int | None = None
aspect: Literal['all', 'stencil-only', 'depth-only'] | str = 'all'

enums.TextureAspect

base_array_layer: int = 0
base_mip_level: int = 0
dimension: Literal['1d', '2d', '2d-array', 'cube', 'cube-array', '3d'] | str | None = None

enums.TextureViewDimension

format: Literal['r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16unorm', 'r16snorm', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16unorm', 'rgba16snorm', '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'] | str | None = None

enums.TextureFormat

label: str = ''
mip_level_count: int | None = None
usage: int | str = 0

flags.TextureUsage

class wgpu.structs.UncapturedErrorEventInit(*, error: 'classes.GPUError')
error: GPUError
class wgpu.structs.VertexAttribute(*, format: 'enums.VertexFormatEnum', offset: 'int', shader_location: 'int')
format: Literal['uint8', 'uint8x2', 'uint8x4', 'sint8', 'sint8x2', 'sint8x4', 'unorm8', 'unorm8x2', 'unorm8x4', 'snorm8', 'snorm8x2', 'snorm8x4', 'uint16', 'uint16x2', 'uint16x4', 'sint16', 'sint16x2', 'sint16x4', 'unorm16', 'unorm16x2', 'unorm16x4', 'snorm16', 'snorm16x2', 'snorm16x4', 'float16', 'float16x2', 'float16x4', 'float32', 'float32x2', 'float32x3', 'float32x4', 'uint32', 'uint32x2', 'uint32x3', 'uint32x4', 'sint32', 'sint32x2', 'sint32x3', 'sint32x4', 'unorm10-10-10-2', 'unorm8x4-bgra'] | str

enums.VertexFormat

offset: int
shader_location: int
class wgpu.structs.VertexBufferLayout(*, array_stride: 'int', step_mode: 'enums.VertexStepModeEnum' = 'vertex', attributes: 'Sequence[VertexAttributeStruct]')
array_stride: int
attributes: Sequence[VertexAttribute | dict]
step_mode: Literal['vertex', 'instance'] | str = 'vertex'

enums.VertexStepMode

class wgpu.structs.VertexState(*, module: 'classes.GPUShaderModule', entry_point: 'str | None' = None, constants: 'dict[str, float] | None' = None, buffers: 'Sequence[VertexBufferLayoutStruct]' = ())
buffers: Sequence[VertexBufferLayout | dict] = ()
constants: dict[str, float] | None = None
entry_point: str | None = None
module: GPUShaderModule