Flutter Engine
The Flutter Engine
compute_pipeline_vk.cc
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
6
7namespace impeller {
8
10 std::weak_ptr<DeviceHolderVK> device_holder,
11 std::weak_ptr<PipelineLibrary> library,
13 vk::UniquePipeline pipeline,
14 vk::UniquePipelineLayout layout,
15 vk::UniqueDescriptorSetLayout descriptor_set_layout)
16 : Pipeline(std::move(library), desc),
17 device_holder_(std::move(device_holder)),
18 pipeline_(std::move(pipeline)),
19 layout_(std::move(layout)),
20 descriptor_set_layout_(std::move(descriptor_set_layout)) {
21 is_valid_ = pipeline_ && layout_ && descriptor_set_layout_;
22}
23
25 std::shared_ptr<DeviceHolderVK> device_holder = device_holder_.lock();
26 if (device_holder) {
27 descriptor_set_layout_.reset();
28 layout_.reset();
29 pipeline_.reset();
30 } else {
31 descriptor_set_layout_.release();
32 layout_.release();
33 pipeline_.release();
34 }
35}
36
37bool ComputePipelineVK::IsValid() const {
38 return is_valid_;
39}
40
41const vk::Pipeline& ComputePipelineVK::GetPipeline() const {
42 return *pipeline_;
43}
44
45const vk::PipelineLayout& ComputePipelineVK::GetPipelineLayout() const {
46 return *layout_;
47}
48
49const vk::DescriptorSetLayout& ComputePipelineVK::GetDescriptorSetLayout()
50 const {
51 return *descriptor_set_layout_;
52}
53
54} // namespace impeller
const vk::DescriptorSetLayout & GetDescriptorSetLayout() const
ComputePipelineVK(std::weak_ptr< DeviceHolderVK > device_holder, std::weak_ptr< PipelineLibrary > library, const ComputePipelineDescriptor &desc, vk::UniquePipeline pipeline, vk::UniquePipelineLayout layout, vk::UniqueDescriptorSetLayout descriptor_set_layout)
const vk::Pipeline & GetPipeline() const
const vk::PipelineLayout & GetPipelineLayout() const
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: pipeline.h:49
Definition: ref_ptr.h:256
fuchsia::ui::composition::LayoutInfo layout_