gpu: implement Dawn queueWriteTexture
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
0ded6e635e
commit
f49f84b517
1 changed files with 11 additions and 12 deletions
|
|
@ -748,13 +748,17 @@ pub const Interface = gpu.Interface(struct {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: signature is wrong!
|
||||||
|
// WGPU_EXPORT void wgpuQueueWriteTexture(WGPUQueue queue, WGPUImageCopyTexture const * destination, void const * data, size_t dataSize, WGPUTextureDataLayout const * dataLayout, WGPUExtent3D const * writeSize);
|
||||||
pub inline fn queueWriteTexture(queue: *gpu.Queue, data: *anyopaque, data_size: usize, data_layout: *const gpu.Texture.DataLayout, write_size: *const gpu.Extent3D) void {
|
pub inline fn queueWriteTexture(queue: *gpu.Queue, data: *anyopaque, data_size: usize, data_layout: *const gpu.Texture.DataLayout, write_size: *const gpu.Extent3D) void {
|
||||||
_ = queue;
|
procs.queueWriteTexture.?(
|
||||||
_ = data;
|
@ptrCast(c.WGPUQueue, queue),
|
||||||
_ = data_size;
|
null, // @ptrCast(*const c.WGPUImageCopyTexture, destination), // TODO
|
||||||
_ = data_layout;
|
data,
|
||||||
_ = write_size;
|
data_size,
|
||||||
unreachable;
|
@ptrCast(*const c.WGPUTextureDataLayout, data_layout),
|
||||||
|
@ptrCast(*const c.WGPUExtent3D, write_size),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn queueReference(queue: *gpu.Queue) void {
|
pub inline fn queueReference(queue: *gpu.Queue) void {
|
||||||
|
|
@ -774,12 +778,7 @@ pub const Interface = gpu.Interface(struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn renderBundleEncoderDraw(render_bundle_encoder: *gpu.RenderBundleEncoder, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32) void {
|
pub inline fn renderBundleEncoderDraw(render_bundle_encoder: *gpu.RenderBundleEncoder, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32) void {
|
||||||
_ = render_bundle_encoder;
|
procs.renderBundleEncoderDraw.?(@ptrCast(c.WGPURenderBundleEncoder, render_bundle_encoder), vertex_count, instance_count, first_vertex, first_instance);
|
||||||
_ = vertex_count;
|
|
||||||
_ = instance_count;
|
|
||||||
_ = first_vertex;
|
|
||||||
_ = first_instance;
|
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn renderBundleEncoderDrawIndexed(render_bundle_encoder: *gpu.RenderBundleEncoder, index_count: u32, instance_count: u32, first_index: u32, base_vertex: u32, first_instance: u32) void {
|
pub inline fn renderBundleEncoderDrawIndexed(render_bundle_encoder: *gpu.RenderBundleEncoder, index_count: u32, instance_count: u32, first_index: u32, base_vertex: u32, first_instance: u32) void {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue