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 QueryType = @import("enums.zig").QueryType;
|
||||
|
||||
const PipelineStatistic = @import("enums.zig").PipelineStatistic;
|
||||
|
||||
const QuerySet = @This();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const AddressMode = @import("enums.zig").AddressMode;
|
||||
const FilterMode = @import("enums.zig").FilterMode;
|
||||
const CompareFunction = @Import("data.zig").CompareFunction;
|
||||
const CompareFunction = @import("data.zig").CompareFunction;
|
||||
|
||||
const Sampler = @This();
|
||||
|
||||
|
|
|
|||
12
gpu/src/TODO
12
gpu/src/TODO
|
|
@ -57,18 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor {
|
|||
|
||||
|
||||
|
||||
typedef struct WGPUTextureViewDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
WGPUTextureFormat format;
|
||||
WGPUTextureViewDimension dimension;
|
||||
uint32_t baseMipLevel;
|
||||
uint32_t mipLevelCount;
|
||||
uint32_t baseArrayLayer;
|
||||
uint32_t arrayLayerCount;
|
||||
WGPUTextureAspect aspect;
|
||||
} WGPUTextureViewDescriptor;
|
||||
|
||||
typedef struct WGPUBindGroupDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
|
|
|
|||
|
|
@ -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