gpu: implement CommandEncoder.copyTextureToTexture

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-17 11:46:56 -07:00 committed by Stephen Gutekanst
parent de9cc72c47
commit 5cf71dae3d
2 changed files with 26 additions and 2 deletions

View file

@ -1669,6 +1669,21 @@ const command_encoder_vtable = CommandEncoder.VTable{
);
}
}).copyTextureToBuffer,
.copyTextureToTexture = (struct {
pub fn copyTextureToTexture(
ptr: *anyopaque,
source: *const ImageCopyTexture,
destination: *const ImageCopyTexture,
copy_size: *const Extent3D,
) void {
c.wgpuCommandEncoderCopyTextureToTexture(
@ptrCast(c.WGPUCommandEncoder, ptr),
&convertImageCopyTexture(source),
&convertImageCopyTexture(destination),
@ptrCast(*const c.WGPUExtent3D, copy_size),
);
}
}).copyTextureToTexture,
.popDebugGroup = (struct {
pub fn popDebugGroup(ptr: *anyopaque) void {
c.wgpuCommandEncoderPopDebugGroup(@ptrCast(c.WGPUCommandEncoder, ptr));