gpu: add Sampler.Descriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 16:32:14 -07:00 committed by Stephen Gutekanst
parent 7509404a91
commit ad907bf637
2 changed files with 19 additions and 15 deletions

View file

@ -1,3 +1,7 @@
const AddressMode = @import("enums.zig").AddressMode;
const FilterMode = @import("enums.zig").FilterMode;
const CompareFunction = @Import("data.zig").CompareFunction;
const Sampler = @This();
/// The type erased pointer to the Sampler implementation
@ -34,10 +38,25 @@ pub const BindingLayout = struct {
type: BindingType,
};
pub const Descriptor = struct {
label: ?[*:0]const u8 = null,
address_mode_u: AddressMode,
address_mode_v: AddressMode,
address_mode_w: AddressMode,
mag_filter: FilterMode,
min_filter: FilterMode,
mipmap_filter: FilterMode,
lod_min_clamp: f32,
load_max_clamp: f32,
compare: CompareFunction,
max_anisotropy: u16,
};
test "syntax" {
_ = VTable;
_ = reference;
_ = release;
_ = BindingType;
_ = BindingLayout;
_ = Descriptor;
}