class CommandBuffer

Defined at line 37 of file ../../src/ui/lib/escher/impl/command_buffer.h

From deprecated escher/impl directory.

Public Methods

void ~CommandBuffer ()

Defined at line 27 of file ../../src/ui/lib/escher/impl/command_buffer.cc

vk::CommandBuffer vk ()

Defined at line 41 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 after all commands

have finished executing on the GPU (there is no guarantee about how long

afterward: this depends on when the CommandBufferPool that owns this buffer

calls Retire()).

Defined at line 42 of file ../../src/ui/lib/escher/impl/command_buffer.cc

template <typename ResourceT>
void KeepAlive (const fxl::RefPtr<ResourceT> & ptr)

Defined at line 65 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.

Defined at line 84 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void AddSignalSemaphore (SemaphorePtr semaphore)

During Submit(), these semaphores will be added to the vk::SubmitInfo.

No-op if semaphore is null.

Defined at line 95 of file ../../src/ui/lib/escher/impl/command_buffer.cc

bool ContainsSignalSemaphore (const SemaphorePtr & semaphore)

Checks to see if the provided semaphore is part of the command buffer's vector

of signal semaphores.

Defined at line 105 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 110 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void CopyImage (const ImagePtr & src_image, const ImagePtr & dst_image, vk::ImageLayout src_layout, vk::ImageLayout dst_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 120 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void CopyBuffer (const BufferPtr & src, const BufferPtr & dst, vk::BufferCopy region)

Copy memory from one buffer to another.

Defined at line 132 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void CopyBufferAfterBarrier (const BufferPtr & src, const BufferPtr & dst, vk::BufferCopy region, vk::AccessFlags src_access_mask, vk::PipelineStageFlags src_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 144 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void TransitionImageLayout (const ImagePtr & image, vk::ImageLayout old_layout, vk::ImageLayout new_layout, uint32_t src_queue_family_index, uint32_t dst_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 162 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::Rect2D viewport)

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 299 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void BeginRenderPass (vk::RenderPass render_pass, const escher::FramebufferPtr & framebuffer, const std::vector<vk::ClearValue> & clear_values, const vk::Rect2D viewport)

Defined at line 308 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void BeginRenderPass (vk::RenderPass render_pass, const escher::FramebufferPtr & framebuffer, const vk::ClearValue * clear_values, size_t clear_value_count, const vk::Rect2D viewport)

Defined at line 315 of file ../../src/ui/lib/escher/impl/command_buffer.cc

void EndRenderPass ()

Simple wrapper around endRenderPass().

Defined at line 349 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 75 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 113 of file ../../src/ui/lib/escher/impl/command_buffer.h

size_t NumWaitSemaphores ()

Defined at line 115 of file ../../src/ui/lib/escher/impl/command_buffer.h

size_t NumSignalSemaphores ()

Defined at line 116 of file ../../src/ui/lib/escher/impl/command_buffer.h

bool use_protected_memory ()

Defined at line 117 of file ../../src/ui/lib/escher/impl/command_buffer.h

Friends

class CommandBufferPool