22CommandBufferVK::CommandBufferVK(
23 std::weak_ptr<const Context>
context,
24 std::shared_ptr<TrackedObjectsVK> tracked_objects)
26 tracked_objects_(
std::move(tracked_objects)) {}
28CommandBufferVK::~CommandBufferVK() =
default;
30void CommandBufferVK::SetLabel(std::string_view label)
const {
36 ContextVK::Cast(*context).SetDebugName(GetCommandBuffer(), label);
40bool CommandBufferVK::IsValid()
const {
44bool CommandBufferVK::OnSubmitCommands(
bool block_on_schedule,
49void CommandBufferVK::OnWaitUntilCompleted() {}
51void CommandBufferVK::OnWaitUntilScheduled() {}
53std::shared_ptr<RenderPass> CommandBufferVK::OnCreateRenderPass(
60 std::shared_ptr<RenderPassVK>(
new RenderPassVK(
context,
64 if (!pass->IsValid()) {
70std::shared_ptr<BlitPass> CommandBufferVK::OnCreateBlitPass() {
78 auto pass = std::shared_ptr<BlitPassVK>(
new BlitPassVK(
79 shared_from_this(), ContextVK::Cast(*context).GetWorkarounds()));
80 if (!pass->IsValid()) {
86std::shared_ptr<ComputePass> CommandBufferVK::OnCreateComputePass() {
95 std::shared_ptr<ComputePassVK>(
new ComputePassVK(
context,
98 if (!pass->IsValid()) {
104bool CommandBufferVK::EndCommandBuffer()
const {
105 InsertDebugMarker(
"QueueSubmit");
108 tracked_objects_->GetGPUProbe().RecordCmdBufferEnd(
command_buffer);
111 if (status != vk::Result::eSuccess) {
112 VALIDATION_LOG <<
"Failed to end command buffer: " << vk::to_string(status);
118vk::CommandBuffer CommandBufferVK::GetCommandBuffer()
const {
119 if (tracked_objects_) {
120 return tracked_objects_->GetCommandBuffer();
125bool CommandBufferVK::Track(
const std::shared_ptr<SharedObjectVK>&
object) {
129 tracked_objects_->Track(
object);
133bool CommandBufferVK::Track(
const std::shared_ptr<const DeviceBuffer>& buffer) {
137 tracked_objects_->Track(buffer);
141bool CommandBufferVK::Track(
142 const std::shared_ptr<const TextureSourceVK>&
texture) {
146 tracked_objects_->Track(
texture);
150bool CommandBufferVK::Track(
const std::shared_ptr<const Texture>&
texture) {
157 return Track(TextureVK::Cast(*texture).GetTextureSource());
161 const vk::DescriptorSetLayout& layout,
168 return tracked_objects_->GetDescriptorPool().AllocateDescriptorSets(
169 layout, pipeline_key,
context);
172void CommandBufferVK::PushDebugGroup(std::string_view label)
const {
176 vk::DebugUtilsLabelEXT label_info;
177 label_info.pLabelName = label.data();
183void CommandBufferVK::PopDebugGroup()
const {
192void CommandBufferVK::InsertDebugMarker(std::string_view label)
const {
196 vk::DebugUtilsLabelEXT label_info;
197 label_info.pLabelName = label.data();
204 return tracked_objects_->GetDescriptorPool();
A per-frame descriptor pool. Descriptors from this pool don't need to be freed individually....
FlutterDesktopBinaryReply callback
#define FML_UNREACHABLE()
bool HasValidationLayers()
std::shared_ptr< ContextGLES > context
std::shared_ptr< CommandBuffer > command_buffer