summaryrefslogtreecommitdiff
path: root/retrace/daemon/playback.proto
blob: c09b1adfd5905a24d7e3e46308a8ab923be2100e (plain)
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
syntax = "proto2";
package ApiTrace;

enum RenderTargetType {
  NORMAL_RENDER = 0;
  HIGHLIGHT_RENDER = 1;
}

enum RequestType {
  OPEN_FILE_REQUEST = 1;
  RENDER_TARGET_REQUEST = 2;
  SHADER_ASSEMBLY_REQUEST = 3;
  METRICS_REQUEST = 4;
  ALL_METRICS_REQUEST = 5;
  REPLACE_SHADERS_REQUEST = 6;
  API_REQUEST = 7;
};

message OpenFileRequest {
  required string fileName = 1;
  required bytes md5Sum = 2;
  required uint32 fileSize = 3;
  required uint32 frameNumber = 4;
};

message OpenFileStatus {
  required bool needs_upload = 1;
  required bool finished = 2;
  required uint32 frame_count = 3;
}

message MetricsList {
  repeated uint64 metric_ids = 1;
  repeated string metric_names = 2;
  repeated string metric_descriptions = 3;
}

message RenderTargetRequest {
  required uint32 experiment_count = 4;
  required RenderSelection render_selection = 1;
  required RenderTargetType type = 2;
  // options is a mask of:
  // STOP_AT_RENDER = 0x1,
  // CLEAR_BEFORE_RENDER = 0x2,
  required uint32 options = 3;
}

message RenderTargetResponse {
  required uint32 selection_count = 1;
  required uint32 experiment_count = 2;
  required bytes image = 3;
}

message ShaderAssemblyRequest {
  required RenderSelection render_selection = 1;
}

message MetricsRequest {
  repeated uint64 metric_ids = 1;
  required uint32 experiment_count = 2;
}

message RenderSequence {
  required uint32 begin = 1;
  required uint32 end = 2;
}

message RenderSelection {
  required uint32 selection_count = 1;
  repeated RenderSequence render_series = 2;
}

message AllMetricsRequest {
  required RenderSelection selection = 1;
  required uint32 experiment_count = 2;
}

message ShaderAssembly {
  required string shader = 1;
  required string ir = 2;
  required string nir_ssa = 3;
  required string nir_final = 4;
  required string simd8 = 5;
  required string simd16 = 6;
  required string simd32 = 7;
  required string before_unification = 8;
  required string after_unification = 9;
  required string before_optimization = 10;
  required string const_coalescing = 11;
  required string gen_ir_lowering = 12;
  required string layout = 13;
  required string optimized = 14;
  required string push_analysis = 15;
  required string code_hoisting = 16;
  required string code_sinking = 17;
}

message ShaderAssemblyResponse {
  required uint32 render_id = 1;
  required uint32 selection_id = 2;
  required ShaderAssembly vertex = 3;
  required ShaderAssembly fragment = 4;
  required ShaderAssembly tess_control = 5;
  required ShaderAssembly tess_eval = 6;
  required ShaderAssembly geom = 7;
  required ShaderAssembly comp = 8;
  }

message MetricSeries {
  required uint64 metric_id = 1;
  repeated float data = 2;
}

message MetricsResponse {
  repeated MetricSeries metric_data = 1;
  required uint32 experiment_count = 2;
  required uint32 selection_count = 3;
}

message ReplaceShadersRequest {
  required uint32 render_id = 1;
  required uint32 experiment_count = 2;
  required string vs = 3;
  required string fs = 4;
  required string tess_control = 5;
  required string tess_eval = 6;
  required string geom = 7;
  required string comp = 8;
}

message ReplaceShadersResponse {
  required uint32 render_id = 1;
  required uint32 experiment_count = 2;
  required bool status = 3;
  required string message = 4;
}

message ApiRequest {
  required RenderSelection selection = 1;
}

message ApiResponse {
  required uint32 selection_count = 3;
  required uint32 render_id = 1;
  repeated string apis = 2;
}

message ErrorResponse {
  required uint32 severity = 1;
  required string message = 2;
}

message RetraceRequest {
  required RequestType requestType = 1;
  optional RenderTargetRequest renderTarget = 2;
  optional ShaderAssemblyRequest shaderAssembly = 3;
  optional OpenFileRequest fileOpen = 4;
  optional MetricsRequest metrics = 5;
  optional AllMetricsRequest allMetrics = 6;
  optional ReplaceShadersRequest shaders = 7;
  optional ApiRequest api = 8;
}

message RetraceResponse {
  optional RenderTargetResponse renderTarget = 1;
  optional ShaderAssemblyResponse shaderAssembly = 2;
  optional OpenFileStatus fileStatus = 3;
  optional MetricsList metricsList = 4;
  optional MetricsResponse metricsData = 5;
  optional ReplaceShadersResponse shadersData = 6;
  optional ApiResponse api = 7;
  optional ErrorResponse error = 8;
}