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 {
|
typedef struct WGPUBindGroupLayoutDescriptor {
|
||||||
WGPUChainedStruct const * nextInChain;
|
WGPUChainedStruct const * nextInChain;
|
||||||
char const * label;
|
char const * label;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,16 @@ pub inline fn destroy(texture: Texture) void {
|
||||||
texture.vtable.destroy(texture.ptr);
|
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) {
|
pub const Usage = enum(u32) {
|
||||||
none = 0x00000000,
|
none = 0x00000000,
|
||||||
copy_src = 0x00000001,
|
copy_src = 0x00000001,
|
||||||
|
|
@ -189,6 +199,7 @@ test "syntax" {
|
||||||
_ = reference;
|
_ = reference;
|
||||||
_ = release;
|
_ = release;
|
||||||
_ = destroy;
|
_ = destroy;
|
||||||
|
_ = Descriptor;
|
||||||
_ = Usage;
|
_ = Usage;
|
||||||
_ = Format;
|
_ = Format;
|
||||||
_ = Aspect;
|
_ = Aspect;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const Sampler = @import("Sampler.zig");
|
||||||
const Texture = @import("Texture.zig");
|
const Texture = @import("Texture.zig");
|
||||||
const TextureView = @import("TextureView.zig");
|
const TextureView = @import("TextureView.zig");
|
||||||
const ShaderModule = @import("ShaderModule.zig");
|
const ShaderModule = @import("ShaderModule.zig");
|
||||||
|
const QuerySet = @import("QuerySet.zig");
|
||||||
const StencilFaceState = @import("data.zig").StencilFaceState;
|
const StencilFaceState = @import("data.zig").StencilFaceState;
|
||||||
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
|
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
|
||||||
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
|
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
|
||||||
|
|
@ -12,6 +13,7 @@ const FrontFace = @import("enums.zig").FrontFace;
|
||||||
const CullMode = @import("enums.zig").CullMode;
|
const CullMode = @import("enums.zig").CullMode;
|
||||||
const StorageTextureAccess = @import("enums.zig").StorageTextureAccess;
|
const StorageTextureAccess = @import("enums.zig").StorageTextureAccess;
|
||||||
const CompareFunction = @import("enums.zig").CompareFunction;
|
const CompareFunction = @import("enums.zig").CompareFunction;
|
||||||
|
const ComputePassTimestampLocation = @import("enums.zig").ComputePassTimestampLocation;
|
||||||
|
|
||||||
pub const CompilationMessage = struct {
|
pub const CompilationMessage = struct {
|
||||||
message: [:0]const u8,
|
message: [:0]const u8,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue