gpu: implement RenderPassEncoder.drawIndexedIndirect

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-15 21:46:30 -07:00 committed by Stephen Gutekanst
parent 660a0334dd
commit 34907b1f22
2 changed files with 15 additions and 1 deletions

View file

@ -922,6 +922,15 @@ const render_pass_encoder_vtable = RenderPassEncoder.VTable{
);
}
}).drawIndexed,
.drawIndexedIndirect = (struct {
pub fn drawIndexedIndirect(ptr: *anyopaque, indirect_buffer: Buffer, indirect_offset: u64) void {
c.wgpuRenderPassEncoderDrawIndexedIndirect(
@ptrCast(c.WGPURenderPassEncoder, ptr),
@ptrCast(c.WGPUBuffer, indirect_buffer.ptr),
indirect_offset,
);
}
}).drawIndexedIndirect,
.beginOcclusionQuery = (struct {
pub fn beginOcclusionQuery(ptr: *anyopaque, query_index: u32) void {
c.wgpuRenderPassEncoderBeginOcclusionQuery(@ptrCast(c.WGPURenderPassEncoder, ptr), query_index);