| Flutter Impeller |

barrier_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_BARRIER_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_BARRIER_VK_H_
7
8 #include "flutter/fml/macros.h"
9 #include "impeller/renderer/backend/vulkan/vk.h"
10
11 namespace impeller {
12
13 //------------------------------------------------------------------------------
14 /// @brief Defines an operations and memory access barrier on a resource.
15 ///
16 /// For further reading, see
17 /// https://www.khronos.org/events/vulkan-how-to-use-synchronisation-validation-across-multiple-queues-and-command-buffers
18 /// and the Vulkan spec. The docs for the various member of this
19 /// class are based on verbiage in the spec.
20 ///
21 struct BarrierVK {
22 vk::CommandBuffer cmd_buffer = {};
23 vk::ImageLayout new_layout = vk::ImageLayout::eUndefined;
24
25 // The first synchronization scope defines what operations the barrier waits
26 // for to be done. In the Vulkan spec, this is usually referred to as the src
27 // scope.
28 vk::PipelineStageFlags src_stage = vk::PipelineStageFlagBits::eNone;
29
30 // The first access scope defines what memory operations are guaranteed to
31 // happen before the barrier. In the Vulkan spec, this is usually referred to
32 // as the src scope.
33 vk::AccessFlags src_access = vk::AccessFlagBits::eNone;
34
35 // The second synchronization scope defines what operations wait for the
36 // barrier to be done. In the Vulkan spec, this is usually referred to as the
37 // dst scope.
38 vk::PipelineStageFlags dst_stage = vk::PipelineStageFlagBits::eNone;
39
40 // The second access scope defines what memory operations are prevented from
41 // running till after the barrier. In the Vulkan spec, this is usually
42 // referred to as the dst scope.
43 vk::AccessFlags dst_access = vk::AccessFlagBits::eNone;
44 };
45
46 } // namespace impeller
47
48 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_BARRIER_VK_H_
impeller::BarrierVK::dst_access
vk::AccessFlags dst_access
Definition: barrier_vk.h:43
impeller::BarrierVK::new_layout
vk::ImageLayout new_layout
Definition: barrier_vk.h:23
impeller::BarrierVK::cmd_buffer
vk::CommandBuffer cmd_buffer
Definition: barrier_vk.h:22
vk.h
impeller::BarrierVK
Defines an operations and memory access barrier on a resource.
Definition: barrier_vk.h:21
impeller::BarrierVK::src_access
vk::AccessFlags src_access
Definition: barrier_vk.h:33
impeller::BarrierVK::dst_stage
vk::PipelineStageFlags dst_stage
Definition: barrier_vk.h:38
impeller
Definition: aiks_context.cc:10
impeller::BarrierVK::src_stage
vk::PipelineStageFlags src_stage
Definition: barrier_vk.h:28