• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto3";
18
19package feature_override;
20
21option optimize_for = LITE_RUNTIME;
22
23/**
24 * GPU Vendor IDs.
25 * Taken from: external/angle/src/libANGLE/renderer/driver_utils.h
26 */
27enum GpuVendorID
28{
29    // Test ID matches every GPU Vendor ID.
30    VENDOR_ID_TEST = 0;
31    VENDOR_ID_AMD = 0x1002;
32    VENDOR_ID_ARM = 0x13B5;
33    // Broadcom devices won't use PCI, but this is their Vulkan vendor id.
34    VENDOR_ID_BROADCOM = 0x14E4;
35    VENDOR_ID_GOOGLE = 0x1AE0;
36    VENDOR_ID_INTEL = 0x8086;
37    VENDOR_ID_MESA = 0x10005;
38    VENDOR_ID_MICROSOFT = 0x1414;
39    VENDOR_ID_NVIDIA = 0x10DE;
40    VENDOR_ID_POWERVR = 0x1010;
41    // This is Qualcomm PCI Vendor ID.
42    // Android doesn't have a PCI bus, but all we need is a unique id.
43    VENDOR_ID_QUALCOMM = 0x5143;
44    VENDOR_ID_SAMSUNG = 0x144D;
45    VENDOR_ID_VIVANTE = 0x9999;
46    VENDOR_ID_VMWARE = 0x15AD;
47    VENDOR_ID_VIRTIO = 0x1AF4;
48}
49
50/**
51 * Feature Configuration
52 * feature_name: Feature name (see external/angle/include/platform/autogen/FeaturesVk_autogen.h).
53 * enabled: Either enable or disable the feature.
54 * gpu_vendor_ids: The GPU architectures this FeatureConfig applies to, if any.
55 */
56message FeatureConfig
57{
58    string feature_name         = 1;
59    bool enabled                = 2;
60    repeated GpuVendorID gpu_vendor_ids = 3;
61}
62
63/**
64 * Package Configuration
65 * feature_configs: List of features configs for the package.
66 */
67message PackageConfig
68{
69    string package_name                    = 1;
70    repeated FeatureConfig feature_configs = 2;
71}
72
73/**
74 * Feature Overrides
75 * global_features: Features to apply globally, for every package.
76 * package_features: Features to apply for individual packages.
77 */
78message FeatureOverrideProtos
79{
80    repeated FeatureConfig global_features  = 1;
81    repeated PackageConfig package_features = 2;
82}
83