gpu: add RenderBundleEncoder.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
4ae4ef4e14
commit
7509404a91
2 changed files with 12 additions and 11 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
const Texture = @import("Texture.zig");
|
||||||
|
|
||||||
const RenderBundleEncoder = @This();
|
const RenderBundleEncoder = @This();
|
||||||
|
|
||||||
/// The type erased pointer to the RenderBundleEncoder implementation
|
/// The type erased pointer to the RenderBundleEncoder implementation
|
||||||
|
|
@ -36,8 +38,18 @@ pub inline fn setLabel(enc: RenderBundleEncoder, label: [:0]const u8) void {
|
||||||
enc.vtable.setLabel(enc.ptr, label);
|
enc.vtable.setLabel(enc.ptr, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const Descriptor = struct {
|
||||||
|
label: ?[*:0]const u8 = null,
|
||||||
|
color_formats: []Texture.Format,
|
||||||
|
depth_stencil_format: Texture.Format,
|
||||||
|
sample_count: u32,
|
||||||
|
depth_read_only: bool,
|
||||||
|
stencil_read_only: bool,
|
||||||
|
};
|
||||||
|
|
||||||
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 WGPURenderBundleEncoderDescriptor {
|
|
||||||
WGPUChainedStruct const * nextInChain;
|
|
||||||
char const * label;
|
|
||||||
uint32_t colorFormatsCount;
|
|
||||||
WGPUTextureFormat const * colorFormats;
|
|
||||||
WGPUTextureFormat depthStencilFormat;
|
|
||||||
uint32_t sampleCount;
|
|
||||||
bool depthReadOnly;
|
|
||||||
bool stencilReadOnly;
|
|
||||||
} WGPURenderBundleEncoderDescriptor;
|
|
||||||
|
|
||||||
typedef struct WGPUSamplerDescriptor {
|
typedef struct WGPUSamplerDescriptor {
|
||||||
WGPUChainedStruct const * nextInChain;
|
WGPUChainedStruct const * nextInChain;
|
||||||
char const * label;
|
char const * label;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue