• 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
15syntax = "proto3";
16
17package gfxstream.host.snapshot;
18
19message VirtioGpuGlobalRing {}
20
21message VirtioGpuContextSpecificRing {
22    optional uint32 context_id = 1;
23    optional uint32 ring_id = 2;
24}
25
26message VirtioGpuRing {
27    oneof ring {
28        VirtioGpuGlobalRing global = 1;
29        VirtioGpuContextSpecificRing context_specific = 2;
30    }
31}
32
33message VirtioGpuTimelineFence {
34    optional uint64 id = 1;
35}
36
37// LINT.IfChange(virtio_gpu_timeline_task)
38message VirtioGpuTimelineTask {
39    optional uint64 id = 1;
40    optional VirtioGpuRing ring = 2;
41    optional uint64 trace_id = 3;
42    optional bool completed = 4;
43}
44// LINT.ThenChange(VirtioGpuTimelines.h:virtio_gpu_timeline_task)
45
46// LINT.IfChange(virtio_gpu_timeline_item)
47message VirtioGpuTimelineItem {
48    oneof item {
49        VirtioGpuTimelineFence fence = 1;
50        VirtioGpuTimelineTask task = 2;
51    }
52}
53// LINT.ThenChange(VirtioGpuTimelines.h:virtio_gpu_timeline_item)
54
55// LINT.IfChange(virtio_gpu_timeline)
56message VirtioGpuTimeline {
57    optional uint64 trace_id = 1;
58    repeated VirtioGpuTimelineItem items = 2;
59}
60// LINT.ThenChange(VirtioGpuTimelines.h:virtio_gpu_timeline)
61
62// LINT.IfChange(virtio_gpu_timelines)
63message VirtioGpuTimelinesSnapshot {
64    optional uint64 next_id = 1;
65
66    message RingWithTimeline {
67        optional VirtioGpuRing ring = 1;
68        optional VirtioGpuTimeline timeline = 2;
69    }
70    repeated RingWithTimeline timelines = 2;
71}
72// LINT.ThenChange(VirtioGpuTimelines.h:virtio_gpu_timelines)
73