"""
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"``.
"""

from typing import Literal

from ._coreutils import BaseEnum as _BaseEnum


class Enum(_BaseEnum):
    """Base enum class for wgpu."""

    pass


# CODE BELOW THIS POINT IS AUTOGENERATED - DO NOT EDIT


# There are 34 enums

__all__ = [
    "AddressMode",
    "AutoLayoutMode",
    "BlendFactor",
    "BlendOperation",
    "BufferBindingType",
    "BufferMapState",
    "CanvasAlphaMode",
    "CanvasToneMappingMode",
    "CompareFunction",
    "CompilationMessageType",
    "CullMode",
    "DeviceLostReason",
    "ErrorFilter",
    "FeatureName",
    "FilterMode",
    "FrontFace",
    "IndexFormat",
    "LoadOp",
    "MipmapFilterMode",
    "PipelineErrorReason",
    "PowerPreference",
    "PrimitiveTopology",
    "QueryType",
    "SamplerBindingType",
    "StencilOperation",
    "StorageTextureAccess",
    "StoreOp",
    "TextureAspect",
    "TextureDimension",
    "TextureFormat",
    "TextureSampleType",
    "TextureViewDimension",
    "VertexFormat",
    "VertexStepMode",
]


PowerPreferenceEnum = Literal["low-power", "high-performance"] | str


class PowerPreference(Enum):
    low_power = "low-power"
    high_performance = "high-performance"


FeatureNameEnum = (
    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",
        "texture-component-swizzle",
    ]
    | str
)


class FeatureName(Enum):
    core_features_and_limits = "core-features-and-limits"
    depth_clip_control = "depth-clip-control"
    depth32float_stencil8 = "depth32float-stencil8"
    texture_compression_bc = "texture-compression-bc"
    texture_compression_bc_sliced_d3 = "texture-compression-bc-sliced-3d"
    texture_compression_etc2 = "texture-compression-etc2"
    texture_compression_astc = "texture-compression-astc"
    texture_compression_astc_sliced_d3 = "texture-compression-astc-sliced-3d"
    timestamp_query = "timestamp-query"
    indirect_first_instance = "indirect-first-instance"
    shader_f16 = "shader-f16"
    rg11b10ufloat_renderable = "rg11b10ufloat-renderable"
    bgra8unorm_storage = "bgra8unorm-storage"
    float32_filterable = "float32-filterable"
    float32_blendable = "float32-blendable"
    clip_distances = "clip-distances"
    dual_source_blending = "dual-source-blending"
    subgroups = "subgroups"
    texture_formats_tier1 = "texture-formats-tier1"
    texture_formats_tier2 = "texture-formats-tier2"
    primitive_index = "primitive-index"
    texture_component_swizzle = "texture-component-swizzle"


BufferMapStateEnum = Literal["unmapped", "pending", "mapped"] | str


class BufferMapState(Enum):
    unmapped = "unmapped"
    pending = "pending"
    mapped = "mapped"


TextureDimensionEnum = Literal["1d", "2d", "3d"] | str


class TextureDimension(Enum):
    d1 = "1d"
    d2 = "2d"
    d3 = "3d"


TextureViewDimensionEnum = (
    Literal["1d", "2d", "2d-array", "cube", "cube-array", "3d"] | str
)


class TextureViewDimension(Enum):
    d1 = "1d"
    d2 = "2d"
    d2_array = "2d-array"
    cube = "cube"
    cube_array = "cube-array"
    d3 = "3d"


TextureAspectEnum = Literal["all", "stencil-only", "depth-only"] | str


class TextureAspect(Enum):
    all = "all"
    stencil_only = "stencil-only"
    depth_only = "depth-only"


TextureFormatEnum = (
    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
)


class TextureFormat(Enum):
    r8unorm = "r8unorm"
    r8snorm = "r8snorm"
    r8uint = "r8uint"
    r8sint = "r8sint"
    r16unorm = "r16unorm"
    r16snorm = "r16snorm"
    r16uint = "r16uint"
    r16sint = "r16sint"
    r16float = "r16float"
    rg8unorm = "rg8unorm"
    rg8snorm = "rg8snorm"
    rg8uint = "rg8uint"
    rg8sint = "rg8sint"
    r32uint = "r32uint"
    r32sint = "r32sint"
    r32float = "r32float"
    rg16unorm = "rg16unorm"
    rg16snorm = "rg16snorm"
    rg16uint = "rg16uint"
    rg16sint = "rg16sint"
    rg16float = "rg16float"
    rgba8unorm = "rgba8unorm"
    rgba8unorm_srgb = "rgba8unorm-srgb"
    rgba8snorm = "rgba8snorm"
    rgba8uint = "rgba8uint"
    rgba8sint = "rgba8sint"
    bgra8unorm = "bgra8unorm"
    bgra8unorm_srgb = "bgra8unorm-srgb"
    rgb9e5ufloat = "rgb9e5ufloat"
    rgb10a2uint = "rgb10a2uint"
    rgb10a2unorm = "rgb10a2unorm"
    rg11b10ufloat = "rg11b10ufloat"
    rg32uint = "rg32uint"
    rg32sint = "rg32sint"
    rg32float = "rg32float"
    rgba16unorm = "rgba16unorm"
    rgba16snorm = "rgba16snorm"
    rgba16uint = "rgba16uint"
    rgba16sint = "rgba16sint"
    rgba16float = "rgba16float"
    rgba32uint = "rgba32uint"
    rgba32sint = "rgba32sint"
    rgba32float = "rgba32float"
    stencil8 = "stencil8"
    depth16unorm = "depth16unorm"
    depth24plus = "depth24plus"
    depth24plus_stencil8 = "depth24plus-stencil8"
    depth32float = "depth32float"
    depth32float_stencil8 = "depth32float-stencil8"
    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_unorm = "bc4-r-unorm"
    bc4_r_snorm = "bc4-r-snorm"
    bc5_rg_unorm = "bc5-rg-unorm"
    bc5_rg_snorm = "bc5-rg-snorm"
    bc6h_rgb_ufloat = "bc6h-rgb-ufloat"
    bc6h_rgb_float = "bc6h-rgb-float"
    bc7_rgba_unorm = "bc7-rgba-unorm"
    bc7_rgba_unorm_srgb = "bc7-rgba-unorm-srgb"
    etc2_rgb8unorm = "etc2-rgb8unorm"
    etc2_rgb8unorm_srgb = "etc2-rgb8unorm-srgb"
    etc2_rgb8a1unorm = "etc2-rgb8a1unorm"
    etc2_rgb8a1unorm_srgb = "etc2-rgb8a1unorm-srgb"
    etc2_rgba8unorm = "etc2-rgba8unorm"
    etc2_rgba8unorm_srgb = "etc2-rgba8unorm-srgb"
    eac_r11unorm = "eac-r11unorm"
    eac_r11snorm = "eac-r11snorm"
    eac_rg11unorm = "eac-rg11unorm"
    eac_rg11snorm = "eac-rg11snorm"
    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"
    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_10x10_unorm = "astc-10x10-unorm"
    astc_10x10_unorm_srgb = "astc-10x10-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"


AddressModeEnum = Literal["clamp-to-edge", "repeat", "mirror-repeat"] | str


class AddressMode(Enum):
    clamp_to_edge = "clamp-to-edge"
    repeat = "repeat"
    mirror_repeat = "mirror-repeat"


FilterModeEnum = Literal["nearest", "linear"] | str


class FilterMode(Enum):
    nearest = "nearest"
    linear = "linear"


MipmapFilterModeEnum = Literal["nearest", "linear"] | str


class MipmapFilterMode(Enum):
    nearest = "nearest"
    linear = "linear"


CompareFunctionEnum = (
    Literal[
        "never",
        "less",
        "equal",
        "less-equal",
        "greater",
        "not-equal",
        "greater-equal",
        "always",
    ]
    | str
)


class CompareFunction(Enum):
    never = "never"
    less = "less"
    equal = "equal"
    less_equal = "less-equal"
    greater = "greater"
    not_equal = "not-equal"
    greater_equal = "greater-equal"
    always = "always"


BufferBindingTypeEnum = Literal["uniform", "storage", "read-only-storage"] | str


class BufferBindingType(Enum):
    uniform = "uniform"
    storage = "storage"
    read_only_storage = "read-only-storage"


SamplerBindingTypeEnum = Literal["filtering", "non-filtering", "comparison"] | str


class SamplerBindingType(Enum):
    filtering = "filtering"
    non_filtering = "non-filtering"
    comparison = "comparison"


TextureSampleTypeEnum = (
    Literal["float", "unfilterable-float", "depth", "sint", "uint"] | str
)


class TextureSampleType(Enum):
    float = "float"
    unfilterable_float = "unfilterable-float"
    depth = "depth"
    sint = "sint"
    uint = "uint"


StorageTextureAccessEnum = Literal["write-only", "read-only", "read-write"] | str


class StorageTextureAccess(Enum):
    write_only = "write-only"
    read_only = "read-only"
    read_write = "read-write"


CompilationMessageTypeEnum = Literal["error", "warning", "info"] | str


class CompilationMessageType(Enum):
    error = "error"
    warning = "warning"
    info = "info"


PipelineErrorReasonEnum = Literal["validation", "internal"] | str


class PipelineErrorReason(Enum):
    validation = "validation"
    internal = "internal"


AutoLayoutModeEnum = Literal["auto"] | str


class AutoLayoutMode(Enum):
    auto = "auto"


PrimitiveTopologyEnum = (
    Literal["point-list", "line-list", "line-strip", "triangle-list", "triangle-strip"]
    | str
)


class PrimitiveTopology(Enum):
    point_list = "point-list"
    line_list = "line-list"
    line_strip = "line-strip"
    triangle_list = "triangle-list"
    triangle_strip = "triangle-strip"


FrontFaceEnum = Literal["ccw", "cw"] | str


class FrontFace(Enum):
    ccw = "ccw"
    cw = "cw"


CullModeEnum = Literal["none", "front", "back"] | str


class CullMode(Enum):
    none = "none"
    front = "front"
    back = "back"


BlendFactorEnum = (
    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
)


class BlendFactor(Enum):
    zero = "zero"
    one = "one"
    src = "src"
    one_minus_src = "one-minus-src"
    src_alpha = "src-alpha"
    one_minus_src_alpha = "one-minus-src-alpha"
    dst = "dst"
    one_minus_dst = "one-minus-dst"
    dst_alpha = "dst-alpha"
    one_minus_dst_alpha = "one-minus-dst-alpha"
    src_alpha_saturated = "src-alpha-saturated"
    constant = "constant"
    one_minus_constant = "one-minus-constant"
    src1 = "src1"
    one_minus_src1 = "one-minus-src1"
    src1_alpha = "src1-alpha"
    one_minus_src1_alpha = "one-minus-src1-alpha"


BlendOperationEnum = Literal["add", "subtract", "reverse-subtract", "min", "max"] | str


class BlendOperation(Enum):
    add = "add"
    subtract = "subtract"
    reverse_subtract = "reverse-subtract"
    min = "min"
    max = "max"


StencilOperationEnum = (
    Literal[
        "keep",
        "zero",
        "replace",
        "invert",
        "increment-clamp",
        "decrement-clamp",
        "increment-wrap",
        "decrement-wrap",
    ]
    | str
)


class StencilOperation(Enum):
    keep = "keep"
    zero = "zero"
    replace = "replace"
    invert = "invert"
    increment_clamp = "increment-clamp"
    decrement_clamp = "decrement-clamp"
    increment_wrap = "increment-wrap"
    decrement_wrap = "decrement-wrap"


IndexFormatEnum = Literal["uint16", "uint32"] | str


class IndexFormat(Enum):
    uint16 = "uint16"
    uint32 = "uint32"


VertexFormatEnum = (
    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
)


class VertexFormat(Enum):
    uint8 = "uint8"
    uint8x2 = "uint8x2"
    uint8x4 = "uint8x4"
    sint8 = "sint8"
    sint8x2 = "sint8x2"
    sint8x4 = "sint8x4"
    unorm8 = "unorm8"
    unorm8x2 = "unorm8x2"
    unorm8x4 = "unorm8x4"
    snorm8 = "snorm8"
    snorm8x2 = "snorm8x2"
    snorm8x4 = "snorm8x4"
    uint16 = "uint16"
    uint16x2 = "uint16x2"
    uint16x4 = "uint16x4"
    sint16 = "sint16"
    sint16x2 = "sint16x2"
    sint16x4 = "sint16x4"
    unorm16 = "unorm16"
    unorm16x2 = "unorm16x2"
    unorm16x4 = "unorm16x4"
    snorm16 = "snorm16"
    snorm16x2 = "snorm16x2"
    snorm16x4 = "snorm16x4"
    float16 = "float16"
    float16x2 = "float16x2"
    float16x4 = "float16x4"
    float32 = "float32"
    float32x2 = "float32x2"
    float32x3 = "float32x3"
    float32x4 = "float32x4"
    uint32 = "uint32"
    uint32x2 = "uint32x2"
    uint32x3 = "uint32x3"
    uint32x4 = "uint32x4"
    sint32 = "sint32"
    sint32x2 = "sint32x2"
    sint32x3 = "sint32x3"
    sint32x4 = "sint32x4"
    unorm10_10_10_2 = "unorm10-10-10-2"
    unorm8x4_bgra = "unorm8x4-bgra"


VertexStepModeEnum = Literal["vertex", "instance"] | str


class VertexStepMode(Enum):
    vertex = "vertex"
    instance = "instance"


LoadOpEnum = Literal["load", "clear"] | str


class LoadOp(Enum):
    load = "load"
    clear = "clear"


StoreOpEnum = Literal["store", "discard"] | str


class StoreOp(Enum):
    store = "store"
    discard = "discard"


QueryTypeEnum = Literal["occlusion", "timestamp"] | str


class QueryType(Enum):
    occlusion = "occlusion"
    timestamp = "timestamp"


CanvasAlphaModeEnum = Literal["opaque", "premultiplied"] | str


class CanvasAlphaMode(Enum):
    opaque = "opaque"
    premultiplied = "premultiplied"


CanvasToneMappingModeEnum = Literal["standard", "extended"] | str


class CanvasToneMappingMode(Enum):
    standard = "standard"
    extended = "extended"


DeviceLostReasonEnum = Literal["unknown", "destroyed"] | str


class DeviceLostReason(Enum):
    unknown = "unknown"
    destroyed = "destroyed"


ErrorFilterEnum = Literal["validation", "out-of-memory", "internal"] | str


class ErrorFilter(Enum):
    validation = "validation"
    out_of_memory = "out-of-memory"
    internal = "internal"
