Flutter Engine
The Flutter Engine
render_pass_builder_vk.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_RENDER_PASS_BUILDER_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_RENDER_PASS_BUILDER_VK_H_
7
8#include <map>
9#include <optional>
10
14
15namespace impeller {
16
18 public:
20
22
24
26
29 SampleCount sample_count,
30 LoadAction load_action,
31 StoreAction store_action);
32
34 SampleCount sample_count,
35 LoadAction load_action,
36 StoreAction store_action);
37
39 SampleCount sample_count,
40 LoadAction load_action,
41 StoreAction store_action);
42
43 vk::UniqueRenderPass Build(const vk::Device& device) const;
44
45 // Visible for testing.
46 const std::map<size_t, vk::AttachmentDescription>& GetColorAttachments()
47 const;
48
49 // Visible for testing.
50 const std::map<size_t, vk::AttachmentDescription>& GetResolves() const;
51
52 // Visible for testing.
53 const std::optional<vk::AttachmentDescription>& GetDepthStencil() const;
54
55 private:
56 std::map<size_t, vk::AttachmentDescription> colors_;
57 std::map<size_t, vk::AttachmentDescription> resolves_;
58 std::optional<vk::AttachmentDescription> depth_stencil_;
59};
60
61//------------------------------------------------------------------------------
62/// @brief Inserts the appropriate barriers to ensure that subsequent
63/// commands can read from the specified image (itself a framebuffer
64/// attachment) as an input attachment.
65///
66/// Unlike most barriers, this barrier may only be inserted within a
67/// Vulkan render-pass.
68///
69/// The type of barrier inserted depends on the subpass setup and
70/// self-dependencies. Only use this utility method for inserting
71/// barriers in render passes created by `RenderPassBuilderVK`.
72///
73/// @param[in] buffer The buffer
74/// @param[in] image The image
75///
76void InsertBarrierForInputAttachmentRead(const vk::CommandBuffer& buffer,
77 const vk::Image& image);
78
79} // namespace impeller
80
81#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_RENDER_PASS_BUILDER_VK_H_
RenderPassBuilderVK & SetDepthStencilAttachment(PixelFormat format, SampleCount sample_count, LoadAction load_action, StoreAction store_action)
const std::map< size_t, vk::AttachmentDescription > & GetColorAttachments() const
const std::map< size_t, vk::AttachmentDescription > & GetResolves() const
RenderPassBuilderVK & SetStencilAttachment(PixelFormat format, SampleCount sample_count, LoadAction load_action, StoreAction store_action)
const std::optional< vk::AttachmentDescription > & GetDepthStencil() const
RenderPassBuilderVK & operator=(const RenderPassBuilderVK &)=delete
RenderPassBuilderVK(const RenderPassBuilderVK &)=delete
RenderPassBuilderVK & SetColorAttachment(size_t index, PixelFormat format, SampleCount sample_count, LoadAction load_action, StoreAction store_action)
vk::UniqueRenderPass Build(const vk::Device &device) const
VkDevice device
Definition: main.cc:53
uint32_t uint32_t * format
sk_sp< const SkImage > image
Definition: SkRecords.h:269
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126
CanvasImage Image
Definition: dart_ui.cc:55
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:99
LoadAction
Definition: formats.h:202
StoreAction
Definition: formats.h:208
void InsertBarrierForInputAttachmentRead(const vk::CommandBuffer &buffer, const vk::Image &image)
Inserts the appropriate barriers to ensure that subsequent commands can read from the specified image...
SampleCount
Definition: formats.h:295