File: DDModel.serialization.in

package info (click to toggle)
webkit2gtk 2.51.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 455,340 kB
  • sloc: cpp: 3,865,253; javascript: 197,710; ansic: 165,177; python: 49,241; asm: 21,868; ruby: 18,095; perl: 16,926; xml: 4,623; sh: 2,409; yacc: 2,356; java: 2,019; lex: 1,330; pascal: 372; makefile: 210
file content (280 lines) | stat: -rw-r--r-- 8,189 bytes parent folder | download | duplicates (2)
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
# Copyright (C) 2025 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1.  Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
# 2.  Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#if ENABLE(GPU_PROCESS_MODEL)
header: <WebCore/DDFloat4x4.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDFloat4x4 {
    float m00;
    float m01;
    float m02;
    float m03;

    float m10;
    float m11;
    float m12;
    float m13;

    float m20;
    float m21;
    float m22;
    float m23;

    float m30;
    float m31;
    float m32;
    float m33;
};

header: <WebCore/DDFloat3.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDFloat3 {
    float x;
    float y;
    float z;
    float w;
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDEdge {
    long upstreamNodeIndex;
    long downstreamNodeIndex;
    String upstreamOutputName;
    String downstreamInputName;
};

header: <WebCore/DDMaterialDescriptor.h>
[CustomHeader] enum class WebCore::DDModel::DDDataType : uint8_t {
    kBool,
    kInt,
    kInt2,
    kInt3,
    kInt4,
    kFloat,
    kColor3f,
    kColor3h,
    kColor4f,
    kColor4h,
    kFloat2,
    kFloat3,
    kFloat4,
    kHalf,
    kHalf2,
    kHalf3,
    kHalf4,
    kMatrix2f,
    kMatrix3f,
    kMatrix4f,
    kSurfaceShader,
    kGeometryModifier,
    kString,
    kToken,
    kAsset
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDPrimvar {
    String name;
    String referencedGeomPropName;
    uint64_t attributeFormat;
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDInputOutput {
    WebCore::DDModel::DDDataType type;
    String name;
};

header: <WebCore/DDMaterialDescriptor.h>
[CustomHeader] enum class WebCore::DDModel::DDConstant : uint8_t {
    kBool,
    kUchar,
    kInt,
    kUint,
    kHalf,
    kFloat,
    kTimecode,
    kString,
    kToken,
    kAsset,
    kMatrix2f,
    kMatrix3f,
    kMatrix4f,
    kQuatf,
    kQuath,
    kFloat2,
    kHalf2,
    kInt2,
    kFloat3,
    kHalf3,
    kInt3,
    kFloat4,
    kHalf4,
    kInt4,
    kPoint3f,
    kPoint3h,
    kNormal3f,
    kNormal3h,
    kVector3f,
    kVector3h,
    kColor3f,
    kColor3h,
    kColor4f,
    kColor4h,
    kTexCoord2h,
    kTexCoord2f,
    kTexCoord3h,
    kTexCoord3f
};

header: <WebCore/DDMaterialDescriptor.h>
[CustomHeader] enum class WebCore::DDModel::DDNodeType : uint8_t {
    Builtin,
    Constant,
    Arguments,
    Results
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDConstantContainer {
    WebCore::DDModel::DDConstant constant;
    Vector<Variant<String, double>> constantValues;
    String name;
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDBuiltin {
    String definition;
    String name;
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDNode {
    WebCore::DDModel::DDNodeType bridgeNodeType;
    WebCore::DDModel::DDBuiltin builtin;
    WebCore::DDModel::DDConstantContainer constant;
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDMaterialGraph {
    Vector<WebCore::DDModel::DDNode> nodes;
    Vector<WebCore::DDModel::DDEdge> edges;
    Vector<WebCore::DDModel::DDInputOutput> inputs;
    Vector<WebCore::DDModel::DDInputOutput> outputs;
    Vector<WebCore::DDModel::DDPrimvar> primvars;
    String identifier;
};

header: <WebCore/DDMeshDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDMeshDescriptor {
    int32_t indexCapacity;
    int32_t indexType;
    int32_t vertexBufferCount;
    int32_t vertexCapacity;
    Vector<WebCore::DDModel::DDVertexAttributeFormat> vertexAttributes;
    Vector<WebCore::DDModel::DDVertexLayout> vertexLayouts;
    String identifier;
};

header: <WebCore/DDUpdateTextureDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDUpdateTextureDescriptor {
    WebCore::DDModel::DDImageAsset imageAsset;
};

header: <WebCore/DDTextureDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDTextureDescriptor {
    WebCore::DDModel::DDImageAsset imageAsset;
};

header: <WebCore/DDUpdateMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDUpdateMaterialDescriptor {
    WebCore::DDModel::DDMaterialGraph materialGraph;
};

header: <WebCore/DDReplaceVertices.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDReplaceVertices {
    int32_t bufferIndex;
    Vector<uint8_t> buffer;
};

header: <WebCore/DDUpdateMeshDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDUpdateMeshDescriptor {
    int32_t partCount;
    Vector<KeyValuePair<int32_t, WebCore::DDModel::DDMeshPart>> parts;
    Vector<KeyValuePair<int32_t, uint64_t>> renderFlags;
    Vector<WebCore::DDModel::DDReplaceVertices> vertices;
    Vector<uint8_t> indices;
    WebCore::DDModel::DDFloat4x4 transform;
    Vector<WebCore::DDModel::DDFloat4x4> instanceTransforms4x4;
    Vector<String> materialIds;
    String identifier;
};

header: <WebCore/DDVertexAttributeFormat.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDVertexAttributeFormat {
    int32_t semantic;
    int32_t format;
    int32_t layoutIndex;
    int32_t offset;
};

header: <WebCore/DDVertexLayout.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDVertexLayout {
    int32_t bufferIndex;
    int32_t bufferOffset;
    int32_t bufferStride;
};

header: <WebCore/DDMaterialDescriptor.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDMaterialDescriptor {
    WebCore::DDModel::DDMaterialGraph materialGraph;
};

header: <WebCore/DDImageAsset.h>
[CustomHeader] enum class WebCore::DDModel::DDSemantic : uint8_t {
    Color,
    Vector,
    Scalar,
    Unknown
};

header: <WebCore/DDImageAsset.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDImageAsset {
    Vector<uint8_t> data;
    uint32_t width;
    uint32_t height;
    uint32_t bytesPerPixel;
    WebCore::DDModel::DDSemantic semantic;
    String path;
    String identifier;
};

header: <WebCore/DDMeshPart.h>
[AdditionalEncoder=StreamConnectionEncoder, CustomHeader] struct WebCore::DDModel::DDMeshPart {
    uint32_t indexOffset;
    uint32_t indexCount;
    uint32_t topology;
    uint32_t materialIndex;
    WebCore::DDModel::DDFloat3 boundsMin;
    WebCore::DDModel::DDFloat3 boundsMax;
};

#endif