gpu: correct pointer constness of command buffers
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
c6f6a4fa3a
commit
e754f3023e
3 changed files with 5 additions and 5 deletions
|
|
@ -769,7 +769,7 @@ pub const Interface = struct {
|
||||||
procs.queueSetLabel.?(@ptrCast(c.WGPUQueue, queue), label);
|
procs.queueSetLabel.?(@ptrCast(c.WGPUQueue, queue), label);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn queueSubmit(queue: *gpu.Queue, command_count: u32, commands: [*]*const gpu.CommandBuffer) void {
|
pub inline fn queueSubmit(queue: *gpu.Queue, command_count: u32, commands: [*]const *const gpu.CommandBuffer) void {
|
||||||
procs.queueSubmit.?(
|
procs.queueSubmit.?(
|
||||||
@ptrCast(c.WGPUQueue, queue),
|
@ptrCast(c.WGPUQueue, queue),
|
||||||
command_count,
|
command_count,
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ pub fn Interface(comptime T: type) type {
|
||||||
assertDecl(T, "queueCopyTextureForBrowser", fn (queue: *gpu.Queue, source: *const gpu.ImageCopyTexture, destination: *const gpu.ImageCopyTexture, copy_size: *const gpu.Extent3D, options: *const gpu.CopyTextureForBrowserOptions) callconv(.Inline) void);
|
assertDecl(T, "queueCopyTextureForBrowser", fn (queue: *gpu.Queue, source: *const gpu.ImageCopyTexture, destination: *const gpu.ImageCopyTexture, copy_size: *const gpu.Extent3D, options: *const gpu.CopyTextureForBrowserOptions) callconv(.Inline) void);
|
||||||
assertDecl(T, "queueOnSubmittedWorkDone", fn (queue: *gpu.Queue, signal_value: u64, callback: gpu.Queue.WorkDoneCallback, userdata: ?*anyopaque) callconv(.Inline) void);
|
assertDecl(T, "queueOnSubmittedWorkDone", fn (queue: *gpu.Queue, signal_value: u64, callback: gpu.Queue.WorkDoneCallback, userdata: ?*anyopaque) callconv(.Inline) void);
|
||||||
assertDecl(T, "queueSetLabel", fn (queue: *gpu.Queue, label: [*:0]const u8) callconv(.Inline) void);
|
assertDecl(T, "queueSetLabel", fn (queue: *gpu.Queue, label: [*:0]const u8) callconv(.Inline) void);
|
||||||
assertDecl(T, "queueSubmit", fn (queue: *gpu.Queue, command_count: u32, commands: [*]*const gpu.CommandBuffer) callconv(.Inline) void);
|
assertDecl(T, "queueSubmit", fn (queue: *gpu.Queue, command_count: u32, commands: [*]const *const gpu.CommandBuffer) callconv(.Inline) void);
|
||||||
assertDecl(T, "queueWriteBuffer", fn (queue: *gpu.Queue, buffer: *gpu.Buffer, buffer_offset: u64, data: *const anyopaque, size: usize) callconv(.Inline) void);
|
assertDecl(T, "queueWriteBuffer", fn (queue: *gpu.Queue, buffer: *gpu.Buffer, buffer_offset: u64, data: *const anyopaque, size: usize) callconv(.Inline) void);
|
||||||
assertDecl(T, "queueWriteTexture", fn (queue: *gpu.Queue, destination: *const gpu.ImageCopyTexture, data: *const anyopaque, data_size: usize, data_layout: *const gpu.Texture.DataLayout, write_size: *const gpu.Extent3D) callconv(.Inline) void);
|
assertDecl(T, "queueWriteTexture", fn (queue: *gpu.Queue, destination: *const gpu.ImageCopyTexture, data: *const anyopaque, data_size: usize, data_layout: *const gpu.Texture.DataLayout, write_size: *const gpu.Extent3D) callconv(.Inline) void);
|
||||||
assertDecl(T, "queueReference", fn (queue: *gpu.Queue) callconv(.Inline) void);
|
assertDecl(T, "queueReference", fn (queue: *gpu.Queue) callconv(.Inline) void);
|
||||||
|
|
@ -823,7 +823,7 @@ pub fn Export(comptime T: type) type {
|
||||||
}
|
}
|
||||||
|
|
||||||
// WGPU_EXPORT void wgpuQueueSubmit(WGPUQueue queue, uint32_t commandCount, WGPUCommandBuffer const * commands);
|
// WGPU_EXPORT void wgpuQueueSubmit(WGPUQueue queue, uint32_t commandCount, WGPUCommandBuffer const * commands);
|
||||||
export fn wgpuQueueSubmit(queue: *gpu.Queue, command_count: u32, commands: [*]*const gpu.CommandBuffer) void {
|
export fn wgpuQueueSubmit(queue: *gpu.Queue, command_count: u32, commands: [*]const *const gpu.CommandBuffer) void {
|
||||||
T.queueSubmit(queue, command_count, commands);
|
T.queueSubmit(queue, command_count, commands);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1950,7 +1950,7 @@ pub const StubInterface = Interface(struct {
|
||||||
unreachable;
|
unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn queueSubmit(queue: *gpu.Queue, command_count: u32, commands: [*]*const gpu.CommandBuffer) void {
|
pub inline fn queueSubmit(queue: *gpu.Queue, command_count: u32, commands: [*]const *const gpu.CommandBuffer) void {
|
||||||
_ = queue;
|
_ = queue;
|
||||||
_ = command_count;
|
_ = command_count;
|
||||||
_ = commands;
|
_ = commands;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ pub const Queue = opaque {
|
||||||
Impl.queueSetLabel(queue, label);
|
Impl.queueSetLabel(queue, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn submit(queue: *Queue, commands: []*const CommandBuffer) void {
|
pub inline fn submit(queue: *Queue, commands: []const *const CommandBuffer) void {
|
||||||
Impl.queueSubmit(queue, @intCast(u32, commands.len), commands.ptr);
|
Impl.queueSubmit(queue, @intCast(u32, commands.len), commands.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue