gpu: add TextureView.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
2a50f3c3bd
commit
2e9ef64479
2 changed files with 15 additions and 12 deletions
|
|
@ -1,15 +1,3 @@
|
|||
pub const WGPUTextureViewDescriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
format: TextureFormat,
|
||||
dimension: TextureViewDimension,
|
||||
base_mip_level: u32,
|
||||
mip_level_count: u32,
|
||||
base_array_layer: u32,
|
||||
array_layer_count: u32,
|
||||
aspect: TextureAspect,
|
||||
};
|
||||
|
||||
pub const VertexAttribute = extern struct {
|
||||
format: VertexFormat,
|
||||
offset: u64,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||
const Texture = @import("texture.zig").Texture;
|
||||
|
||||
pub const TextureView = enum(usize) {
|
||||
_,
|
||||
|
||||
|
|
@ -12,4 +15,16 @@ pub const TextureView = enum(usize) {
|
|||
dimension_cube_array = 0x00000005,
|
||||
dimension_3d = 0x00000006,
|
||||
};
|
||||
|
||||
pub const Descriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
format: Texture.Format,
|
||||
dimension: Dimension,
|
||||
base_mip_level: u32,
|
||||
mip_level_count: u32,
|
||||
base_array_layer: u32,
|
||||
array_layer_count: u32,
|
||||
aspect: Texture.Aspect,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue