Struct vulkano::command_buffer::sys::UnsafeCommandBufferBuilder [] [src]

pub struct UnsafeCommandBufferBuilder<P> where P: CommandPool { /* fields omitted */ }

Methods

impl<P> UnsafeCommandBufferBuilder<P> where P: CommandPool
[src]

Creates a new builder.

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

Safety

  • The allocated command buffer must belong to the pool and must not be used anywhere else in the code for the duration of this command buffer.

Finishes building the command buffer.

Returns the pool used to create this command buffer builder.

Returns the device this command buffer belongs to.

Returns true if this is a secondary command buffer.

Clears an image with a color format, from outside of a render pass.

If general_layout is true, then the General image layout is used. Otherwise the TransferDstOptimal layout is used.

Panic

  • Panics if the image was not created with the same device as this command buffer.
  • Panics if the clear values is not a color value.

Safety

  • The image must be kept alive and must be properly synchronized while this command buffer runs.
  • The ranges must be in range of the image.
  • The image must have a non-compressed color format.
  • The clear value must match the format of the image.
  • The queue family must support graphics or compute operations.
  • The image must have been created with the "transfer_dest" usage.
  • Must be called outside of a render pass.

Clears an image with a depth, stencil or depth-stencil format, from outside of a render pass.

If the ClearValue is a depth value, then only the depth component will be cleared. Same for stencil. If it contains a depth-stencil value, then they will both be cleared.

If general_layout is true, then the General image layout is used. Otherwise the TransferDstOptimal layout is used.

Panic

  • Panics if the image was not created with the same device as this command buffer.
  • Panics if the mipmap levels range or the array layers range is invalid, ie. if the end is inferior to the start.
  • Panics if the clear values is not a depth, stencil or depth-stencil value.

Safety

  • The image must be kept alive and must be properly synchronized while this command buffer runs.
  • The ranges must be in range of the image.
  • The image must have a depth, stencil or depth-stencil format.
  • The clear value must match the format of the image.
  • The queue family must support graphics operations.
  • The image must have been created with the "transfer_dest" usage.
  • Must be called outside of a render pass.

Clears attachments of the current render pass.

You must pass a list of attachment ids and clear values, and a list of rectangles. Each rectangle of each attachment will be cleared. The rectangle's format is [(x, width), (y, height), (array_layer, num_array_layers)].

No memory barriers are needed between this function and preceding or subsequent draw or attachment clear commands in the same subpass.

Panic

  • Panics if one of the clear values is None.

Safety

  • The attachments ids must be valid, and the clear value must match the format of the attachments.
  • Must be called from within a render pass.
  • The rects must be in range of the framebuffer.

Fills a buffer by repeating a 32 bits data.

This is similar to the memset function in C/C++.

Panic

  • Panics if the buffer was not created with the same device as this command buffer.

Safety

  • The buffer must be kept alive and must be properly synchronized while this command buffer runs.
  • The queue family must support graphics or compute operations.
  • Type safety is not checked.
  • The offset must be a multiple of four.
  • The size must be a multiple of four, or must point to the end of the buffer.
  • The buffer must have been created with the "transfer_dest" usage.
  • Must be called outside of a render pass.

Fills a buffer with some data.

The actual size that is copied is the minimum between the size of the slice and the size of the data.

Panic

  • Panics if the buffer was not created with the same device as this command buffer.

Safety

  • The buffer must be kept alive and must be properly synchronized while this command buffer runs.
  • Type safety is not checked.
  • The offset and size must be multiples of four.
  • The size must be less than or equal to 65536 bytes (ie. 64kB).
  • The buffer must have been created with the "transfer_dest" usage.
  • Must be called outside of a render pass.

Copies data from a source buffer to a destination buffer.

This is similar to the memcpy function in C/C++.

Automatically filters out empty regions.

Panic

  • Panics if one of the buffers was not created with the same device as this command buffer.

Safety

  • The buffers must be kept alive and must be properly synchronized while this command buffer runs.
  • Type safety is not checked.
  • The source buffer must have been created with the "transfer_src" usage.
  • The destination buffer must have been created with the "transfer_dest" usage.
  • Must be called outside of a render pass.
  • The offsets and size of the regions must be in range.

Executes secondary command buffers..

Adds a pipeline barrier to the command buffer.

This function itself is not unsafe, but creating a pipeline barrier builder is.

Enters a render pass.

Any clear value that is equal to None is replaced with a dummy value. It is expected that None is passed only for attachments that are not cleared.

Panic

  • Panics if the render pass or framebuffer was not created with the same device as this command buffer.
  • Panics if one of the ranges is invalid.

Safety

  • Must be called outside of a render pass.
  • The queue family must support graphics operations.
  • The render pass and the framebuffer must be kept alive.
  • The render pass and the framebuffer must be compatible.
  • The clear values must be valid for the attachments.

Goes to the next subpass of the render pass.

Safety

  • Must be called inside of a render pass.
  • Must not be at the last subpass of the render pass.

Ends the current render pass.

Safety

  • Must be called inside of a render pass.
  • Must be at the last subpass of the render pass.

Binds a graphics pipeline to the graphics pipeline bind point.

Safety

  • The queue family must support graphics operations.
  • If the variable multisample rate feature is not supported, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must match that set in the previous pipeline.

Binds a compute pipeline to the compute pipeline bind point.

Safety

  • The queue family must support compute operations.

Calls vkCmdDraw.

Calls vkCmdDrawIndexed.

Calls vkCmdDrawIndirect.

Panic

  • Panics if the buffer was not created with the same device as this command buffer.

Calls vkCmdDrawIndexedIndirect.

Panic

  • Panics if the buffer was not created with the same device as this command buffer.

Calls vkCmdDispatch.

Calls vkCmdDispatchIndirect.

Panic

  • Panics if the buffer was not created with the same device as this command buffer.

Calls vkCmdBindVertexBuffers.

The iterator yields a list of buffers and offset of the first byte.

Panic

  • Panics if one of the buffers was not created with the same device as this command buffer.

Calls vkCmdBindIndexBuffer.

Panic

  • Panics if the buffer was not created with the same device as this command buffer.

Calls vkCmdBindDescriptorSets.

Panic

  • Panics if the layout or one of the sets were not created with the same device as this command buffer.

Calls vkCmdPushConstants.

Panic

  • Panics if the layout was not created with the same device as this command buffer.

Trait Implementations

impl<P> VulkanObject for UnsafeCommandBufferBuilder<P> where P: CommandPool
[src]

The type of the object.

Returns a reference to the object.

impl<P> Drop for UnsafeCommandBufferBuilder<P> where P: CommandPool
[src]

A method called when the value goes out of scope. Read more