pub struct UnsafeCommandBufferBuilder<P> { /* private fields */ }
Expand description

Command buffer being built.

You can add commands to an UnsafeCommandBufferBuilder by using the AddCommand trait. The AddCommand<&Cmd> trait is implemented on the UnsafeCommandBufferBuilder for any Cmd that is a raw Vulkan command.

When you are finished adding commands, you can use the CommandBufferBuild trait to turn this builder into an UnsafeCommandBuffer.

Implementations

Creates a new builder.

Safety

Creating and destroying an unsafe command buffer is not unsafe per se, but the commands that you add to it are unchecked, do not have any synchronization, and are not kept alive.

In other words, it is your job to make sure that the commands you add are valid, that they don’t use resources that have been destroyed, and that they do not introduce any race condition.

Note: Some checks are still made with debug_assert!. Do not expect to be able to submit invalid commands.

Creates a new command buffer builder from an already-allocated command buffer.

Safety

See the new method.

The kind must match how the command buffer was allocated.

Returns the queue family of the builder.

Turns the builder into an actual command buffer.

Calls vkCmdBeginQuery on the builder.

Calls vkCmdBeginRenderPass on the builder.

Calls vkCmdBindDescriptorSets on the builder.

Does nothing if the list of descriptor sets is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdBindIndexBuffer on the builder.

Calls vkCmdBindPipeline on the builder with a compute pipeline.

Calls vkCmdBindPipeline on the builder with a graphics pipeline.

Calls vkCmdBindVertexBuffers on the builder.

Does nothing if the list of buffers is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdCopyImage on the builder.

Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdBlitImage on the builder.

Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdClearColorImage on the builder.

Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdCopyBuffer on the builder.

Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdCopyBufferToImage on the builder.

Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdCopyImageToBuffer on the builder.

Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdCopyQueryPoolResults on the builder.

Calls vkCmdDispatch on the builder.

Calls vkCmdDispatchIndirect on the builder.

Calls vkCmdDraw on the builder.

Calls vkCmdDrawIndexed on the builder.

Calls vkCmdDrawIndirect on the builder.

Calls vkCmdDrawIndexedIndirect on the builder.

Calls vkCmdEndQuery on the builder.

Calls vkCmdEndRenderPass on the builder.

Calls vkCmdExecuteCommands on the builder.

Does nothing if the list of command buffers is empty, as it would be a no-op and isn’t a valid usage of the command anyway.

Calls vkCmdFillBuffer on the builder.

Calls vkCmdNextSubpass on the builder.

Calls vkCmdPushConstants on the builder.

Calls vkCmdResetEvent on the builder.

Calls vkCmdResetQueryPool on the builder.

Calls vkCmdSetBlendConstants on the builder.

Calls vkCmdSetDepthBias on the builder.

Calls vkCmdSetDepthBounds on the builder.

Calls vkCmdSetEvent on the builder.

Calls vkCmdSetLineWidth on the builder.

Calls vkCmdSetScissor on the builder.

If the list is empty then the command is automatically ignored.

Calls vkCmdSetViewport on the builder.

If the list is empty then the command is automatically ignored.

Calls vkCmdUpdateBuffer on the builder.

Calls vkCmdWriteTimestamp on the builder.

Calls vkCmdDebugMarkerBeginEXT on the builder.

Panics

Requires the VK_EXT_debug_marker device extension to be loaded.

Safety

The command pool that this command buffer was allocated from must support graphics or compute operations

Calls vkCmdDebugMarkerEndEXT on the builder.

Panics

Requires the VK_EXT_debug_marker device extension to be loaded.

Safety

There must be an outstanding vkCmdDebugMarkerBeginEXT command prior to the vkCmdDebugMarkerEndEXT on the queue that this command buffer is submitted to. If the matching vkCmdDebugMarkerBeginEXT command was in a secondary command buffer, the vkCmdDebugMarkerEndEXT must be in the same command buffer.

Calls vkCmdDebugMarkerInsertEXT on the builder.

Panics

Requires the VK_EXT_debug_marker device extension to be loaded.

Safety

The command pool that this command buffer was allocated from must support graphics or compute operations

Trait Implementations

Formats the value using the given formatter. Read more
Returns the device that owns Self.
The type of the object.
The DebugReportObjectTypeEXT of the internal Vulkan handle.
Returns a reference to the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.