1/*
2 * Copyright (C) 2023 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 */
16syntax = "proto2";
17
18package gfxstream.proto;
19
20message EglAvailability {
21    optional string vendor = 1;
22    optional string version = 2;
23    optional string extensions = 3;
24    optional string client_extensions = 4;
25
26    message GlesContextAvailability {
27        optional string vendor = 1;
28        optional string version = 2;
29        optional string renderer = 3;
30        optional string extensions = 4;
31    }
32
33    // Loading GLES functions via EGL's eglGetProcAddress().
34    optional GlesContextAvailability gles2_availability = 5;
35    optional GlesContextAvailability gles3_availability = 6;
36
37    // Loading GLES functions via GLESv2 library directly.
38    optional GlesContextAvailability gles2_direct_availability = 7;
39    optional GlesContextAvailability gles3_direct_availability = 8;
40
41    repeated string errors = 9;
42}
43
44message VulkanExternalMemoryHostQuirks {
45    repeated string errors = 1;
46    optional bool can_import_shm = 2;
47}
48
49message VulkanQuirks {
50    // See b/264575911.
51    optional bool has_issue_with_precision_qualifiers_on_yuv_samplers = 1;
52
53    optional VulkanExternalMemoryHostQuirks external_memory_host_quirks = 2;
54}
55
56message VulkanPhysicalDevice {
57    optional string name = 1;
58    repeated string extensions = 2;
59    enum Type {
60        TYPE_OTHER = 0;
61        TYPE_DISCRETE_GPU = 1;
62    }
63    optional Type type = 3;
64
65    optional VulkanQuirks quirks = 4;
66}
67
68
69message VulkanAvailability {
70    repeated string instance_extensions = 1;
71
72    repeated VulkanPhysicalDevice physical_devices = 2;
73}
74
75message GraphicsAvailability {
76    optional EglAvailability egl = 1;
77    optional VulkanAvailability vulkan = 2;
78
79    repeated string errors = 3;
80}
81