-
Notifications
You must be signed in to change notification settings - Fork 327
/
service.proto
1401 lines (1228 loc) · 36.6 KB
/
service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (C) 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
import "core/image/image.proto";
import "core/log/log_pb/log.proto";
import "core/os/device/device.proto";
import "gapis/api/service.proto";
import "gapis/perfetto/service/perfetto.proto";
import "gapis/service/box/box.proto";
import "gapis/service/memory_box/box.proto";
import "gapis/service/path/path.proto";
import "gapis/service/types/types.proto";
import "gapis/service/severity/severity.proto";
import "gapis/stringtable/stringtable.proto";
import "protos/perfetto/config/perfetto_config.proto";
package service;
option java_package = "com.google.gapid.proto.service";
option java_outer_classname = "Service";
option go_package = "github.com/google/gapid/gapis/service";
// DrawMode is an enumerator of draw modes that can be used by RenderSettings.
enum DrawMode {
// NORMAL indicates that the draw calls should be rendered as usual
NORMAL = 0;
// WIREFRAME_OVERLAY indicates that the single draw call should be overlayed
// with the wireframe of the mesh.
WIREFRAME_OVERLAY = 1;
// WIREFRAME_ALL indicates that all draw calls should be displayed in
// wireframe.
WIREFRAME_ALL = 2;
// OVERDRAW indicates that the draw calls should render their overdraw counts
// instead of colours.
OVERDRAW = 3;
}
message ServerInfo {
string name = 1;
uint32 version_major = 2;
uint32 version_minor = 3;
uint32 version_point = 4;
// A string list of features supported by the server. This feature list can be
// used by the client to determine what new RPCs can be called.
repeated string features = 5;
path.Device server_local_device = 6;
}
// Messages that hold a repeated field so they can be used in oneofs.
message Commands {
repeated path.Command list = 1;
}
message Contexts {
repeated path.Context list = 1;
}
message Devices {
repeated path.Device list = 1;
}
message Events {
repeated Event list = 1;
}
message StringTableInfos {
repeated stringtable.Info list = 1;
}
message Threads {
repeated path.Thread list = 1;
}
message Value {
oneof val {
Capture capture = 1;
CommandTree command_tree = 2;
CommandTreeNode command_tree_node = 3;
Commands commands = 4;
Context context = 5;
Contexts contexts = 6;
ConstantSet constant_set = 7;
Event event = 8;
Events events = 9;
Memory memory = 10;
Messages messages = 11;
path.Any path = 12;
Report report = 13;
Resources resources = 14;
StateTree state_tree = 15;
StateTreeNode state_tree_node = 16;
Stats stats = 17;
Thread thread = 18;
Threads threads = 19;
device.Instance device = 20;
DeviceTraceConfiguration traceConfig = 21;
api.Command command = 30;
api.ResourceData resource_data = 31;
api.Mesh mesh = 32;
api.Metrics metrics = 33;
api.MultiResourceData multi_resource_data = 34;
image.Info image_info = 40;
box.Value box = 50;
types.Type type = 60;
memory_box.Value memory_box = 70;
}
}
message PingRequest {
}
message PingResponse {
}
message GetServerInfoRequest {
}
message GetServerInfoResponse {
oneof res {
ServerInfo info = 1;
Error error = 2;
}
}
message CheckForUpdatesRequest {
bool include_dev_releases = 1;
}
message CheckForUpdatesResponse {
oneof res {
Release release = 1;
Error error = 2;
}
}
message Release {
string name = 1;
uint32 version_major = 2;
uint32 version_minor = 3;
uint32 version_point = 4;
bool prerelease = 5;
string browser_url = 6;
}
message GetRequest {
path.Any path = 1;
// Config to use when resolving paths.
path.ResolveConfig config = 2;
}
message GetResponse {
oneof res {
Value value = 1;
Error error = 2;
}
}
message SetRequest {
path.Any path = 1;
Value value = 2;
// Config to use when resolving paths.
path.ResolveConfig config = 3;
}
message SetResponse {
oneof res {
path.Any path = 1;
Error error = 2;
}
}
message DeleteRequest {
path.Any path = 1;
// Config to use when resolving paths.
path.ResolveConfig config = 2;
}
message DeleteResponse {
oneof res {
path.Any path = 1;
Error error = 2;
}
}
message FollowRequest {
path.Any path = 1;
// Config to use when resolving paths.
path.ResolveConfig config = 2;
}
message FollowResponse {
oneof res {
path.Any path = 1;
Error error = 2;
}
}
message ProfileRequest {
// Settings for what profile data the client wants.
// Set all to false to flush any pending data and disable profiling.
bool pprof = 1; // Enable pprof profiling?
bool trace = 2; // Enable trace data?
// Time in seconds between memory snapshots
uint32 memory_snapshot_interval = 3;
}
message ProfileResponse {
bytes pprof = 1; // Streamed pprof data.
bytes trace = 2; // Streamed trace data.
Error error = 3;
}
message GetPerformanceCountersRequest {
}
message GetPerformanceCountersResponse {
oneof res {
string data = 1;
Error error = 2;
}
}
message GetProfileRequest {
string name = 1;
int32 debug = 2;
}
message GetProfileResponse {
oneof res {
bytes data = 1;
Error error = 2;
}
}
enum TaskStatus {
STARTING = 0;
FINISHED = 1;
PROGRESS = 2;
BLOCKED = 3;
UNBLOCKED = 4;
EVENT = 5;
}
message TaskUpdate {
TaskStatus status = 1;
uint64 id = 2;
uint64 parent = 3;
string name = 4;
int32 complete_percent = 5;
bool background = 6;
string event = 7;
}
message MemoryStatus {
uint64 totalHeap = 1;
}
enum ReplayStatus {
REPLAY_QUEUED = 0;
REPLAY_STARTED = 1;
REPLAY_EXECUTING = 2;
REPLAY_FINISHED = 3;
}
message ReplayUpdate {
uint32 replay_id = 1;
path.Device device = 2;
ReplayStatus status = 3;
// Progress information below, sent if status is EXECUTING.
uint64 label = 4;
uint32 total_instrs = 5;
uint32 finished_instrs = 6;
}
message ServerStatusRequest {
float memory_snapshot_interval = 1;
float status_update_frequency = 2;
}
message ServerStatusResponse {
oneof res {
TaskUpdate task = 1;
MemoryStatus memory = 2;
ReplayUpdate replay = 3;
}
}
message GetAvailableStringTablesRequest {
}
message GetAvailableStringTablesResponse {
oneof res {
StringTableInfos tables = 1;
Error error = 2;
}
}
message GetStringTableRequest {
stringtable.Info table = 1;
}
message GetStringTableResponse {
oneof res {
stringtable.StringTable table = 1;
Error error = 2;
}
}
message Message {
uint64 timestamp = 1;
string message = 2;
}
message Messages {
repeated Message list = 1;
}
message ImportCaptureRequest {
string name = 1;
bytes data = 2;
}
message ImportCaptureResponse {
oneof res {
path.Capture capture = 1;
Error error = 2;
}
}
message ExportCaptureRequest {
path.Capture capture = 1;
}
message ExportCaptureResponse {
oneof res {
bytes data = 1;
Error error = 2;
}
}
message LoadCaptureRequest {
string path = 1;
}
message LoadCaptureResponse {
oneof res {
path.Capture capture = 1;
Error error = 2;
}
}
message SaveCaptureRequest {
path.Capture capture = 1;
string path = 2;
}
message SaveCaptureResponse {
Error error = 1;
}
message ExportReplayOptions {
path.Report report = 1;
repeated GetFramebufferAttachmentRequest get_framebuffer_attachment_requests =
2;
GetTimestampsRequest get_timestamps_request = 3;
bool display_to_surface = 4;
int32 LoopCount = 5;
}
message ExportReplayRequest {
path.Capture capture = 1;
string path = 2;
path.Device device = 3;
ExportReplayOptions options = 4;
}
message ExportReplayResponse {
Error error = 1;
}
message DCECaptureRequest {
path.Capture capture = 1;
repeated path.Command commands = 2;
}
message DCECaptureResponse {
oneof res {
path.Capture capture = 1;
Error error = 2;
}
}
enum GraphFormat {
PBTXT = 0;
DOT = 1;
}
message GraphVisualizationRequest {
path.Capture capture = 1;
GraphFormat format = 2;
}
message GraphVisualizationResponse {
oneof res {
bytes graphVisualization = 1;
Error error = 2;
}
}
message GetDevicesRequest {
}
message GetDevicesResponse {
oneof res {
Devices devices = 1;
Error error = 2;
}
}
message GetDevicesForReplayRequest {
path.Capture capture = 1;
}
message GetDevicesForReplayResponse {
oneof res {
Devices devices = 1;
Error error = 2;
}
}
message ReplaySettings {
path.Device device = 1;
bool disable_replay_optimization = 2;
bool display_to_surface = 3;
}
message GetFramebufferAttachmentRequest {
ReplaySettings replay_settings = 1;
path.Command after = 2;
api.FramebufferAttachment attachment = 3;
RenderSettings settings = 4;
UsageHints hints = 5;
}
message GetFramebufferAttachmentResponse {
oneof res {
path.ImageInfo image = 1;
Error error = 2;
}
}
message GetLogStreamRequest {
}
message FindRequest {
// If true then searching will begin at from and move backwards.
bool backwards = 1;
// Maximum number of results to return. 0 means unlimited.
uint32 max_items = 2;
// The searching point.
oneof from {
path.CommandTreeNode command_tree_node = 5;
path.StateTreeNode state_tree_node = 6;
}
// The text to search for.
string text = 3;
// If true then text should be treated as a regular expression.
bool is_regex = 4;
// If true the search should be case sensitive.
bool is_case_sensitive = 7;
// If true, the search will wrap.
bool wrap = 8;
// Config to use when resolving paths.
path.ResolveConfig config = 9;
}
message FindResponse {
oneof result {
path.CommandTreeNode command_tree_node = 1;
path.StateTreeNode state_tree_node = 2;
}
}
enum ClientAction {
Undefined = 0;
Color0 = 1;
Color1 = 2;
Color2 = 3;
Color3 = 4;
Copy = 5;
CullOn = 6;
CullOff = 7;
Depth = 8;
Disable = 9;
Edit = 10;
Enable = 11;
Faceted = 12;
Flat = 13;
Flip = 14;
GotoReference = 15;
HideHistogram = 16;
Move = 17;
Normals = 18;
Open = 19;
OpenRecent = 20;
OverlayWireframe = 21;
Points = 22;
Save = 23;
Search = 24;
Select = 25;
SelectObservation = 26;
SelectProgram = 27;
SelectShader = 28;
Shaded = 29;
Show = 30;
ShowActivityPicker = 31;
ShowBackground = 32;
ShowColorChannels = 33;
ShowEdit = 34;
ShowError = 35;
ShowHelp = 36;
ShowHistogram = 37;
ShowLogDir = 38;
ShowReferences = 39;
ShowTargets = 40;
Smooth = 41;
Triangles = 42;
WindingCCW = 43;
WindingCW = 44;
Wireframe = 45;
YUp = 46;
ZUp = 47;
ZoomActual = 48;
ZoomFit = 49;
ZoomIn = 50;
ZoomOut = 51;
VertexSemantics = 52;
Overdraw = 53;
}
message ClientInteraction {
string view = 1;
ClientAction action = 2;
};
message ClientEventRequest {
oneof kind {
ClientInteraction interaction = 1;
}
}
message ClientEventResponse {
}
message UpdateSettingsRequest {
// Enables or disable anonymous crash reporting.
// This will override the -crashreport command line flag.
bool enable_crash_reporting = 1;
// Enables or disable anonymous analytics reporting.
// This will override the -analytics command line flag.
bool enable_analytics = 2;
// The client identifier to use for analytics reporting.
// This will override the -analytics command line flag.
string client_id = 3;
// The path to the adb executable to use.
// This will override the -adb command line flag.
string adb = 4;
}
message UpdateSettingsResponse {
Error error = 1;
}
message PerfettoQueryRequest {
path.Capture capture = 1;
string query = 2;
}
message PerfettoQueryResponse {
oneof res {
perfetto.QueryResult result = 1;
Error error = 2;
}
}
// Gapid is the RPC service to the GAPIS server.
service Gapid {
// Ping is a no-op function that returns immediately.
// It can be used to measure connection latency or to keep the
// process alive if started with the "idle-timeout" command line flag.
rpc Ping(PingRequest) returns (PingResponse) {
}
// GetServerInfo returns information about the running server.
rpc GetServerInfo(GetServerInfoRequest) returns (GetServerInfoResponse) {
}
// CheckForUpdates checks for a new build of GAPID on the hosting server.
// Care should be taken to call this infrequently to avoid reaching the
// server's maximum unauthenticated request limits.
rpc CheckForUpdates(CheckForUpdatesRequest)
returns (CheckForUpdatesResponse) {
}
// Get resolves and returns the object, value or memory at the path p.
rpc Get(GetRequest) returns (GetResponse) {
}
// Set creates a copy of the capture referenced by p, but with the object,
// value or memory at p replaced with v. The path returned is identical to p,
// but with the base changed to refer to the new capture.
rpc Set(SetRequest) returns (SetResponse) {
}
// Delete creates a copy of the capture referenced by p, but without the
// object, value or memory at p. The path returned is identical to p, but with
// the base changed to refer to the new capture.
rpc Delete(DeleteRequest) returns (DeleteResponse) {
}
// Follow returns the path to the object that the value at p links to.
// If the value at p does not link to anything then nil is returned.
rpc Follow(FollowRequest) returns (FollowResponse) {
}
// GetAvailableStringTables returns list of available string table
// descriptions.
rpc GetAvailableStringTables(GetAvailableStringTablesRequest)
returns (GetAvailableStringTablesResponse) {
}
// GetStringTable returns the requested string table.
rpc GetStringTable(GetStringTableRequest) returns (GetStringTableResponse) {
}
// Import imports capture data emitted by the graphics spy, returning the new
// capture identifier.
rpc ImportCapture(ImportCaptureRequest) returns (ImportCaptureResponse) {
}
// ExportCapture returns a capture's data that can be consumed by
// ImportCapture or LoadCapture.
rpc ExportCapture(ExportCaptureRequest) returns (ExportCaptureResponse) {
}
// LoadCapture imports capture data from a local file, returning the new
// capture identifier.
rpc LoadCapture(LoadCaptureRequest) returns (LoadCaptureResponse) {
}
// SaveCapture saves capture to a file.
rpc SaveCapture(SaveCaptureRequest) returns (SaveCaptureResponse) {
}
// ExportReplay saves replay commands and assets to file.
rpc ExportReplay(ExportReplayRequest) returns (ExportReplayResponse) {
}
// DCECapture returns a new capture containing only the requested commands
// and their dependencies.
rpc DCECapture(DCECaptureRequest) returns (DCECaptureResponse) {
}
rpc GetGraphVisualization(GraphVisualizationRequest)
returns (GraphVisualizationResponse) {
}
// GetDevices returns the full list of replay devices avaliable to the server.
// These include local replay devices and any connected Android devices.
// This list may change over time, as devices are connected and disconnected.
// The primary device (usually host) will be first.
rpc GetDevices(GetDevicesRequest) returns (GetDevicesResponse) {
}
// GetDevicesForReplay returns the list of replay devices avaliable to the
// server that are capable of replaying the given capture.
// These include local replay devices and any connected Android devices.
// This list may change over time, as devices are connected and disconnected.
// If both connected Android and Local replay devices are found,
// the local Android devices will be returned first.
rpc GetDevicesForReplay(GetDevicesForReplayRequest)
returns (GetDevicesForReplayResponse) {
}
// GetFramebufferAttachment returns the ImageInfo identifier describing the
// given framebuffer attachment and device, immediately following the command
// after.
// The provided RenderSettings structure can be used to adjust maximum desired
// dimensions of the image, as well as applying debug visualizations.
rpc GetFramebufferAttachment(GetFramebufferAttachmentRequest)
returns (GetFramebufferAttachmentResponse) {
}
// GetLogStream calls the handler with each log record raised until the
// context is cancelled.
rpc GetLogStream(GetLogStreamRequest) returns (stream log.Message) {
}
// Find searches for data, streaming the results.
rpc Find(FindRequest) returns (stream FindResponse) {
}
// ClientEvent records a client event action, used for analytics.
// If the user has not opted-in for analytics then this call does nothing.
rpc ClientEvent(ClientEventRequest) returns (ClientEventResponse) {
}
// FindTraceTargets returns trace targets matching the given search
// parameters.
rpc FindTraceTargets(FindTraceTargetsRequest)
returns (FindTraceTargetsResponse) {
}
// TraceTargetTreeNode returns information about the trace target
rpc TraceTargetTreeNode(TraceTargetTreeNodeRequest)
returns (TraceTargetTreeNodeResponse) {
}
// Trace returns a steam that can be used to start and stop
// a trace
rpc Trace(stream TraceRequest) returns (stream TraceResponse) {
}
// Updates environment settings.
rpc UpdateSettings(UpdateSettingsRequest) returns (UpdateSettingsResponse) {
}
// Status returns a stream of Status events that are occuring on the server
rpc Status(ServerStatusRequest) returns (stream ServerStatusResponse) {
}
// Runs a Perfetto Query. This is done separatly from .Get, because the query
// results should not be cached, as they can change due to 'update' queries.
rpc PerfettoQuery(PerfettoQueryRequest) returns (PerfettoQueryResponse) {
}
// GpuProfile starts a perfetto trace of a gfxtrace
rpc GpuProfile(GpuProfileRequest) returns (GpuProfileResponse) {
}
///////////////////////////////////////////////////////////////
// Below are debugging APIs which may be removed in the future.
///////////////////////////////////////////////////////////////
// Profile starts self-profiling the server.
rpc Profile(stream ProfileRequest) returns (stream ProfileResponse) {
}
// GetPerformanceCounters returns the values of all global counters as
// a JSON blob.
rpc GetPerformanceCounters(GetPerformanceCountersRequest)
returns (GetPerformanceCountersResponse) {
}
// GetProfile returns the pprof profile with the given name.
rpc GetProfile(GetProfileRequest) returns (GetProfileResponse) {
}
// GetTimestamps returns a stream contains the timestamps of the begin
// and end of execution of a command buffer.
rpc GetTimestamps(GetTimestampsRequest)
returns (stream GetTimestampsResponse) {
}
rpc ValidateDevice(ValidateDeviceRequest) returns (ValidateDeviceResponse) {
}
}
message ValidateDeviceRequest {
path.Device device = 1;
}
message ValidateDeviceResponse {
Error error = 1;
}
message Error {
oneof err {
ErrInternal err_internal = 1;
ErrDataUnavailable err_data_unavailable = 2;
ErrInvalidPath err_invalid_path = 3;
ErrInvalidArgument err_invalid_argument = 4;
ErrPathNotFollowable err_path_not_followable = 5;
ErrUnsupportedVersion err_unsupported_version = 6;
}
}
// ErrInternal is the error raised when an internal server error has occurred.
message ErrInternal {
string message = 1;
}
// ErrDataUnavailable is the error raised when the requested data is
// unavailable. For instance: the error raised when a framebuffer is
// requested at a point in the capture where none is bound.
message ErrDataUnavailable {
// The reason the data is unavailable.
stringtable.Msg reason = 1;
// If true, then making the same request at a later time may result in data.
bool transient = 2;
}
// ErrInvalidPath is the error raised when the specified path is invalid.
// This type of error is permanent.
message ErrInvalidPath {
// The description of what's invalid.
stringtable.Msg reason = 1;
// The part of the path that was invalid.
path.Any path = 2;
}
// ErrInvalidArgument is the error raised when one of the parameters to an RPC
// call is invalid.
// This type of error is permanent.
message ErrInvalidArgument {
// The description of what's invalid.
stringtable.Msg reason = 1;
}
// ErrPathNotFollowable is the error raised when attempting to follow a path
// that cannot be followed.
message ErrPathNotFollowable {
path.Any path = 1;
}
// ErrUnsupportedVersion is the error raised attempting to load data with an
// unsupported version.
message ErrUnsupportedVersion {
// The reason the data is unsupported.
stringtable.Msg reason = 1;
// If true, the client should prompt the user to update GAPID.
bool suggest_update = 2;
}
enum TraceType {
Graphics = 0;
Perfetto = 1;
}
// Capture describes single capture file held by the server.
message Capture {
// The type of this capture.
TraceType type = 7;
// Name given to the capture. e.g. "KittyWorld"
string name = 1;
// Information about the device used to create the capture.
device.Instance device = 2;
// Information about the abi used by the traced process.
device.ABI ABI = 3;
// Number of commands in this capture.
uint64 num_commands = 4;
// List of graphics APIs used by this capture.
repeated path.API APIs = 5;
// List of all the memory observations made by the application.
repeated MemoryRange observations = 6;
}
// Report describes all warnings and errors found by a capture.
message Report {
// Report items for this report.
repeated ReportItem items = 1;
// Report groups for this report.
repeated ReportGroup groups = 2;
// Array of strings for messages.
repeated string strings = 3;
// Array of values for messages.
repeated stringtable.Value values = 4;
}
// ReportItem represents an entry in a report.
message ReportItem {
// The severity of the report item.
severity.Severity severity = 1;
// The message for the item.
MsgRef message = 2;
// The path to the command that reported the issue.
path.Command command = 3;
// The references to tags associated with this item.
repeated MsgRef tags = 4;
}
// Stats stores the statistics for a capture
message Stats {
// The draw calls per frame, if requested in the path.Stats.
repeated uint64 draw_calls = 1;
uint64 trace_start = 2;
}
// Thread represents a single thread in the capture.
message Thread {
string name = 1;
}
// MsgRef references a message in a Report.
message MsgRef {
// The index in Report.strings of the message identifier.
uint32 identifier = 1;
// The indexed arguments.
repeated MsgRefArgument arguments = 2;
}
// MsgRefArgument is an argument formed from two indices into the report.
message MsgRefArgument {
// The index in Report.strings of the argument identifier.
uint32 key = 1;
// The index in Report.values of the argument value.
uint32 value = 2;
}
// ReportGroup represents a group of ReportItem which have the same tag.
message ReportGroup {
// The reference to Msg which describes this group.
MsgRef name = 1;
// The indices of report items which belong to this group.
repeated uint32 items = 2;
// The union of all Items tags. Currently isn't supported and is nil. TODO:
// Add filtering support for the entire group.
repeated MsgRef tags = 3;
}
// Memory describes the state of a range of memory at a specific point in
// the command stream.
message Memory {
// The memory values for the span.
bytes data = 1;
// The data-relative ranges that were read-from at the specified command.
repeated MemoryRange reads = 2;
// The data-relative ranges that were written-to at the specified command.
repeated MemoryRange writes = 3;
// The data-relative ranges that have been observed.
repeated MemoryRange observed = 4;
// All types of the reads on this command
repeated TypedMemoryRange typed_ranges = 5;
}
// MemoryRange represents a contiguous range of memory.
message MemoryRange {
// The address of the first byte in the memory range.
uint64 base = 1;
// The number of bytes that are in the memory range.
uint64 size = 2;
}
message TypedMemoryRange {
// The type of the memory observations
path.Type type = 1;
MemoryRange range = 2;
// The root of the memory observation
uint64 root = 3;
}
// UsageHints hints to the server the intended usage of the result of a request.
// This can be used to improve performance and responsiveness of the RPCs.
message UsageHints {
// Preview indicates that the request has been made for a thumbnail or
// low-quality representation of the underlying data. Previews are considered
// non-critical and non-urgent; the server may consider scheduling other work
// ahead of previews, and possibly delay the processing of the request to
// batch together requests.
bool preview = 1;
// Primary indicates that the request has been made for the primary view.
// Primary requests are prioritized and are low-latency.
bool primary = 2;
// Background indicates that this request is non-critical, non-urgent and
// should process in the background. All other non-background processes should
// be considered more urgent. Background requests may be interrupted for
// non-background requests.
bool background = 3;
}
// RenderSettings contains settings and flags to be used in replaying and
// returning a bound render target's color buffer.
message RenderSettings {
// The desired maximum width of the image. The returned image may be larger
// than this.
uint32 max_width = 1;
// The desired minimum height of the image. The returned image may be larger
// than this.
uint32 max_height = 2;
// The draw mode to use when rendering.
DrawMode draw_mode = 3;
}
// Resources contains the full list of resources used by a capture.
message Resources {
repeated ResourcesByType types = 1;
map<string, api.ResourceType> resourcesToTypes = 2;
}
// ResourcesByType contains all resources of a specific type.
message ResourcesByType {
api.ResourceType type = 1;
repeated Resource resources = 2;
}
// Resource describes a single resource.