gpu: add TextureView.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
ad907bf637
commit
1c0f5c0b03
4 changed files with 17 additions and 13 deletions
|
|
@ -1,3 +1,5 @@
|
|||
const Texture = @import("Texture.zig");
|
||||
|
||||
const TextureView = @This();
|
||||
|
||||
/// The type erased pointer to the TextureView implementation
|
||||
|
|
@ -23,8 +25,20 @@ pub inline fn setLabel(texture_view: TextureView, label: [:0]const u8) void {
|
|||
texture_view.vtable.setLabel(texture_view.ptr, label);
|
||||
}
|
||||
|
||||
pub const Descriptor = struct {
|
||||
label: ?[*:0]const u8 = null,
|
||||
format: Texture.Format,
|
||||
dimension: Texture.ViewDimension,
|
||||
base_mip_level: u32,
|
||||
mip_level_count: u32,
|
||||
base_array_layer: u32,
|
||||
array_layer_count: u32,
|
||||
aspect: Texture.Aspect,
|
||||
};
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
_ = release;
|
||||
_ = Descriptor;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue