pub unsafe trait SecondaryCommandBufferAbstract: VulkanObject<Handle = CommandBuffer> + DeviceOwned + Send + Sync {
fn usage(&self) -> CommandBufferUsage;
fn inheritance_info(&self) -> &CommandBufferInheritanceInfo;
fn lock_record(&self) -> Result<(), CommandBufferExecError>;
unsafe fn unlock(&self);
fn num_buffers(&self) -> usize;
fn buffer(
&self,
index: usize
) -> Option<(&Arc<dyn BufferAccess>, Range<DeviceSize>, PipelineMemoryAccess)>;
fn num_images(&self) -> usize;
fn image(
&self,
index: usize
) -> Option<(&Arc<dyn ImageAccess>, &ImageSubresourceRange, PipelineMemoryAccess, ImageLayout, ImageLayout)>;
}
Required Methods§
sourcefn usage(&self) -> CommandBufferUsage
fn usage(&self) -> CommandBufferUsage
Returns the usage of this command buffer.
sourcefn inheritance_info(&self) -> &CommandBufferInheritanceInfo
fn inheritance_info(&self) -> &CommandBufferInheritanceInfo
Returns a CommandBufferInheritance
value describing the properties that the command
buffer inherits from its parent primary command buffer.
sourcefn lock_record(&self) -> Result<(), CommandBufferExecError>
fn lock_record(&self) -> Result<(), CommandBufferExecError>
Checks whether this command buffer is allowed to be recorded to a command buffer, and if so locks it.
If you call this function, then you should call unlock
afterwards.
sourceunsafe fn unlock(&self)
unsafe fn unlock(&self)
Unlocks the command buffer. Should be called once for each call to lock_record
.
Safety
Must not be called if you haven’t called lock_record
before.
sourcefn num_buffers(&self) -> usize
fn num_buffers(&self) -> usize
Returns the number of buffers accessed by this command buffer.
sourcefn buffer(
&self,
index: usize
) -> Option<(&Arc<dyn BufferAccess>, Range<DeviceSize>, PipelineMemoryAccess)>
fn buffer(
&self,
index: usize
) -> Option<(&Arc<dyn BufferAccess>, Range<DeviceSize>, PipelineMemoryAccess)>
Returns the index
th buffer of this command buffer, or None
if out of range.
The valid range is between 0 and num_buffers()
.
sourcefn num_images(&self) -> usize
fn num_images(&self) -> usize
Returns the number of images accessed by this command buffer.
sourcefn image(
&self,
index: usize
) -> Option<(&Arc<dyn ImageAccess>, &ImageSubresourceRange, PipelineMemoryAccess, ImageLayout, ImageLayout)>
fn image(
&self,
index: usize
) -> Option<(&Arc<dyn ImageAccess>, &ImageSubresourceRange, PipelineMemoryAccess, ImageLayout, ImageLayout)>
Returns the index
th image of this command buffer, or None
if out of range.
The valid range is between 0 and num_images()
.