From 806ec0d147d1105286f045435e379a20ed93d8c7 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 07:55:10 -0700 Subject: [PATCH] gpu: add PipelineStatisticName enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 9 --------- gpu/src/types.zig | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 62e1c498..0dc9bb37 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,14 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUPipelineStatisticName { - WGPUPipelineStatisticName_VertexShaderInvocations = 0x00000000, - WGPUPipelineStatisticName_ClipperInvocations = 0x00000001, - WGPUPipelineStatisticName_ClipperPrimitivesOut = 0x00000002, - WGPUPipelineStatisticName_FragmentShaderInvocations = 0x00000003, - WGPUPipelineStatisticName_ComputeShaderInvocations = 0x00000004, - WGPUPipelineStatisticName_Force32 = 0x7FFFFFFF -} WGPUPipelineStatisticName; - typedef enum WGPUPowerPreference { WGPUPowerPreference_Undefined = 0x00000000, WGPUPowerPreference_LowPower = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 005a7bbd..41250532 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -157,6 +157,14 @@ pub const LoggingType = enum(u32) { err = 0x00000003, }; +pub const PipelineStatisticName = enum(u32) { + vertex_shader_invocations = 0x00000000, + clipper_invocations = 0x00000001, + clipper_primitives_out = 0x00000002, + fragment_shader_invocations = 0x00000003, + compute_shader_invocations = 0x00000004, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }