gpu: add RenderPassEncoder.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
4e6c6bbee8
commit
7eb06f25f6
2 changed files with 14 additions and 11 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
const QuerySet = @import("QuerySet.zig");
|
||||||
|
const RenderPassColorAttachment = @import("structs.zig").RenderPassColorAttachment;
|
||||||
|
const RenderPassDepthStencilAttachment = @import("structs.zig").RenderPassDepthStencilAttachment;
|
||||||
|
const RenderPassTimestampWrite = @import("structs.zig").RenderPassTimestampWrite;
|
||||||
|
|
||||||
const RenderPassEncoder = @This();
|
const RenderPassEncoder = @This();
|
||||||
|
|
||||||
/// The type erased pointer to the RenderPassEncoder implementation
|
/// The type erased pointer to the RenderPassEncoder implementation
|
||||||
|
|
@ -45,8 +50,17 @@ pub inline fn setLabel(pass: RenderPassEncoder, label: [:0]const u8) void {
|
||||||
pass.vtable.setLabel(pass.ptr, label);
|
pass.vtable.setLabel(pass.ptr, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const Descriptor = struct {
|
||||||
|
label: ?[*:0]const u8 = null,
|
||||||
|
color_attachments: []const RenderPassColorAttachment,
|
||||||
|
depth_stencil_attachment: *const RenderPassDepthStencilAttachment,
|
||||||
|
occlusion_query_set: QuerySet,
|
||||||
|
timestamp_writes: []RenderPassTimestampWrite,
|
||||||
|
};
|
||||||
|
|
||||||
test "syntax" {
|
test "syntax" {
|
||||||
_ = VTable;
|
_ = VTable;
|
||||||
_ = reference;
|
_ = reference;
|
||||||
_ = release;
|
_ = release;
|
||||||
|
_ = Descriptor;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
gpu/src/TODO
11
gpu/src/TODO
|
|
@ -57,17 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct WGPURenderPassDescriptor {
|
|
||||||
WGPUChainedStruct const * nextInChain;
|
|
||||||
char const * label;
|
|
||||||
uint32_t colorAttachmentCount;
|
|
||||||
WGPURenderPassColorAttachment const * colorAttachments;
|
|
||||||
WGPURenderPassDepthStencilAttachment const * depthStencilAttachment;
|
|
||||||
WGPUQuerySet occlusionQuerySet;
|
|
||||||
uint32_t timestampWriteCount;
|
|
||||||
WGPURenderPassTimestampWrite const * timestampWrites;
|
|
||||||
} WGPURenderPassDescriptor;
|
|
||||||
|
|
||||||
typedef struct WGPURenderPipelineDescriptor {
|
typedef struct WGPURenderPipelineDescriptor {
|
||||||
WGPUChainedStruct const * nextInChain;
|
WGPUChainedStruct const * nextInChain;
|
||||||
char const * label;
|
char const * label;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue