• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2024 The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include <vulkan/vulkan.h>
18 
19 #include <optional>
20 #include <vector>
21 
22 #include "gfxstream/host/Features.h"
23 
24 namespace gfxstream {
25 namespace vk {
26 
27 class EmulatedPhysicalDeviceQueueProperties {
28    public:
29     EmulatedPhysicalDeviceQueueProperties(const std::vector<VkQueueFamilyProperties>& host,
30                                           const gfxstream::host::FeatureSet& features);
31 
getQueueFamilyProperties()32     const std::vector<VkQueueFamilyProperties>& getQueueFamilyProperties() const {
33         return mQueueFamilyProperties;
34     }
hasVirtualGraphicsQueue()35     bool hasVirtualGraphicsQueue() const { return mHasVirtualGraphicsQueue; }
36 
37    private:
38     std::vector<VkQueueFamilyProperties> mQueueFamilyProperties;
39 
40     // Indicates that the graphics queue family properties are overridden for
41     // this physical device to include a virtual graphics queue.
42     bool mHasVirtualGraphicsQueue = false;
43 };
44 
45 }  // namespace vk
46 }  // namespace gfxstream