gpu: implement Dawn computePipelineGetBindGroupLayout

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 17:07:25 -07:00 committed by Stephen Gutekanst
parent 1aa167aea7
commit 3d19b8991d

View file

@ -360,6 +360,8 @@ pub const Interface = gpu.Interface(struct {
); );
} }
// TODO: signature is wrong!
// WGPU_EXPORT void wgpuComputePassEncoderWriteTimestamp(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex);
pub inline fn computePassEncoderWriteTimestamp(compute_pass_encoder: *gpu.ComputePassEncoder, pipeline: *gpu.ComputePipeline) void { pub inline fn computePassEncoderWriteTimestamp(compute_pass_encoder: *gpu.ComputePassEncoder, pipeline: *gpu.ComputePipeline) void {
_ = compute_pass_encoder; _ = compute_pass_encoder;
_ = pipeline; _ = pipeline;
@ -375,9 +377,10 @@ pub const Interface = gpu.Interface(struct {
} }
pub inline fn computePipelineGetBindGroupLayout(compute_pipeline: *gpu.ComputePipeline, group_index: u32) *gpu.BindGroupLayout { pub inline fn computePipelineGetBindGroupLayout(compute_pipeline: *gpu.ComputePipeline, group_index: u32) *gpu.BindGroupLayout {
_ = compute_pipeline; return @ptrCast(*gpu.BindGroupLayout, procs.computePipelineGetBindGroupLayout.?(
_ = group_index; @ptrCast(c.WGPUComputePipeline, compute_pipeline),
unreachable; group_index,
));
} }
pub inline fn computePipelineSetLabel(compute_pipeline: *gpu.ComputePipeline, label: [*:0]const u8) void { pub inline fn computePipelineSetLabel(compute_pipeline: *gpu.ComputePipeline, label: [*:0]const u8) void {