pub struct UnsafeCommandBufferBuilder<A = StandardCommandBufferAllocator>where
A: CommandBufferAllocator,{ /* private fields */ }Expand description
Command buffer being built.
§Safety
- All submitted commands must be valid and follow the requirements of the Vulkan specification.
- Any resources used by submitted commands must outlive the returned builder and its created command buffer. They must be protected against data races through manual synchronization.
Implementations§
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn build_acceleration_structure( &mut self, info: &AccelerationStructureBuildGeometryInfo, build_range_infos: &[AccelerationStructureBuildRangeInfo], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn build_acceleration_structure_indirect( &mut self, info: &AccelerationStructureBuildGeometryInfo, indirect_buffer: &Subbuffer<[u8]>, stride: u32, max_primitive_counts: &[u32], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn copy_acceleration_structure( &mut self, info: &CopyAccelerationStructureInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn copy_acceleration_structure_to_memory( &mut self, info: &CopyAccelerationStructureToMemoryInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn copy_memory_to_acceleration_structure( &mut self, info: &CopyMemoryToAccelerationStructureInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn write_acceleration_structures_properties( &mut self, acceleration_structures: &[Arc<AccelerationStructure>], query_pool: &QueryPool, first_query: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn bind_descriptor_sets( &mut self, pipeline_bind_point: PipelineBindPoint, pipeline_layout: &PipelineLayout, first_set: u32, descriptor_sets: &[DescriptorSetWithOffsets], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn bind_index_buffer( &mut self, index_buffer: &IndexBuffer, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn bind_pipeline_compute( &mut self, pipeline: &ComputePipeline, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn bind_pipeline_graphics( &mut self, pipeline: &GraphicsPipeline, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn bind_vertex_buffers( &mut self, first_binding: u32, vertex_buffers: &[Subbuffer<[u8]>], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn push_constants<Pc>(
&mut self,
pipeline_layout: &PipelineLayout,
offset: u32,
push_constants: &Pc,
) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>where
Pc: BufferContents,
pub unsafe fn push_descriptor_set( &mut self, pipeline_bind_point: PipelineBindPoint, pipeline_layout: &PipelineLayout, set_num: u32, descriptor_writes: &[WriteDescriptorSet], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn clear_color_image( &mut self, clear_info: &ClearColorImageInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn clear_depth_stencil_image( &mut self, clear_info: &ClearDepthStencilImageInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn fill_buffer( &mut self, dst_buffer: &Subbuffer<[u32]>, data: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn update_buffer<D>(
&mut self,
dst_buffer: &Subbuffer<D>,
data: &D,
) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>where
D: BufferContents + ?Sized,
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn copy_buffer( &mut self, copy_buffer_info: &CopyBufferInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn copy_image( &mut self, copy_image_info: &CopyImageInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn copy_buffer_to_image( &mut self, copy_buffer_to_image_info: &CopyBufferToImageInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn copy_image_to_buffer( &mut self, copy_image_to_buffer_info: &CopyImageToBufferInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn blit_image( &mut self, blit_image_info: &BlitImageInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn resolve_image( &mut self, resolve_image_info: &ResolveImageInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn begin_debug_utils_label( &mut self, label_info: &DebugUtilsLabel, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn end_debug_utils_label( &mut self, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn insert_debug_utils_label( &mut self, label_info: &DebugUtilsLabel, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn set_blend_constants( &mut self, constants: [f32; 4], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_color_write_enable( &mut self, enables: &[bool], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_cull_mode( &mut self, cull_mode: CullMode, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_depth_bias( &mut self, constant_factor: f32, clamp: f32, slope_factor: f32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_depth_bias_enable( &mut self, enable: bool, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_depth_bounds( &mut self, bounds: RangeInclusive<f32>, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_depth_bounds_test_enable( &mut self, enable: bool, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_depth_compare_op( &mut self, compare_op: CompareOp, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_depth_test_enable( &mut self, enable: bool, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_depth_write_enable( &mut self, enable: bool, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_discard_rectangle( &mut self, first_rectangle: u32, rectangles: &[Scissor], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_front_face( &mut self, face: FrontFace, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_line_stipple( &mut self, factor: u32, pattern: u16, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_line_width( &mut self, line_width: f32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_logic_op( &mut self, logic_op: LogicOp, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_patch_control_points( &mut self, num: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_primitive_restart_enable( &mut self, enable: bool, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_primitive_topology( &mut self, topology: PrimitiveTopology, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_rasterizer_discard_enable( &mut self, enable: bool, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_scissor( &mut self, first_scissor: u32, scissors: &[Scissor], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_scissor_with_count( &mut self, scissors: &[Scissor], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_stencil_compare_mask( &mut self, faces: StencilFaces, compare_mask: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_stencil_op( &mut self, faces: StencilFaces, fail_op: StencilOp, pass_op: StencilOp, depth_fail_op: StencilOp, compare_op: CompareOp, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_stencil_reference( &mut self, faces: StencilFaces, reference: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_stencil_test_enable( &mut self, enable: bool, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_stencil_write_mask( &mut self, faces: StencilFaces, write_mask: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_viewport( &mut self, first_viewport: u32, viewports: &[Viewport], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_viewport_with_count( &mut self, viewports: &[Viewport], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn dispatch( &mut self, group_counts: [u32; 3], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn dispatch_indirect( &mut self, indirect_buffer: &Subbuffer<[DispatchIndirectCommand]>, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn draw( &mut self, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn draw_indirect( &mut self, indirect_buffer: &Subbuffer<[DrawIndirectCommand]>, draw_count: u32, stride: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn draw_indexed( &mut self, index_count: u32, instance_count: u32, first_index: u32, vertex_offset: i32, first_instance: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn draw_indexed_indirect( &mut self, indirect_buffer: &Subbuffer<[DrawIndexedIndirectCommand]>, draw_count: u32, stride: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn begin_query( &mut self, query_pool: &QueryPool, query: u32, flags: QueryControlFlags, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn end_query( &mut self, query_pool: &QueryPool, query: u32, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn write_timestamp( &mut self, query_pool: &QueryPool, query: u32, stage: PipelineStage, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn copy_query_pool_results<T>(
&mut self,
query_pool: &QueryPool,
queries: Range<u32>,
destination: &Subbuffer<[T]>,
flags: QueryResultFlags,
) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>where
T: QueryResultElement,
pub unsafe fn reset_query_pool( &mut self, query_pool: &QueryPool, queries: Range<u32>, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn begin_render_pass( &mut self, render_pass_begin_info: &RenderPassBeginInfo, subpass_begin_info: &SubpassBeginInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn next_subpass( &mut self, subpass_end_info: &SubpassEndInfo, subpass_begin_info: &SubpassBeginInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn end_render_pass( &mut self, subpass_end_info: &SubpassEndInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn begin_rendering( &mut self, rendering_info: &RenderingInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn end_rendering( &mut self, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn clear_attachments( &mut self, attachments: &[ClearAttachment], rects: &[ClearRect], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn execute_commands( &mut self, command_buffers: &[Arc<dyn SecondaryCommandBufferAbstract<Handle = CommandBuffer>>], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
pub unsafe fn pipeline_barrier( &mut self, dependency_info: &DependencyInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn set_event( &mut self, event: &Event, dependency_info: &DependencyInfo, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn wait_events( &mut self, events: &[(Arc<Event>, DependencyInfo)], ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
pub unsafe fn reset_event( &mut self, event: &Event, stages: PipelineStages, ) -> Result<&mut UnsafeCommandBufferBuilder<A>, Box<ValidationError>>
Source§impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
Sourcepub unsafe fn new(
allocator: &A,
queue_family_index: u32,
level: CommandBufferLevel,
begin_info: CommandBufferBeginInfo,
) -> Result<UnsafeCommandBufferBuilder<A>, VulkanError>
pub unsafe fn new( allocator: &A, queue_family_index: u32, level: CommandBufferLevel, begin_info: CommandBufferBeginInfo, ) -> Result<UnsafeCommandBufferBuilder<A>, VulkanError>
Sourcepub fn build(self) -> Result<UnsafeCommandBuffer<A>, VulkanError>
pub fn build(self) -> Result<UnsafeCommandBuffer<A>, VulkanError>
Turns the builder into an actual command buffer.
Sourcepub fn queue_family_index(&self) -> u32
pub fn queue_family_index(&self) -> u32
Returns the queue family index that this command buffer was created for.
Sourcepub fn level(&self) -> CommandBufferLevel
pub fn level(&self) -> CommandBufferLevel
Returns the level of the command buffer.
Sourcepub fn usage(&self) -> CommandBufferUsage
pub fn usage(&self) -> CommandBufferUsage
Returns the usage that the command buffer was created with.
Sourcepub fn inheritance_info(&self) -> Option<&CommandBufferInheritanceInfo>
pub fn inheritance_info(&self) -> Option<&CommandBufferInheritanceInfo>
Returns the inheritance info of the command buffer, if it is a secondary command buffer.
Trait Implementations§
Source§impl<A> Debug for UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> Debug for UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
Source§impl<A> DeviceOwned for UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> DeviceOwned for UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
Source§impl<A> VulkanObject for UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
impl<A> VulkanObject for UnsafeCommandBufferBuilder<A>where
A: CommandBufferAllocator,
Source§type Handle = CommandBuffer
type Handle = CommandBuffer
The type of the object.
Source§fn handle(&self) -> <UnsafeCommandBufferBuilder<A> as VulkanObject>::Handle
fn handle(&self) -> <UnsafeCommandBufferBuilder<A> as VulkanObject>::Handle
Returns the raw Vulkan handle of the object.
Auto Trait Implementations§
impl<A> Freeze for UnsafeCommandBufferBuilder<A>
impl<A = StandardCommandBufferAllocator> !RefUnwindSafe for UnsafeCommandBufferBuilder<A>
impl<A> Send for UnsafeCommandBufferBuilder<A>
impl<A> Sync for UnsafeCommandBufferBuilder<A>
impl<A> Unpin for UnsafeCommandBufferBuilder<A>
impl<A = StandardCommandBufferAllocator> !UnwindSafe for UnsafeCommandBufferBuilder<A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> DeviceOwnedVulkanObject for Twhere
T: DeviceOwned + VulkanObject,
impl<T> DeviceOwnedVulkanObject for Twhere
T: DeviceOwned + VulkanObject,
Source§fn set_debug_utils_object_name(
&self,
object_name: Option<&str>,
) -> Result<(), VulkanError>
fn set_debug_utils_object_name( &self, object_name: Option<&str>, ) -> Result<(), VulkanError>
Assigns a human-readable name to the object for debugging purposes. Read more