Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __iter__(self):
return iter(
[getattr(self, key) for key in dir(self) if not key.startswith("_")]
)
def __repr__(self):
options = ", ".join(f"'{x}'" for x in self)
if _use_sphinx_repr: # no-cover
return options
return f"<{self.__class__.__name__} {self._name}: {options}>"
# %% Enums (26)
PowerPreference = Enum(
"PowerPreference", low_power="low-power", high_performance="high-performance",
) #:
ExtensionName = Enum(
"ExtensionName",
texture_compression_bc="texture-compression-bc",
pipeline_statistics_query="pipeline-statistics-query",
timestamp_query="timestamp-query",
) #:
TextureDimension = Enum("TextureDimension", d1="1d", d2="2d", d3="3d",) #:
TextureViewDimension = Enum(
"TextureViewDimension",
d1="1d",
d2="2d",
always="always",
) #:
BindingType = Enum(
"BindingType",
uniform_buffer="uniform-buffer",
storage_buffer="storage-buffer",
readonly_storage_buffer="readonly-storage-buffer",
sampler="sampler",
comparison_sampler="comparison-sampler",
sampled_texture="sampled-texture",
readonly_storage_texture="readonly-storage-texture",
writeonly_storage_texture="writeonly-storage-texture",
) #:
CompilationMessageType = Enum(
"CompilationMessageType", error="error", warning="warning", info="info",
) #:
PrimitiveTopology = Enum(
"PrimitiveTopology",
point_list="point-list",
line_list="line-list",
line_strip="line-strip",
triangle_list="triangle-list",
triangle_strip="triangle-strip",
) #:
FrontFace = Enum("FrontFace", ccw="ccw", cw="cw",) #:
CullMode = Enum("CullMode", none="none", front="front", back="back",) #:
) #:
TextureComponentType = Enum(
"TextureComponentType", float="float", sint="sint", uint="uint",
) #:
AddressMode = Enum(
"AddressMode",
clamp_to_edge="clamp-to-edge",
repeat="repeat",
mirror_repeat="mirror-repeat",
) #:
FilterMode = Enum("FilterMode", nearest="nearest", linear="linear",) #:
CompareFunction = Enum(
"CompareFunction",
never="never",
less="less",
equal="equal",
less_equal="less-equal",
greater="greater",
not_equal="not-equal",
greater_equal="greater-equal",
always="always",
) #:
BindingType = Enum(
"BindingType",
uniform_buffer="uniform-buffer",
storage_buffer="storage-buffer",
readonly_storage_buffer="readonly-storage-buffer",
# %% Enums (26)
PowerPreference = Enum(
"PowerPreference", low_power="low-power", high_performance="high-performance",
) #:
ExtensionName = Enum(
"ExtensionName",
texture_compression_bc="texture-compression-bc",
pipeline_statistics_query="pipeline-statistics-query",
timestamp_query="timestamp-query",
) #:
TextureDimension = Enum("TextureDimension", d1="1d", d2="2d", d3="3d",) #:
TextureViewDimension = Enum(
"TextureViewDimension",
d1="1d",
d2="2d",
d2_array="2d-array",
cube="cube",
cube_array="cube-array",
d3="3d",
) #:
TextureAspect = Enum(
"TextureAspect", all="all", stencil_only="stencil-only", depth_only="depth-only",
) #:
TextureFormat = Enum(
# %% Enums (26)
PowerPreference = Enum(
"PowerPreference", low_power="low-power", high_performance="high-performance",
) #:
ExtensionName = Enum(
"ExtensionName",
texture_compression_bc="texture-compression-bc",
pipeline_statistics_query="pipeline-statistics-query",
timestamp_query="timestamp-query",
) #:
TextureDimension = Enum("TextureDimension", d1="1d", d2="2d", d3="3d",) #:
TextureViewDimension = Enum(
"TextureViewDimension",
d1="1d",
d2="2d",
d2_array="2d-array",
cube="cube",
cube_array="cube-array",
d3="3d",
) #:
TextureAspect = Enum(
"TextureAspect", all="all", stencil_only="stencil-only", depth_only="depth-only",
) #:
TextureFormat = Enum(
"TextureFormat",
r8unorm="r8unorm",
CompilationMessageType = Enum(
"CompilationMessageType", error="error", warning="warning", info="info",
) #:
PrimitiveTopology = Enum(
"PrimitiveTopology",
point_list="point-list",
line_list="line-list",
line_strip="line-strip",
triangle_list="triangle-list",
triangle_strip="triangle-strip",
) #:
FrontFace = Enum("FrontFace", ccw="ccw", cw="cw",) #:
CullMode = Enum("CullMode", none="none", front="front", back="back",) #:
BlendFactor = Enum(
"BlendFactor",
zero="zero",
one="one",
src_color="src-color",
one_minus_src_color="one-minus-src-color",
src_alpha="src-alpha",
one_minus_src_alpha="one-minus-src-alpha",
dst_color="dst-color",
one_minus_dst_color="one-minus-dst-color",
dst_alpha="dst-alpha",
one_minus_dst_alpha="one-minus-dst-alpha",
src_alpha_saturated="src-alpha-saturated",
blend_color="blend-color",
one_minus_blend_color="one-minus-blend-color",
float4="float4",
uint="uint",
uint2="uint2",
uint3="uint3",
uint4="uint4",
int="int",
int2="int2",
int3="int3",
int4="int4",
) #:
InputStepMode = Enum("InputStepMode", vertex="vertex", instance="instance",) #:
LoadOp = Enum("LoadOp", load="load",) #:
StoreOp = Enum("StoreOp", store="store", clear="clear",) #:
QueryType = Enum(
"QueryType",
occlusion="occlusion",
pipeline_statistics="pipeline-statistics",
timestamp="timestamp",
) #:
PipelineStatisticName = Enum(
"PipelineStatisticName",
vertex_shader_invocations="vertex-shader-invocations",
clipper_invocations="clipper-invocations",
clipper_primitives_out="clipper-primitives-out",
fragment_shader_invocations="fragment-shader-invocations",
compute_shader_invocations="compute-shader-invocations",
) #:
) #:
InputStepMode = Enum("InputStepMode", vertex="vertex", instance="instance",) #:
LoadOp = Enum("LoadOp", load="load",) #:
StoreOp = Enum("StoreOp", store="store", clear="clear",) #:
QueryType = Enum(
"QueryType",
occlusion="occlusion",
pipeline_statistics="pipeline-statistics",
timestamp="timestamp",
) #:
PipelineStatisticName = Enum(
"PipelineStatisticName",
vertex_shader_invocations="vertex-shader-invocations",
clipper_invocations="clipper-invocations",
clipper_primitives_out="clipper-primitives-out",
fragment_shader_invocations="fragment-shader-invocations",
compute_shader_invocations="compute-shader-invocations",
) #:
ErrorFilter = Enum(
"ErrorFilter", none="none", out_of_memory="out-of-memory", validation="validation",
) #:
half4="half4",
float="float",
float2="float2",
float3="float3",
float4="float4",
uint="uint",
uint2="uint2",
uint3="uint3",
uint4="uint4",
int="int",
int2="int2",
int3="int3",
int4="int4",
) #:
InputStepMode = Enum("InputStepMode", vertex="vertex", instance="instance",) #:
LoadOp = Enum("LoadOp", load="load",) #:
StoreOp = Enum("StoreOp", store="store", clear="clear",) #:
QueryType = Enum(
"QueryType",
occlusion="occlusion",
pipeline_statistics="pipeline-statistics",
timestamp="timestamp",
) #:
PipelineStatisticName = Enum(
"PipelineStatisticName",
vertex_shader_invocations="vertex-shader-invocations",
clipper_invocations="clipper-invocations",
)
def __repr__(self):
options = ", ".join(f"'{x}'" for x in self)
if _use_sphinx_repr: # no-cover
return options
return f"<{self.__class__.__name__} {self._name}: {options}>"
# %% Enums (26)
PowerPreference = Enum(
"PowerPreference", low_power="low-power", high_performance="high-performance",
) #:
ExtensionName = Enum(
"ExtensionName",
texture_compression_bc="texture-compression-bc",
pipeline_statistics_query="pipeline-statistics-query",
timestamp_query="timestamp-query",
) #:
TextureDimension = Enum("TextureDimension", d1="1d", d2="2d", d3="3d",) #:
TextureViewDimension = Enum(
"TextureViewDimension",
d1="1d",
d2="2d",
d2_array="2d-array",
cube="cube",
cube_array="cube-array",
d3="3d",