class CommandBuffer
Defined at line 38 of file ../../src/ui/lib/escher/impl/command_buffer.h
From deprecated escher/impl directory.
Public Methods
void ~CommandBuffer ()
Defined at line 41 of file ../../src/ui/lib/escher/impl/command_buffer.cc
vk::CommandBuffer vk ()
Defined at line 42 of file ../../src/ui/lib/escher/impl/command_buffer.h
bool Submit (vk::Queue queue, CommandBufferFinishedCallback callback)
Return true if successful. The callback will be invoked by the owning
`CommandBufferPool::Cleanup()` after all commands have finished executing
on the GPU, the buffer has been returned to the pool, and the sequencer
has been notified. The callback may call `GetCommandBuffer()` and
`Cleanup()` (a nested `Cleanup()` call returns false).
Defined at line 56 of file ../../src/ui/lib/escher/impl/command_buffer.cc
template <typename ResourceT>
void KeepAlive (const fxl::RefPtr<ResourceT> & ptr)
Defined at line 70 of file ../../src/ui/lib/escher/impl/command_buffer.h
void AddWaitSemaphore (SemaphorePtr semaphore, vk::PipelineStageFlags stage)
During Submit(), these semaphores will be added to the vk::SubmitInfo.
No-op if semaphore is null. If a matching semaphore (by pointer or non-zero imported event
KOID) is already present, merges |stage| into its existing pipeline stage mask instead of
adding a duplicate entry.
Defined at line 116 of file ../../src/ui/lib/escher/impl/command_buffer.cc
size_t NumWaitSemaphores ()
Defined at line 120 of file ../../src/ui/lib/escher/impl/command_buffer.h
size_t NumSignalSemaphores ()
Defined at line 121 of file ../../src/ui/lib/escher/impl/command_buffer.h
bool use_protected_memory ()
Defined at line 122 of file ../../src/ui/lib/escher/impl/command_buffer.h
void AddSignalSemaphore (SemaphorePtr semaphore)
During Submit(), these semaphores will be added to the vk::SubmitInfo.
No-op if semaphore is null or if a matching semaphore (by pointer or non-zero imported event
KOID) is already present.
Defined at line 135 of file ../../src/ui/lib/escher/impl/command_buffer.cc
bool ContainsSignalSemaphore (const SemaphorePtr & semaphore)
Checks whether |semaphore| (matching by pointer or non-zero imported event KOID) is already in
the command buffer's signal semaphore list.
Defined at line 142 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void KeepAlive (const Resource * resource)
These resources will be retained until the command-buffer is finished
running on the GPU.
Defined at line 151 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void CopyImage (const ImagePtr &src_image,const ImagePtr &dst_image,vk::ImageLayoutsrc_layout,vk::ImageLayoutdst_layout,vk::ImageCopy *region)
Copy pixels from one image to another. No image barriers or other
synchronization is used. Retain both images in used_resources.
Defined at line 161 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void CopyBuffer (const BufferPtr &src,const BufferPtr &dst,vk::BufferCopyregion)
Copy memory from one buffer to another.
Defined at line 191 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void CopyBufferAfterBarrier (const BufferPtr &src,const BufferPtr &dst,vk::BufferCopyregion,vk::AccessFlagssrc_access_mask,vk::PipelineStageFlagssrc_stage_mask)
Copy the specified region of |src| into |dst| after inserting a
memory-barrier to use the memory on the same queue (i.e. the barrier's
queue family indices are VK_QUEUE_FAMILY_IGNORED).
Defined at line 218 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void TransitionImageLayout (const ImagePtr &image,vk::ImageLayoutold_layout,vk::ImageLayoutnew_layout,uint32_tsrc_queue_family_index,uint32_tdst_queue_family_index)
Transition the image between the two layouts; see section 11.4 of the
Vulkan spec. Retain image in used_resources.
Defined at line 236 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void BeginRenderPass (const escher::RenderPassPtr &render_pass,const escher::FramebufferPtr &framebuffer,const std::vector<vk::ClearValue> &clear_values,const vk::Rect2Dviewport)
Convenient way to begin a render-pass that renders to the whole framebuffer
(i.e. width/height of viewport and scissors are obtained from framebuffer).
Defined at line 373 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void BeginRenderPass (vk::RenderPassrender_pass,const escher::FramebufferPtr &framebuffer,const std::vector<vk::ClearValue> &clear_values,const vk::Rect2Dviewport)
Defined at line 382 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void BeginRenderPass (vk::RenderPassrender_pass,const escher::FramebufferPtr &framebuffer,const vk::ClearValue *clear_values,size_tclear_value_count,const vk::Rect2Dviewport)
Defined at line 389 of file ../../src/ui/lib/escher/impl/command_buffer.cc
void EndRenderPass ()
Simple wrapper around endRenderPass().
Defined at line 423 of file ../../src/ui/lib/escher/impl/command_buffer.cc
vk::Result Wait (uint64_t timeout_nanoseconds)
Block until the command-buffer is no longer pending, or the specified
number of nanoseconds has elapsed. Return vk::Result::eSuccess in the
former case, and vk::Result::eTimeout in the latter.
Defined at line 107 of file ../../src/ui/lib/escher/impl/command_buffer.cc
uint64_t sequence_number ()
Each CommandBuffer that is obtained from a CommandBufferPool is given a
monotonically-increasing sequence number. This number is globally unique
(per Escher instance), even across multiple CommandBufferPools.
Defined at line 118 of file ../../src/ui/lib/escher/impl/command_buffer.h
Friends
class VulkanTester
class CommandBufferPool