gpu: add ComputePipeline.Descriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 16:59:52 -07:00 committed by Stephen Gutekanst
parent 7fa2bb3754
commit 4e6c6bbee8
3 changed files with 12 additions and 7 deletions

View file

@ -1,3 +1,6 @@
const PipelineLayout = @import("PipelineLayout.zig");
const ProgrammableStageDescriptor = @import("structs.zig").ProgrammableStageDescriptor;
const ComputePipeline = @This();
/// The type erased pointer to the ComputePipeline implementation
@ -25,8 +28,15 @@ pub inline fn setLabel(pipeline: ComputePipeline, label: [:0]const u8) void {
pipeline.vtable.setLabel(pipeline.ptr, label);
}
pub const Descriptor = struct {
label: ?[*:0]const u8 = null,
layout: PipelineLayout,
compute: ProgrammableStageDescriptor,
};
test "syntax" {
_ = VTable;
_ = reference;
_ = release;
_ = Descriptor;
}

View file

@ -57,13 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor {
typedef struct WGPUComputePipelineDescriptor {
WGPUChainedStruct const * nextInChain;
char const * label;
WGPUPipelineLayout layout;
WGPUProgrammableStageDescriptor compute;
} WGPUComputePipelineDescriptor;
typedef struct WGPURenderPassDescriptor {
WGPUChainedStruct const * nextInChain;
char const * label;

View file

@ -1,3 +1,5 @@
const Extent3D = @import("data.zig").Extent3D;
const TextureView = @import("TextureView.zig");
const Texture = @This();