From c38edecf2f6a649dc0c0dfe197032c9047201c5c Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 06:46:06 -0700 Subject: [PATCH] gpu: add FeatureName enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 19 ------------------- gpu/src/types.zig | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 65366a8e..c18613db 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,24 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUFeatureName { - WGPUFeatureName_Undefined = 0x00000000, - WGPUFeatureName_DepthClipControl = 0x00000001, - WGPUFeatureName_Depth32FloatStencil8 = 0x00000002, - WGPUFeatureName_TimestampQuery = 0x00000003, - WGPUFeatureName_PipelineStatisticsQuery = 0x00000004, - WGPUFeatureName_TextureCompressionBC = 0x00000005, - WGPUFeatureName_TextureCompressionETC2 = 0x00000006, - WGPUFeatureName_TextureCompressionASTC = 0x00000007, - WGPUFeatureName_IndirectFirstInstance = 0x00000008, - WGPUFeatureName_DepthClamping = 0x000003E8, - WGPUFeatureName_DawnShaderFloat16 = 0x000003E9, - WGPUFeatureName_DawnInternalUsages = 0x000003EA, - WGPUFeatureName_DawnMultiPlanarFormats = 0x000003EB, - WGPUFeatureName_DawnNative = 0x000003EC, - WGPUFeatureName_ChromiumExperimentalDp4a = 0x000003ED, - WGPUFeatureName_Force32 = 0x7FFFFFFF -} WGPUFeatureName; - typedef enum WGPUFilterMode { WGPUFilterMode_Nearest = 0x00000000, WGPUFilterMode_Linear = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index a795b971..5a6c2f13 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -110,6 +110,24 @@ pub const ErrorType = enum(u32) { device_lost = 0x00000004, }; +pub const FeatureName = enum(u32) { + undef = 0x00000000, + depth_clip_control = 0x00000001, + depth32_float_stencil8 = 0x00000002, + timestamp_query = 0x00000003, + pipeline_statistics_query = 0x00000004, + texture_compression_bc = 0x00000005, + texture_compression_etc2 = 0x00000006, + texture_compression_astc = 0x00000007, + indirect_first_instance = 0x00000008, + depth_clamping = 0x000003e8, + dawn_shader_float16 = 0x000003e9, + dawn_internal_usages = 0x000003ea, + dawn_multi_planar_formats = 0x000003eb, + dawn_native = 0x000003ec, + chromium_experimental_dp4a = 0x000003ed, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }