gpu: implement RenderPassEncoder.setScissorRect

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-16 10:41:07 -07:00 committed by Stephen Gutekanst
parent 2c319d628a
commit 67f77d5a8c
2 changed files with 17 additions and 2 deletions

View file

@ -1032,6 +1032,17 @@ const render_pass_encoder_vtable = RenderPassEncoder.VTable{
);
}
}).setIndexBuffer,
.setScissorRect = (struct {
pub fn setScissorRect(ptr: *anyopaque, x: u32, y: u32, width: u32, height: u32) void {
c.wgpuRenderPassEncoderSetScissorRect(
@ptrCast(c.WGPURenderPassEncoder, ptr),
x,
y,
width,
height,
);
}
}).setScissorRect,
};
fn wrapRenderBundleEncoder(enc: c.WGPURenderBundleEncoder) RenderBundleEncoder {