5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMMAND_BUFFER_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_COMMAND_BUFFER_VK_H_
8 #include "fml/status_or.h"
21 class CommandEncoderFactoryVK;
22 class CommandEncoderVK;
27 public std::enable_shared_from_this<CommandBufferVK> {
36 bool Track(
const std::shared_ptr<SharedObjectVK>&
object);
40 bool Track(
const std::shared_ptr<const DeviceBuffer>& buffer);
44 bool Track(
const std::shared_ptr<const Texture>& texture);
48 bool Track(
const std::shared_ptr<const TextureSourceVK>& texture);
76 const vk::DescriptorSetLayout& layout,
87 std::weak_ptr<const DeviceHolderVK> device_holder_;
88 std::shared_ptr<TrackedObjectsVK> tracked_objects_;
91 std::weak_ptr<const DeviceHolderVK> device_holder,
92 std::shared_ptr<TrackedObjectsVK> tracked_objects);
95 void SetLabel(std::string_view label)
const override;
98 bool IsValid()
const override;
101 bool OnSubmitCommands(
bool block_on_schedule,
105 void OnWaitUntilCompleted()
override;
108 void OnWaitUntilScheduled()
override;
111 std::shared_ptr<RenderPass> OnCreateRenderPass(
RenderTarget target)
override;
114 std::shared_ptr<BlitPass> OnCreateBlitPass()
override;
117 std::shared_ptr<ComputePass> OnCreateComputePass()
override;
A collection of encoded commands to be submitted to the GPU for execution. A command buffer is obtain...
std::function< void(Status)> CompletionCallback
fml::StatusOr< vk::DescriptorSet > AllocateDescriptorSets(const vk::DescriptorSetLayout &layout, PipelineKey pipeline_key, const ContextVK &context)
Allocate a new descriptor set for the given [layout].
~CommandBufferVK() override
void PushDebugGroup(std::string_view label) const
Push a debug group.
void InsertDebugMarker(std::string_view label) const
Insert a new debug marker.
DescriptorPoolVK & GetDescriptorPool() const
bool Track(const std::shared_ptr< SharedObjectVK > &object)
Ensure that [object] is kept alive until this command buffer completes execution.
bool EndCommandBuffer() const
End recording of the current command buffer.
void PopDebugGroup() const
Pop the previous debug group.
vk::CommandBuffer GetCommandBuffer() const
Retrieve the native command buffer from this object.
A per-frame descriptor pool. Descriptors from this pool don't need to be freed individually....