gpu: Default values for BindGroup.Entry (#214)
simplifies creating BindGroup - all resources are null by default and the user sets only the one needed. Helps hexops/mach#182
This commit is contained in:
parent
9ed6f6ca8b
commit
8c8534e609
1 changed files with 4 additions and 4 deletions
|
|
@ -30,11 +30,11 @@ pub inline fn setLabel(group: BindGroup, label: [:0]const u8) void {
|
||||||
|
|
||||||
pub const Entry = struct {
|
pub const Entry = struct {
|
||||||
binding: u32,
|
binding: u32,
|
||||||
buffer: ?Buffer,
|
buffer: ?Buffer = null,
|
||||||
offset: u64,
|
offset: u64 = 0,
|
||||||
size: u64,
|
size: u64,
|
||||||
sampler: ?Sampler,
|
sampler: ?Sampler = null,
|
||||||
texture_view: ?TextureView,
|
texture_view: ?TextureView = null,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Descriptor = struct {
|
pub const Descriptor = struct {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue