gpu: make Queue.submit API use a slice helper

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-10 22:06:41 -07:00 committed by Stephen Gutekanst
parent 7c09b27905
commit d32c019b59
3 changed files with 3 additions and 4 deletions

View file

@ -49,8 +49,8 @@ pub const Queue = opaque {
Impl.queueSetLabel(queue, label);
}
pub inline fn submit(queue: *Queue, command_count: u32, commands: [*]*const CommandBuffer) void {
Impl.queueSubmit(queue, command_count, commands);
pub inline fn submit(queue: *Queue, commands: []*const CommandBuffer) void {
Impl.queueSubmit(queue, @intCast(u32, commands.len), commands.ptr);
}
pub inline fn writeBuffer(queue: *Queue, buffer: *Buffer, buffer_offset: u64, data: *anyopaque, size: usize) void {