gpu: correct sending of pointer to a local var to a callback function (#271)

This commit is contained in:
Michal Ziulek 2022-05-09 00:04:25 +02:00 committed by GitHub
parent a1daf399a3
commit 5a2aebb14b
Failed to generate hash of commit
2 changed files with 10 additions and 6 deletions

View file

@ -20,7 +20,7 @@ pub const VTable = struct {
release: fn (ptr: *anyopaque) void,
// TODO: dawn specific?
// copyTextureForBrowser: fn (ptr: *anyopaque, source: *const ImageCopyTexture, destination: *const ImageCopyTexture, copy_size: *const Extent3D, options: *const CopyTextureForBrowserOptions) void,
submit: fn (queue: Queue, commands: []const CommandBuffer) void,
submit: fn (queue: *Queue, commands: []const CommandBuffer) void,
writeBuffer: fn (
ptr: *anyopaque,
buffer: Buffer,
@ -46,7 +46,7 @@ pub inline fn release(queue: Queue) void {
queue.vtable.release(queue.ptr);
}
pub inline fn submit(queue: Queue, commands: []const CommandBuffer) void {
pub inline fn submit(queue: *Queue, commands: []const CommandBuffer) void {
queue.vtable.submit(queue, commands);
}