gpu: add Texture.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
628f3d59c2
commit
13fcf98436
3 changed files with 13 additions and 11 deletions
11
gpu/src/TODO
11
gpu/src/TODO
|
|
@ -57,17 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor {
|
|||
|
||||
|
||||
|
||||
typedef struct WGPUTextureDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
WGPUTextureUsageFlags usage;
|
||||
WGPUTextureDimension dimension;
|
||||
WGPUExtent3D size;
|
||||
WGPUTextureFormat format;
|
||||
uint32_t mipLevelCount;
|
||||
uint32_t sampleCount;
|
||||
} WGPUTextureDescriptor;
|
||||
|
||||
typedef struct WGPUBindGroupLayoutDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,16 @@ pub inline fn destroy(texture: Texture) void {
|
|||
texture.vtable.destroy(texture.ptr);
|
||||
}
|
||||
|
||||
pub const Descriptor = struct {
|
||||
label: ?[*:0]const u8 = null,
|
||||
usage: Usage,
|
||||
dimension: Dimension,
|
||||
size: Extent3D,
|
||||
format: Format,
|
||||
mip_level_count: u32,
|
||||
sample_count: u32,
|
||||
};
|
||||
|
||||
pub const Usage = enum(u32) {
|
||||
none = 0x00000000,
|
||||
copy_src = 0x00000001,
|
||||
|
|
@ -189,6 +199,7 @@ test "syntax" {
|
|||
_ = reference;
|
||||
_ = release;
|
||||
_ = destroy;
|
||||
_ = Descriptor;
|
||||
_ = Usage;
|
||||
_ = Format;
|
||||
_ = Aspect;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ const Sampler = @import("Sampler.zig");
|
|||
const Texture = @import("Texture.zig");
|
||||
const TextureView = @import("TextureView.zig");
|
||||
const ShaderModule = @import("ShaderModule.zig");
|
||||
const QuerySet = @import("QuerySet.zig");
|
||||
const StencilFaceState = @import("data.zig").StencilFaceState;
|
||||
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
|
||||
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
|
||||
|
|
@ -12,6 +13,7 @@ const FrontFace = @import("enums.zig").FrontFace;
|
|||
const CullMode = @import("enums.zig").CullMode;
|
||||
const StorageTextureAccess = @import("enums.zig").StorageTextureAccess;
|
||||
const CompareFunction = @import("enums.zig").CompareFunction;
|
||||
const ComputePassTimestampLocation = @import("enums.zig").ComputePassTimestampLocation;
|
||||
|
||||
pub const CompilationMessage = struct {
|
||||
message: [:0]const u8,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue