forked from google/gapid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.proto
164 lines (153 loc) · 4.21 KB
/
image.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
// 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/stream/stream.proto";
package image;
option java_package = "com.google.gapid.proto.image";
option java_outer_classname = "Image";
option go_package = "github.com/google/gapid/core/image";
// ID is a 20-byte identifier.
message ID {
bytes data = 1;
}
// Data is a one, two or three dimensional image.
message Data {
// The format of the image.
Format format = 1;
// The width of the image in pixels.
uint32 width = 2;
// The height of the image in pixels. Must be 1 for 1D images.
uint32 height = 3;
// The depth of the image in pixels. Must be 1 for 1D or 2D images.
uint32 depth = 4;
// The pixel data.
bytes bytes = 5;
}
// Info describes a one, two or three dimensional image.
message Info {
// The format of the image.
Format format = 1;
// The width of the image in pixels.
uint32 width = 2;
// The height of the image in pixels. Must be 1 for 1D images.
uint32 height = 3;
// The depth of the image in pixels. Must be 1 for 1D or 2D images.
uint32 depth = 4;
// The identifier of the image data as bytes.
ID bytes = 5;
}
message Format {
string name = 1;
oneof format {
FmtPNG png = 2;
FmtUncompressed uncompressed = 3;
FmtATC_RGB_AMD atc_rgb_amd = 4;
FmtATC_RGBA_EXPLICIT_ALPHA_AMD atc_rgba_explicit_alpha_amd = 5;
FmtATC_RGBA_INTERPOLATED_ALPHA_AMD atc_rgba_interpolated_alpha_amd = 6;
FmtETC1_RGB_U8_NORM etc1_rgb_u8_norm = 7;
FmtETC2_RGB_U8_NORM etc2_rgb_u8_norm = 8;
FmtETC2_RGBA_U8_NORM etc2_rgba_u8_norm = 9;
FmtETC2_RGBA_U8U8U8U1_NORM etc2_rgba_u8u8u8u1_norm = 10;
FmtETC2_R_U11_NORM etc2_r_u11_norm = 11;
FmtETC2_RG_U11_NORM etc2_rg_u11_norm = 12;
FmtETC2_R_S11_NORM etc2_r_s11_norm = 13;
FmtETC2_RG_S11_NORM etc2_rg_s11_norm = 14;
FmtS3_DXT1_RGB s3_dxt1_rgb = 15;
FmtS3_DXT1_RGBA s3_dxt1_rgba = 16;
FmtS3_DXT3_RGBA s3_dxt3_rgba = 17;
FmtS3_DXT5_RGBA s3_dxt5_rgba = 18;
FmtASTC astc = 19;
FmtRGTC1_BC4_R_U8_NORM rgtc1_bc4_r_u8_norm = 20;
FmtRGTC1_BC4_R_S8_NORM rgtc1_bc4_r_s8_norm = 21;
FmtRGTC2_BC5_RG_U8_NORM rgtc2_bc5_rg_u8_norm = 22;
FmtRGTC2_BC5_RG_S8_NORM rgtc2_bc5_rg_s8_norm = 23;
}
}
message FmtUncompressed {
stream.Format format = 1;
}
message FmtPNG {
}
message FmtATC_RGB_AMD {
}
message FmtATC_RGBA_EXPLICIT_ALPHA_AMD {
}
message FmtATC_RGBA_INTERPOLATED_ALPHA_AMD {
}
message FmtETC1_RGB_U8_NORM {
}
message FmtETC2_RGB_U8_NORM {
bool srgb = 1;
}
message FmtETC2_RGBA_U8_NORM {
bool srgb = 1;
}
message FmtETC2_RGBA_U8U8U8U1_NORM {
bool srgb = 1;
}
message FmtETC2_R_U11_NORM {
}
message FmtETC2_RG_U11_NORM {
}
message FmtETC2_R_S11_NORM {
}
message FmtETC2_RG_S11_NORM {
}
message FmtS3_DXT1_RGB {
}
message FmtS3_DXT1_RGBA {
}
message FmtS3_DXT3_RGBA {
}
message FmtS3_DXT5_RGBA {
}
message FmtASTC {
uint32 block_width = 1;
uint32 block_height = 2;
bool srgb = 3;
}
message FmtRGTC1_BC4_R_U8_NORM {
}
message FmtRGTC1_BC4_R_S8_NORM {
}
message FmtRGTC2_BC5_RG_U8_NORM {
}
message FmtRGTC2_BC5_RG_S8_NORM {
}
// GAPIS internal structure.
message ConvertResolvable {
ID bytes = 1;
uint32 width = 2;
uint32 height = 3;
uint32 depth = 4;
Format format_from = 5;
Format format_to = 6;
// Number of bytes between rows in the source image. If 0 then rows are
// contiguous.
uint32 row_stride_from = 7;
// Number of bytes between each 2D slice in the source image. If 0 then slices
// are contiguous.
uint32 slice_stride_from = 8;
}
// GAPIS internal structure.
message ResizeResolvable {
ID bytes = 1;
Format format = 2;
uint32 src_width = 3;
uint32 src_height = 4;
uint32 src_depth = 5;
uint32 dst_width = 6;
uint32 dst_height = 7;
uint32 dst_depth = 8;
}