gpu: add PowerPreference enum

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-09 10:55:03 -07:00 committed by Stephen Gutekanst
parent a397984089
commit de3660053d
2 changed files with 8 additions and 0 deletions

View file

@ -282,6 +282,12 @@ pub const PipelineStatistic = enum(u32) {
compute_shader_invocations = 0x00000004, compute_shader_invocations = 0x00000004,
}; };
pub const PowerPreference = enum(u32) {
none = 0x00000000,
low_power = 0x00000001,
high_performance = 0x00000002,
};
test "name" { test "name" {
try std.testing.expect(std.mem.eql(u8, @tagName(Feature.timestamp_query), "timestamp_query")); try std.testing.expect(std.mem.eql(u8, @tagName(Feature.timestamp_query), "timestamp_query"));
} }
@ -310,4 +316,5 @@ test "syntax" {
_ = LoadOp; _ = LoadOp;
_ = LoggingType; _ = LoggingType;
_ = PipelineStatistic; _ = PipelineStatistic;
_ = PowerPreference;
} }

View file

@ -61,6 +61,7 @@ pub const IndexFormat = @import("enums.zig").IndexFormat;
pub const LoadOp = @import("enums.zig").LoadOp; pub const LoadOp = @import("enums.zig").LoadOp;
pub const LoggingType = @import("enums.zig").LoggingType; pub const LoggingType = @import("enums.zig").LoggingType;
pub const PipelineStatistic = @import("enums.zig").PipelineStatistic; pub const PipelineStatistic = @import("enums.zig").PipelineStatistic;
pub const PowerPreference = @import("enums.zig").PowerPreference;
test "syntax" { test "syntax" {
_ = Interface; _ = Interface;