gpu: add Sampler.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
5b4c30871e
commit
80b8f9224c
2 changed files with 17 additions and 15 deletions
|
|
@ -1,18 +1,3 @@
|
||||||
pub const WGPUSamplerDescriptor = extern struct {
|
|
||||||
next_in_chain: *const ChainedStruct,
|
|
||||||
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,
|
|
||||||
lod_max_clamp: f32,
|
|
||||||
compare: CompareFunction,
|
|
||||||
max_anisotropy: u16,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const WGPUShaderModuleDescriptor = extern struct {
|
pub const WGPUShaderModuleDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
|
const FilterMode = @import("types.zig").FilterMode;
|
||||||
|
const CompareFunction = @import("types.zig").CompareFunction;
|
||||||
|
|
||||||
pub const Sampler = enum(usize) {
|
pub const Sampler = enum(usize) {
|
||||||
_,
|
_,
|
||||||
|
|
@ -22,4 +24,19 @@ pub const Sampler = enum(usize) {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
type: BindingType,
|
type: BindingType,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const Descriptor = extern struct {
|
||||||
|
next_in_chain: *const ChainedStruct,
|
||||||
|
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,
|
||||||
|
lod_max_clamp: f32,
|
||||||
|
compare: CompareFunction,
|
||||||
|
max_anisotropy: u16,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue