gpu: convert *opaque -> opaque for CommandEncoder
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
e15cb4009a
commit
e63a818d62
3 changed files with 23 additions and 23 deletions
|
|
@ -12,84 +12,84 @@ const ImageCopyTexture = @import("types.zig").ImageCopyTexture;
|
|||
const Extent3D = @import("types.zig").Extent3D;
|
||||
const Impl = @import("interface.zig").Impl;
|
||||
|
||||
pub const CommandEncoder = *opaque {
|
||||
pub inline fn beginComputePass(command_encoder: CommandEncoder, descriptor: ?*const ComputePassDescriptor) ComputePassEncoder {
|
||||
pub const CommandEncoder = opaque {
|
||||
pub inline fn beginComputePass(command_encoder: *CommandEncoder, descriptor: ?*const ComputePassDescriptor) ComputePassEncoder {
|
||||
return Impl.commandEncoderBeginComputePass(command_encoder, descriptor);
|
||||
}
|
||||
|
||||
pub inline fn beginRenderPass(command_encoder: CommandEncoder, descriptor: *const RenderPassDescriptor) RenderPassEncoder {
|
||||
pub inline fn beginRenderPass(command_encoder: *CommandEncoder, descriptor: *const RenderPassDescriptor) RenderPassEncoder {
|
||||
return Impl.commandEncoderBeginRenderPass(command_encoder, descriptor);
|
||||
}
|
||||
|
||||
/// Default `offset`: 0
|
||||
/// Default `size`: `gpu.whole_size`
|
||||
pub inline fn clearBuffer(command_encoder: CommandEncoder, buffer: *Buffer, offset: u64, size: u64) void {
|
||||
pub inline fn clearBuffer(command_encoder: *CommandEncoder, buffer: *Buffer, offset: u64, size: u64) void {
|
||||
Impl.commandEncoderClearBuffer(command_encoder, buffer, offset, size);
|
||||
}
|
||||
|
||||
pub inline fn copyBufferToBuffer(command_encoder: CommandEncoder, source: *Buffer, source_offset: u64, destination: *Buffer, destination_offset: u64, size: u64) void {
|
||||
pub inline fn copyBufferToBuffer(command_encoder: *CommandEncoder, source: *Buffer, source_offset: u64, destination: *Buffer, destination_offset: u64, size: u64) void {
|
||||
Impl.commandEncoderCopyBufferToBuffer(command_encoder, source, source_offset, destination, destination_offset, size);
|
||||
}
|
||||
|
||||
pub inline fn copyBufferToTexture(command_encoder: CommandEncoder, source: *const ImageCopyBuffer, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void {
|
||||
pub inline fn copyBufferToTexture(command_encoder: *CommandEncoder, source: *const ImageCopyBuffer, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void {
|
||||
Impl.commandEncoderCopyBufferToTexture(command_encoder, source, destination, copy_size);
|
||||
}
|
||||
|
||||
pub inline fn copyTextureToBuffer(command_encoder: CommandEncoder, source: *const ImageCopyTexture, destination: *const ImageCopyBuffer, copy_size: *const Extent3D) void {
|
||||
pub inline fn copyTextureToBuffer(command_encoder: *CommandEncoder, source: *const ImageCopyTexture, destination: *const ImageCopyBuffer, copy_size: *const Extent3D) void {
|
||||
Impl.commandEncoderCopyTextureToBuffer(command_encoder, source, destination, copy_size);
|
||||
}
|
||||
|
||||
pub inline fn copyTextureToTexture(command_encoder: CommandEncoder, source: *const ImageCopyTexture, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void {
|
||||
pub inline fn copyTextureToTexture(command_encoder: *CommandEncoder, source: *const ImageCopyTexture, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void {
|
||||
Impl.commandEncoderCopyTextureToTexture(command_encoder, source, destination, copy_size);
|
||||
}
|
||||
|
||||
// Note: the only difference between this and the non-internal variant is that this one checks
|
||||
// internal usage.
|
||||
pub inline fn copyTextureToTextureInternal(command_encoder: CommandEncoder, source: *const ImageCopyTexture, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void {
|
||||
pub inline fn copyTextureToTextureInternal(command_encoder: *CommandEncoder, source: *const ImageCopyTexture, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void {
|
||||
Impl.commandEncoderCopyTextureToTextureInternal(command_encoder, source, destination, copy_size);
|
||||
}
|
||||
|
||||
pub inline fn finish(command_encoder: CommandEncoder, descriptor: ?*const CommandBufferDescriptor) *CommandBuffer {
|
||||
pub inline fn finish(command_encoder: *CommandEncoder, descriptor: ?*const CommandBufferDescriptor) *CommandBuffer {
|
||||
return Impl.commandEncoderFinish(command_encoder, descriptor);
|
||||
}
|
||||
|
||||
pub inline fn injectValidationError(command_encoder: CommandEncoder, message: [*:0]const u8) void {
|
||||
pub inline fn injectValidationError(command_encoder: *CommandEncoder, message: [*:0]const u8) void {
|
||||
Impl.commandEncoderInjectValidationError(command_encoder, message);
|
||||
}
|
||||
|
||||
pub inline fn insertDebugMarker(command_encoder: CommandEncoder, marker_label: [*:0]const u8) void {
|
||||
pub inline fn insertDebugMarker(command_encoder: *CommandEncoder, marker_label: [*:0]const u8) void {
|
||||
Impl.commandEncoderInsertDebugMarker(command_encoder, marker_label);
|
||||
}
|
||||
|
||||
pub inline fn popDebugGroup(command_encoder: CommandEncoder) void {
|
||||
pub inline fn popDebugGroup(command_encoder: *CommandEncoder) void {
|
||||
Impl.commandEncoderPopDebugGroup(command_encoder);
|
||||
}
|
||||
|
||||
pub inline fn pushDebugGroup(command_encoder: CommandEncoder, group_label: [*:0]const u8) void {
|
||||
pub inline fn pushDebugGroup(command_encoder: *CommandEncoder, group_label: [*:0]const u8) void {
|
||||
Impl.commandEncoderPushDebugGroup(command_encoder, group_label);
|
||||
}
|
||||
|
||||
pub inline fn resolveQuerySet(command_encoder: CommandEncoder, query_set: QuerySet, first_query: u32, query_count: u32, destination: *Buffer, destination_offset: u64) void {
|
||||
pub inline fn resolveQuerySet(command_encoder: *CommandEncoder, query_set: QuerySet, first_query: u32, query_count: u32, destination: *Buffer, destination_offset: u64) void {
|
||||
Impl.commandEncoderResolveQuerySet(command_encoder, query_set, first_query, query_count, destination, destination_offset);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(command_encoder: CommandEncoder, label: [*:0]const u8) void {
|
||||
pub inline fn setLabel(command_encoder: *CommandEncoder, label: [*:0]const u8) void {
|
||||
Impl.commandEncoderSetLabel(command_encoder, label);
|
||||
}
|
||||
|
||||
pub inline fn writeBuffer(command_encoder: CommandEncoder, buffer: *Buffer, buffer_offset: u64, data: [*]const u8, size: u64) void {
|
||||
pub inline fn writeBuffer(command_encoder: *CommandEncoder, buffer: *Buffer, buffer_offset: u64, data: [*]const u8, size: u64) void {
|
||||
Impl.commandEncoderWriteBuffer(command_encoder, buffer, buffer_offset, data, size);
|
||||
}
|
||||
|
||||
pub inline fn writeTimestamp(command_encoder: CommandEncoder, query_set: QuerySet, query_index: u32) void {
|
||||
pub inline fn writeTimestamp(command_encoder: *CommandEncoder, query_set: QuerySet, query_index: u32) void {
|
||||
Impl.commandEncoderWriteTimestamp(command_encoder, query_set, query_index);
|
||||
}
|
||||
|
||||
pub inline fn reference(command_encoder: CommandEncoder) void {
|
||||
pub inline fn reference(command_encoder: *CommandEncoder) void {
|
||||
Impl.commandEncoderReference(command_encoder);
|
||||
}
|
||||
|
||||
pub inline fn release(command_encoder: CommandEncoder) void {
|
||||
pub inline fn release(command_encoder: *CommandEncoder) void {
|
||||
Impl.commandEncoderRelease(command_encoder);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue