gpu: add TextureView.Descriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 16:35:11 -07:00 committed by Stephen Gutekanst
parent ad907bf637
commit 1c0f5c0b03
4 changed files with 17 additions and 13 deletions

View file

@ -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;
}