gpu: add RenderPipeline.setLabel
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8b340e1386
commit
acbb008492
2 changed files with 10 additions and 1 deletions
|
|
@ -591,6 +591,11 @@ const render_pipeline_vtable = RenderPipeline.VTable{
|
|||
c.wgpuRenderPipelineRelease(@ptrCast(c.WGPURenderPipeline, ptr));
|
||||
}
|
||||
}).release,
|
||||
.setLabel = (struct {
|
||||
pub fn setLabel(ptr: *anyopaque, label: [:0]const u8) void {
|
||||
c.wgpuRenderPipelineSetLabel(@ptrCast(c.WGPURenderPipeline, ptr), label);
|
||||
}
|
||||
}).setLabel,
|
||||
};
|
||||
|
||||
fn wrapRenderPassEncoder(pass: c.WGPURenderPassEncoder) RenderPassEncoder {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ pub const VTable = struct {
|
|||
release: fn (ptr: *anyopaque) void,
|
||||
// TODO:
|
||||
// WGPU_EXPORT WGPUBindGroupLayout wgpuRenderPipelineGetBindGroupLayout(WGPURenderPipeline renderPipeline, uint32_t groupIndex);
|
||||
// WGPU_EXPORT void wgpuRenderPipelineSetLabel(WGPURenderPipeline renderPipeline, char const * label);
|
||||
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||
};
|
||||
|
||||
pub inline fn reference(pipeline: RenderPipeline) void {
|
||||
|
|
@ -21,6 +21,10 @@ pub inline fn release(pipeline: RenderPipeline) void {
|
|||
pipeline.vtable.release(pipeline.ptr);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(pipeline: RenderPipeline, label: [:0]const u8) void {
|
||||
pipeline.vtable.setLabel(pipeline.ptr, label);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue