gpu: make Sampler an enum with methods
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
64d973faf7
commit
40306320f6
2 changed files with 17 additions and 13 deletions
|
|
@ -1,14 +1,18 @@
|
|||
ptr: *anyopaque,
|
||||
pub const Sampler = enum(usize) {
|
||||
_,
|
||||
|
||||
pub const AddressMode = enum(u32) {
|
||||
repeat = 0x00000000,
|
||||
mirror_repeat = 0x00000001,
|
||||
clamp_to_edge = 0x00000002,
|
||||
};
|
||||
pub const none: Sampler = @intToEnum(Sampler, 0);
|
||||
|
||||
pub const BindingType = enum(u32) {
|
||||
undef = 0x00000000,
|
||||
filtering = 0x00000001,
|
||||
non_filtering = 0x00000002,
|
||||
comparison = 0x00000003,
|
||||
pub const AddressMode = enum(u32) {
|
||||
repeat = 0x00000000,
|
||||
mirror_repeat = 0x00000001,
|
||||
clamp_to_edge = 0x00000002,
|
||||
};
|
||||
|
||||
pub const BindingType = enum(u32) {
|
||||
undef = 0x00000000,
|
||||
filtering = 0x00000001,
|
||||
non_filtering = 0x00000002,
|
||||
comparison = 0x00000003,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue