1 /* Generated code, see v3d_packet_v21.xml, v3d_packet_v33.xml and gen_pack_header.py */
2
3
4 /* Packets, enums and structures for V3D 3.3.
5 *
6 * This file has been generated, do not hand edit.
7 */
8
9 #ifndef V3D33_PACK_H
10 #define V3D33_PACK_H
11
12 #include "cle/v3d_packet_helpers.h"
13
14
15 enum V3D33_Compare_Function {
16 V3D_COMPARE_FUNC_NEVER = 0,
17 V3D_COMPARE_FUNC_LESS = 1,
18 V3D_COMPARE_FUNC_EQUAL = 2,
19 V3D_COMPARE_FUNC_LEQUAL = 3,
20 V3D_COMPARE_FUNC_GREATER = 4,
21 V3D_COMPARE_FUNC_NOTEQUAL = 5,
22 V3D_COMPARE_FUNC_GEQUAL = 6,
23 V3D_COMPARE_FUNC_ALWAYS = 7,
24 };
25
26 enum V3D33_Blend_Factor {
27 V3D_BLEND_FACTOR_ZERO = 0,
28 V3D_BLEND_FACTOR_ONE = 1,
29 V3D_BLEND_FACTOR_SRC_COLOR = 2,
30 V3D_BLEND_FACTOR_INV_SRC_COLOR = 3,
31 V3D_BLEND_FACTOR_DST_COLOR = 4,
32 V3D_BLEND_FACTOR_INV_DST_COLOR = 5,
33 V3D_BLEND_FACTOR_SRC_ALPHA = 6,
34 V3D_BLEND_FACTOR_INV_SRC_ALPHA = 7,
35 V3D_BLEND_FACTOR_DST_ALPHA = 8,
36 V3D_BLEND_FACTOR_INV_DST_ALPHA = 9,
37 V3D_BLEND_FACTOR_CONST_COLOR = 10,
38 V3D_BLEND_FACTOR_INV_CONST_COLOR = 11,
39 V3D_BLEND_FACTOR_CONST_ALPHA = 12,
40 V3D_BLEND_FACTOR_INV_CONST_ALPHA = 13,
41 V3D_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
42 };
43
44 enum V3D33_Blend_Mode {
45 V3D_BLEND_MODE_ADD = 0,
46 V3D_BLEND_MODE_SUB = 1,
47 V3D_BLEND_MODE_RSUB = 2,
48 V3D_BLEND_MODE_MIN = 3,
49 V3D_BLEND_MODE_MAX = 4,
50 V3D_BLEND_MODE_MUL = 5,
51 V3D_BLEND_MODE_SCREEN = 6,
52 V3D_BLEND_MODE_DARKEN = 7,
53 V3D_BLEND_MODE_LIGHTEN = 8,
54 };
55
56 enum V3D33_Stencil_Op {
57 V3D_STENCIL_OP_ZERO = 0,
58 V3D_STENCIL_OP_KEEP = 1,
59 V3D_STENCIL_OP_REPLACE = 2,
60 V3D_STENCIL_OP_INCR = 3,
61 V3D_STENCIL_OP_DECR = 4,
62 V3D_STENCIL_OP_INVERT = 5,
63 V3D_STENCIL_OP_INCWRAP = 6,
64 V3D_STENCIL_OP_DECWRAP = 7,
65 };
66
67 enum V3D33_Primitive {
68 V3D_PRIM_POINTS = 0,
69 V3D_PRIM_LINES = 1,
70 V3D_PRIM_LINE_LOOP = 2,
71 V3D_PRIM_LINE_STRIP = 3,
72 V3D_PRIM_TRIANGLES = 4,
73 V3D_PRIM_TRIANGLE_STRIP = 5,
74 V3D_PRIM_TRIANGLE_FAN = 6,
75 V3D_PRIM_POINTS_TF = 16,
76 V3D_PRIM_LINES_TF = 17,
77 V3D_PRIM_LINE_LOOP_TF = 18,
78 V3D_PRIM_LINE_STRIP_TF = 19,
79 V3D_PRIM_TRIANGLES_TF = 20,
80 V3D_PRIM_TRIANGLE_STRIP_TF = 21,
81 V3D_PRIM_TRIANGLE_FAN_TF = 22,
82 };
83
84 enum V3D33_TMU_Filter {
85 V3D_TMU_FILTER_MIN_LIN_MIP_NONE_MAG_LIN = 0,
86 V3D_TMU_FILTER_MIN_LIN_MIP_NONE_MAG_NEAR = 1,
87 V3D_TMU_FILTER_MIN_NEAR_MIP_NONE_MAG_LIN = 2,
88 V3D_TMU_FILTER_MIN_NEAR_MIP_NONE_MAG_NEAR = 3,
89 V3D_TMU_FILTER_MIN_NEAR_MIP_NEAR_MAG_LIN = 4,
90 V3D_TMU_FILTER_MIN_NEAR_MIP_NEAR_MAG_NEAR = 5,
91 V3D_TMU_FILTER_MIN_NEAR_MIP_LIN_MAG_LIN = 6,
92 V3D_TMU_FILTER_MIN_NEAR_MIP_LIN_MAG_NEAR = 7,
93 V3D_TMU_FILTER_MIN_LIN_MIP_NEAR_MAG_LIN = 8,
94 V3D_TMU_FILTER_MIN_LIN_MIP_NEAR_MAG_NEAR = 9,
95 V3D_TMU_FILTER_MIN_LIN_MIP_LIN_MAG_LIN = 10,
96 V3D_TMU_FILTER_MIN_LIN_MIP_LIN_MAG_NEAR = 11,
97 V3D_TMU_FILTER_ANISOTROPIC_2_1 = 12,
98 V3D_TMU_FILTER_ANISOTROPIC_4_1 = 13,
99 V3D_TMU_FILTER_ANISOTROPIC_8_1 = 14,
100 V3D_TMU_FILTER_ANISOTROPIC_16_1 = 15,
101 };
102
103 enum V3D33_Wrap_Mode {
104 V3D_WRAP_MODE_REPEAT = 0,
105 V3D_WRAP_MODE_CLAMP = 1,
106 V3D_WRAP_MODE_MIRROR = 2,
107 V3D_WRAP_MODE_BORDER = 3,
108 V3D_WRAP_MODE_MIRROR_ONCE = 4,
109 };
110
111 enum V3D33_Varying_Flags_Action {
112 V3D_VARYING_FLAGS_ACTION_UNCHANGED = 0,
113 V3D_VARYING_FLAGS_ACTION_ZEROED = 1,
114 V3D_VARYING_FLAGS_ACTION_SET = 2,
115 };
116
117 enum V3D33_Memory_Format {
118 V3D_MEMORY_FORMAT_RASTER = 0,
119 V3D_MEMORY_FORMAT_LINEARTILE = 1,
120 V3D_MEMORY_FORMAT_UB_LINEAR_1_UIF_BLOCK_WIDE = 2,
121 V3D_MEMORY_FORMAT_UB_LINEAR_2_UIF_BLOCKS_WIDE = 3,
122 V3D_MEMORY_FORMAT_UIF_NO_XOR = 4,
123 V3D_MEMORY_FORMAT_UIF_XOR = 5,
124 };
125
126 enum V3D33_Decimate_Mode {
127 V3D_DECIMATE_MODE_SAMPLE_0 = 0,
128 V3D_DECIMATE_MODE_4X = 1,
129 V3D_DECIMATE_MODE_ALL_SAMPLES = 3,
130 };
131
132 enum V3D33_Internal_Type {
133 V3D_INTERNAL_TYPE_8I = 0,
134 V3D_INTERNAL_TYPE_8UI = 1,
135 V3D_INTERNAL_TYPE_8 = 2,
136 V3D_INTERNAL_TYPE_16I = 4,
137 V3D_INTERNAL_TYPE_16UI = 5,
138 V3D_INTERNAL_TYPE_16F = 6,
139 V3D_INTERNAL_TYPE_32I = 8,
140 V3D_INTERNAL_TYPE_32UI = 9,
141 V3D_INTERNAL_TYPE_32F = 10,
142 };
143
144 enum V3D33_Internal_BPP {
145 V3D_INTERNAL_BPP_32 = 0,
146 V3D_INTERNAL_BPP_64 = 1,
147 V3D_INTERNAL_BPP_128 = 2,
148 };
149
150 enum V3D33_Internal_Depth_Type {
151 V3D_INTERNAL_TYPE_DEPTH_32F = 0,
152 V3D_INTERNAL_TYPE_DEPTH_24 = 1,
153 V3D_INTERNAL_TYPE_DEPTH_16 = 2,
154 };
155
156 enum V3D33_L2T_Flush_Mode {
157 L2T_FLUSH_MODE_FLUSH = 0,
158 L2T_FLUSH_MODE_CLEAR = 1,
159 L2T_FLUSH_MODE_CLEAN = 2,
160 };
161
162 enum V3D33_Output_Image_Format {
163 V3D_OUTPUT_IMAGE_FORMAT_SRGB8_ALPHA8 = 0,
164 V3D_OUTPUT_IMAGE_FORMAT_SRGB = 1,
165 V3D_OUTPUT_IMAGE_FORMAT_RGB10_A2UI = 2,
166 V3D_OUTPUT_IMAGE_FORMAT_RGB10_A2 = 3,
167 V3D_OUTPUT_IMAGE_FORMAT_ABGR1555 = 4,
168 V3D_OUTPUT_IMAGE_FORMAT_ALPHA_MASKED_ABGR1555 = 5,
169 V3D_OUTPUT_IMAGE_FORMAT_ABGR4444 = 6,
170 V3D_OUTPUT_IMAGE_FORMAT_BGR565 = 7,
171 V3D_OUTPUT_IMAGE_FORMAT_R11F_G11F_B10F = 8,
172 V3D_OUTPUT_IMAGE_FORMAT_RGBA32F = 9,
173 V3D_OUTPUT_IMAGE_FORMAT_RG32F = 10,
174 V3D_OUTPUT_IMAGE_FORMAT_R32F = 11,
175 V3D_OUTPUT_IMAGE_FORMAT_RGBA32I = 12,
176 V3D_OUTPUT_IMAGE_FORMAT_RG32I = 13,
177 V3D_OUTPUT_IMAGE_FORMAT_R32I = 14,
178 V3D_OUTPUT_IMAGE_FORMAT_RGBA32UI = 15,
179 V3D_OUTPUT_IMAGE_FORMAT_RG32UI = 16,
180 V3D_OUTPUT_IMAGE_FORMAT_R32UI = 17,
181 V3D_OUTPUT_IMAGE_FORMAT_RGBA16F = 18,
182 V3D_OUTPUT_IMAGE_FORMAT_RG16F = 19,
183 V3D_OUTPUT_IMAGE_FORMAT_R16F = 20,
184 V3D_OUTPUT_IMAGE_FORMAT_RGBA16I = 21,
185 V3D_OUTPUT_IMAGE_FORMAT_RG16I = 22,
186 V3D_OUTPUT_IMAGE_FORMAT_R16I = 23,
187 V3D_OUTPUT_IMAGE_FORMAT_RGBA16UI = 24,
188 V3D_OUTPUT_IMAGE_FORMAT_RG16UI = 25,
189 V3D_OUTPUT_IMAGE_FORMAT_R16UI = 26,
190 V3D_OUTPUT_IMAGE_FORMAT_RGBA8 = 27,
191 V3D_OUTPUT_IMAGE_FORMAT_RGB8 = 28,
192 V3D_OUTPUT_IMAGE_FORMAT_RG8 = 29,
193 V3D_OUTPUT_IMAGE_FORMAT_R8 = 30,
194 V3D_OUTPUT_IMAGE_FORMAT_RGBA8I = 31,
195 V3D_OUTPUT_IMAGE_FORMAT_RG8I = 32,
196 V3D_OUTPUT_IMAGE_FORMAT_R8I = 33,
197 V3D_OUTPUT_IMAGE_FORMAT_RGBA8UI = 34,
198 V3D_OUTPUT_IMAGE_FORMAT_RG8UI = 35,
199 V3D_OUTPUT_IMAGE_FORMAT_R8UI = 36,
200 V3D_OUTPUT_IMAGE_FORMAT_SRGBX8 = 37,
201 V3D_OUTPUT_IMAGE_FORMAT_RGBX8 = 38,
202 };
203
204 enum V3D33_Z_S_Output_Image_Format {
205 V3D_OUTPUT_IMAGE_FORMAT_ZS_DEPTH_COMPONENT32F = 0,
206 V3D_OUTPUT_IMAGE_FORMAT_ZS_DEPTH_COMPONENT24 = 1,
207 V3D_OUTPUT_IMAGE_FORMAT_ZS_DEPTH_COMPONENT16 = 2,
208 V3D_OUTPUT_IMAGE_FORMAT_ZS_DEPTH24_STENCIL8 = 3,
209 };
210
211 enum V3D33_Dither_Mode {
212 V3D_DITHER_MODE_NONE = 0,
213 V3D_DITHER_MODE_RGB = 1,
214 V3D_DITHER_MODE_A = 2,
215 V3D_DITHER_MODE_RGBA = 3,
216 };
217
218 enum V3D33_Pack_Mode {
219 V3D_PACK_MODE_16_WAY = 0,
220 V3D_PACK_MODE_8_WAY = 1,
221 V3D_PACK_MODE_4_WAY = 2,
222 V3D_PACK_MODE_1_WAY = 3,
223 };
224
225 enum V3D33_TCS_flush_mode {
226 V3D_TCS_FLUSH_MODE_FULLY_PACKED = 0,
227 V3D_TCS_FLUSH_MODE_SINGLE_PATCH = 1,
228 V3D_TCS_FLUSH_MODE_PACKED_COMPLETE_PATCHES = 2,
229 };
230
231 enum V3D33_Primitve_counters {
232 V3D_PRIM_COUNTS_TF_WORDS_BUFFER0 = 0,
233 V3D_PRIM_COUNTS_TF_WORDS_BUFFER1 = 1,
234 V3D_PRIM_COUNTS_TF_WORDS_BUFFER2 = 2,
235 V3D_PRIM_COUNTS_TF_WORDS_BUFFER3 = 3,
236 V3D_PRIM_COUNTS_WRITTEN = 4,
237 V3D_PRIM_COUNTS_TF_WRITTEN = 5,
238 V3D_PRIM_COUNTS_TF_OVERFLOW = 6,
239 };
240
241 #define V3D33_HALT_opcode 0
242 #define V3D33_HALT_header \
243 .opcode = 0
244
245 struct V3D33_HALT {
246 uint32_t opcode;
247 };
248
249 static inline void
V3D33_HALT_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_HALT * restrict values)250 V3D33_HALT_pack(__gen_user_data *data, uint8_t * restrict cl,
251 const struct V3D33_HALT * restrict values)
252 {
253 cl[ 0] = __gen_uint(values->opcode, 0, 7);
254
255 }
256
257 #define V3D33_HALT_length 1
258 #ifdef __gen_unpack_address
259 static inline void
V3D33_HALT_unpack(const uint8_t * restrict cl,struct V3D33_HALT * restrict values)260 V3D33_HALT_unpack(const uint8_t * restrict cl,
261 struct V3D33_HALT * restrict values)
262 {
263 values->opcode = __gen_unpack_uint(cl, 0, 7);
264 }
265 #endif
266
267
268 #define V3D33_NOP_opcode 1
269 #define V3D33_NOP_header \
270 .opcode = 1
271
272 struct V3D33_NOP {
273 uint32_t opcode;
274 };
275
276 static inline void
V3D33_NOP_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_NOP * restrict values)277 V3D33_NOP_pack(__gen_user_data *data, uint8_t * restrict cl,
278 const struct V3D33_NOP * restrict values)
279 {
280 cl[ 0] = __gen_uint(values->opcode, 0, 7);
281
282 }
283
284 #define V3D33_NOP_length 1
285 #ifdef __gen_unpack_address
286 static inline void
V3D33_NOP_unpack(const uint8_t * restrict cl,struct V3D33_NOP * restrict values)287 V3D33_NOP_unpack(const uint8_t * restrict cl,
288 struct V3D33_NOP * restrict values)
289 {
290 values->opcode = __gen_unpack_uint(cl, 0, 7);
291 }
292 #endif
293
294
295 #define V3D33_FLUSH_opcode 4
296 #define V3D33_FLUSH_header \
297 .opcode = 4
298
299 struct V3D33_FLUSH {
300 uint32_t opcode;
301 };
302
303 static inline void
V3D33_FLUSH_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_FLUSH * restrict values)304 V3D33_FLUSH_pack(__gen_user_data *data, uint8_t * restrict cl,
305 const struct V3D33_FLUSH * restrict values)
306 {
307 cl[ 0] = __gen_uint(values->opcode, 0, 7);
308
309 }
310
311 #define V3D33_FLUSH_length 1
312 #ifdef __gen_unpack_address
313 static inline void
V3D33_FLUSH_unpack(const uint8_t * restrict cl,struct V3D33_FLUSH * restrict values)314 V3D33_FLUSH_unpack(const uint8_t * restrict cl,
315 struct V3D33_FLUSH * restrict values)
316 {
317 values->opcode = __gen_unpack_uint(cl, 0, 7);
318 }
319 #endif
320
321
322 #define V3D33_FLUSH_ALL_STATE_opcode 5
323 #define V3D33_FLUSH_ALL_STATE_header \
324 .opcode = 5
325
326 struct V3D33_FLUSH_ALL_STATE {
327 uint32_t opcode;
328 };
329
330 static inline void
V3D33_FLUSH_ALL_STATE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_FLUSH_ALL_STATE * restrict values)331 V3D33_FLUSH_ALL_STATE_pack(__gen_user_data *data, uint8_t * restrict cl,
332 const struct V3D33_FLUSH_ALL_STATE * restrict values)
333 {
334 cl[ 0] = __gen_uint(values->opcode, 0, 7);
335
336 }
337
338 #define V3D33_FLUSH_ALL_STATE_length 1
339 #ifdef __gen_unpack_address
340 static inline void
V3D33_FLUSH_ALL_STATE_unpack(const uint8_t * restrict cl,struct V3D33_FLUSH_ALL_STATE * restrict values)341 V3D33_FLUSH_ALL_STATE_unpack(const uint8_t * restrict cl,
342 struct V3D33_FLUSH_ALL_STATE * restrict values)
343 {
344 values->opcode = __gen_unpack_uint(cl, 0, 7);
345 }
346 #endif
347
348
349 #define V3D33_START_TILE_BINNING_opcode 6
350 #define V3D33_START_TILE_BINNING_header \
351 .opcode = 6
352
353 struct V3D33_START_TILE_BINNING {
354 uint32_t opcode;
355 };
356
357 static inline void
V3D33_START_TILE_BINNING_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_START_TILE_BINNING * restrict values)358 V3D33_START_TILE_BINNING_pack(__gen_user_data *data, uint8_t * restrict cl,
359 const struct V3D33_START_TILE_BINNING * restrict values)
360 {
361 cl[ 0] = __gen_uint(values->opcode, 0, 7);
362
363 }
364
365 #define V3D33_START_TILE_BINNING_length 1
366 #ifdef __gen_unpack_address
367 static inline void
V3D33_START_TILE_BINNING_unpack(const uint8_t * restrict cl,struct V3D33_START_TILE_BINNING * restrict values)368 V3D33_START_TILE_BINNING_unpack(const uint8_t * restrict cl,
369 struct V3D33_START_TILE_BINNING * restrict values)
370 {
371 values->opcode = __gen_unpack_uint(cl, 0, 7);
372 }
373 #endif
374
375
376 #define V3D33_INCREMENT_SEMAPHORE_opcode 7
377 #define V3D33_INCREMENT_SEMAPHORE_header \
378 .opcode = 7
379
380 struct V3D33_INCREMENT_SEMAPHORE {
381 uint32_t opcode;
382 };
383
384 static inline void
V3D33_INCREMENT_SEMAPHORE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_INCREMENT_SEMAPHORE * restrict values)385 V3D33_INCREMENT_SEMAPHORE_pack(__gen_user_data *data, uint8_t * restrict cl,
386 const struct V3D33_INCREMENT_SEMAPHORE * restrict values)
387 {
388 cl[ 0] = __gen_uint(values->opcode, 0, 7);
389
390 }
391
392 #define V3D33_INCREMENT_SEMAPHORE_length 1
393 #ifdef __gen_unpack_address
394 static inline void
V3D33_INCREMENT_SEMAPHORE_unpack(const uint8_t * restrict cl,struct V3D33_INCREMENT_SEMAPHORE * restrict values)395 V3D33_INCREMENT_SEMAPHORE_unpack(const uint8_t * restrict cl,
396 struct V3D33_INCREMENT_SEMAPHORE * restrict values)
397 {
398 values->opcode = __gen_unpack_uint(cl, 0, 7);
399 }
400 #endif
401
402
403 #define V3D33_WAIT_ON_SEMAPHORE_opcode 8
404 #define V3D33_WAIT_ON_SEMAPHORE_header \
405 .opcode = 8
406
407 struct V3D33_WAIT_ON_SEMAPHORE {
408 uint32_t opcode;
409 };
410
411 static inline void
V3D33_WAIT_ON_SEMAPHORE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_WAIT_ON_SEMAPHORE * restrict values)412 V3D33_WAIT_ON_SEMAPHORE_pack(__gen_user_data *data, uint8_t * restrict cl,
413 const struct V3D33_WAIT_ON_SEMAPHORE * restrict values)
414 {
415 cl[ 0] = __gen_uint(values->opcode, 0, 7);
416
417 }
418
419 #define V3D33_WAIT_ON_SEMAPHORE_length 1
420 #ifdef __gen_unpack_address
421 static inline void
V3D33_WAIT_ON_SEMAPHORE_unpack(const uint8_t * restrict cl,struct V3D33_WAIT_ON_SEMAPHORE * restrict values)422 V3D33_WAIT_ON_SEMAPHORE_unpack(const uint8_t * restrict cl,
423 struct V3D33_WAIT_ON_SEMAPHORE * restrict values)
424 {
425 values->opcode = __gen_unpack_uint(cl, 0, 7);
426 }
427 #endif
428
429
430 #define V3D33_WAIT_FOR_PREVIOUS_FRAME_opcode 9
431 #define V3D33_WAIT_FOR_PREVIOUS_FRAME_header \
432 .opcode = 9
433
434 struct V3D33_WAIT_FOR_PREVIOUS_FRAME {
435 uint32_t opcode;
436 };
437
438 static inline void
V3D33_WAIT_FOR_PREVIOUS_FRAME_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_WAIT_FOR_PREVIOUS_FRAME * restrict values)439 V3D33_WAIT_FOR_PREVIOUS_FRAME_pack(__gen_user_data *data, uint8_t * restrict cl,
440 const struct V3D33_WAIT_FOR_PREVIOUS_FRAME * restrict values)
441 {
442 cl[ 0] = __gen_uint(values->opcode, 0, 7);
443
444 }
445
446 #define V3D33_WAIT_FOR_PREVIOUS_FRAME_length 1
447 #ifdef __gen_unpack_address
448 static inline void
V3D33_WAIT_FOR_PREVIOUS_FRAME_unpack(const uint8_t * restrict cl,struct V3D33_WAIT_FOR_PREVIOUS_FRAME * restrict values)449 V3D33_WAIT_FOR_PREVIOUS_FRAME_unpack(const uint8_t * restrict cl,
450 struct V3D33_WAIT_FOR_PREVIOUS_FRAME * restrict values)
451 {
452 values->opcode = __gen_unpack_uint(cl, 0, 7);
453 }
454 #endif
455
456
457 #define V3D33_ENABLE_Z_ONLY_RENDERING_opcode 10
458 #define V3D33_ENABLE_Z_ONLY_RENDERING_header \
459 .opcode = 10
460
461 struct V3D33_ENABLE_Z_ONLY_RENDERING {
462 uint32_t opcode;
463 };
464
465 static inline void
V3D33_ENABLE_Z_ONLY_RENDERING_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_ENABLE_Z_ONLY_RENDERING * restrict values)466 V3D33_ENABLE_Z_ONLY_RENDERING_pack(__gen_user_data *data, uint8_t * restrict cl,
467 const struct V3D33_ENABLE_Z_ONLY_RENDERING * restrict values)
468 {
469 cl[ 0] = __gen_uint(values->opcode, 0, 7);
470
471 }
472
473 #define V3D33_ENABLE_Z_ONLY_RENDERING_length 1
474 #ifdef __gen_unpack_address
475 static inline void
V3D33_ENABLE_Z_ONLY_RENDERING_unpack(const uint8_t * restrict cl,struct V3D33_ENABLE_Z_ONLY_RENDERING * restrict values)476 V3D33_ENABLE_Z_ONLY_RENDERING_unpack(const uint8_t * restrict cl,
477 struct V3D33_ENABLE_Z_ONLY_RENDERING * restrict values)
478 {
479 values->opcode = __gen_unpack_uint(cl, 0, 7);
480 }
481 #endif
482
483
484 #define V3D33_DISABLE_Z_ONLY_RENDERING_opcode 11
485 #define V3D33_DISABLE_Z_ONLY_RENDERING_header \
486 .opcode = 11
487
488 struct V3D33_DISABLE_Z_ONLY_RENDERING {
489 uint32_t opcode;
490 };
491
492 static inline void
V3D33_DISABLE_Z_ONLY_RENDERING_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_DISABLE_Z_ONLY_RENDERING * restrict values)493 V3D33_DISABLE_Z_ONLY_RENDERING_pack(__gen_user_data *data, uint8_t * restrict cl,
494 const struct V3D33_DISABLE_Z_ONLY_RENDERING * restrict values)
495 {
496 cl[ 0] = __gen_uint(values->opcode, 0, 7);
497
498 }
499
500 #define V3D33_DISABLE_Z_ONLY_RENDERING_length 1
501 #ifdef __gen_unpack_address
502 static inline void
V3D33_DISABLE_Z_ONLY_RENDERING_unpack(const uint8_t * restrict cl,struct V3D33_DISABLE_Z_ONLY_RENDERING * restrict values)503 V3D33_DISABLE_Z_ONLY_RENDERING_unpack(const uint8_t * restrict cl,
504 struct V3D33_DISABLE_Z_ONLY_RENDERING * restrict values)
505 {
506 values->opcode = __gen_unpack_uint(cl, 0, 7);
507 }
508 #endif
509
510
511 #define V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME_opcode 12
512 #define V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME_header\
513 .opcode = 12
514
515 struct V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME {
516 uint32_t opcode;
517 };
518
519 static inline void
V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME * restrict values)520 V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME_pack(__gen_user_data *data, uint8_t * restrict cl,
521 const struct V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME * restrict values)
522 {
523 cl[ 0] = __gen_uint(values->opcode, 0, 7);
524
525 }
526
527 #define V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME_length 1
528 #ifdef __gen_unpack_address
529 static inline void
V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME_unpack(const uint8_t * restrict cl,struct V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME * restrict values)530 V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME_unpack(const uint8_t * restrict cl,
531 struct V3D33_END_OF_Z_ONLY_RENDERING_IN_FRAME * restrict values)
532 {
533 values->opcode = __gen_unpack_uint(cl, 0, 7);
534 }
535 #endif
536
537
538 #define V3D33_END_OF_RENDERING_opcode 13
539 #define V3D33_END_OF_RENDERING_header \
540 .opcode = 13
541
542 struct V3D33_END_OF_RENDERING {
543 uint32_t opcode;
544 };
545
546 static inline void
V3D33_END_OF_RENDERING_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_END_OF_RENDERING * restrict values)547 V3D33_END_OF_RENDERING_pack(__gen_user_data *data, uint8_t * restrict cl,
548 const struct V3D33_END_OF_RENDERING * restrict values)
549 {
550 cl[ 0] = __gen_uint(values->opcode, 0, 7);
551
552 }
553
554 #define V3D33_END_OF_RENDERING_length 1
555 #ifdef __gen_unpack_address
556 static inline void
V3D33_END_OF_RENDERING_unpack(const uint8_t * restrict cl,struct V3D33_END_OF_RENDERING * restrict values)557 V3D33_END_OF_RENDERING_unpack(const uint8_t * restrict cl,
558 struct V3D33_END_OF_RENDERING * restrict values)
559 {
560 values->opcode = __gen_unpack_uint(cl, 0, 7);
561 }
562 #endif
563
564
565 #define V3D33_WAIT_FOR_TRANSFORM_FEEDBACK_opcode 14
566 #define V3D33_WAIT_FOR_TRANSFORM_FEEDBACK_header\
567 .opcode = 14
568
569 struct V3D33_WAIT_FOR_TRANSFORM_FEEDBACK {
570 uint32_t opcode;
571 uint32_t block_count;
572 };
573
574 static inline void
V3D33_WAIT_FOR_TRANSFORM_FEEDBACK_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_WAIT_FOR_TRANSFORM_FEEDBACK * restrict values)575 V3D33_WAIT_FOR_TRANSFORM_FEEDBACK_pack(__gen_user_data *data, uint8_t * restrict cl,
576 const struct V3D33_WAIT_FOR_TRANSFORM_FEEDBACK * restrict values)
577 {
578 cl[ 0] = __gen_uint(values->opcode, 0, 7);
579
580 cl[ 1] = __gen_uint(values->block_count, 0, 7);
581
582 }
583
584 #define V3D33_WAIT_FOR_TRANSFORM_FEEDBACK_length 2
585 #ifdef __gen_unpack_address
586 static inline void
V3D33_WAIT_FOR_TRANSFORM_FEEDBACK_unpack(const uint8_t * restrict cl,struct V3D33_WAIT_FOR_TRANSFORM_FEEDBACK * restrict values)587 V3D33_WAIT_FOR_TRANSFORM_FEEDBACK_unpack(const uint8_t * restrict cl,
588 struct V3D33_WAIT_FOR_TRANSFORM_FEEDBACK * restrict values)
589 {
590 values->opcode = __gen_unpack_uint(cl, 0, 7);
591 values->block_count = __gen_unpack_uint(cl, 8, 15);
592 }
593 #endif
594
595
596 #define V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST_opcode 15
597 #define V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST_header\
598 .opcode = 15
599
600 struct V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST {
601 uint32_t opcode;
602 __gen_address_type address;
603 };
604
605 static inline void
V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST * restrict values)606 V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
607 const struct V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST * restrict values)
608 {
609 cl[ 0] = __gen_uint(values->opcode, 0, 7);
610
611 __gen_emit_reloc(data, &values->address);
612 cl[ 1] = __gen_address_offset(&values->address);
613
614 cl[ 2] = __gen_address_offset(&values->address) >> 8;
615
616 cl[ 3] = __gen_address_offset(&values->address) >> 16;
617
618 cl[ 4] = __gen_address_offset(&values->address) >> 24;
619
620 }
621
622 #define V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST_length 5
623 #ifdef __gen_unpack_address
624 static inline void
V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST_unpack(const uint8_t * restrict cl,struct V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST * restrict values)625 V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST_unpack(const uint8_t * restrict cl,
626 struct V3D33_BRANCH_TO_AUTO_CHAINED_SUB_LIST * restrict values)
627 {
628 values->opcode = __gen_unpack_uint(cl, 0, 7);
629 values->address = __gen_unpack_address(cl, 8, 39);
630 }
631 #endif
632
633
634 #define V3D33_BRANCH_opcode 16
635 #define V3D33_BRANCH_header \
636 .opcode = 16
637
638 struct V3D33_BRANCH {
639 uint32_t opcode;
640 __gen_address_type address;
641 };
642
643 static inline void
V3D33_BRANCH_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BRANCH * restrict values)644 V3D33_BRANCH_pack(__gen_user_data *data, uint8_t * restrict cl,
645 const struct V3D33_BRANCH * restrict values)
646 {
647 cl[ 0] = __gen_uint(values->opcode, 0, 7);
648
649 __gen_emit_reloc(data, &values->address);
650 cl[ 1] = __gen_address_offset(&values->address);
651
652 cl[ 2] = __gen_address_offset(&values->address) >> 8;
653
654 cl[ 3] = __gen_address_offset(&values->address) >> 16;
655
656 cl[ 4] = __gen_address_offset(&values->address) >> 24;
657
658 }
659
660 #define V3D33_BRANCH_length 5
661 #ifdef __gen_unpack_address
662 static inline void
V3D33_BRANCH_unpack(const uint8_t * restrict cl,struct V3D33_BRANCH * restrict values)663 V3D33_BRANCH_unpack(const uint8_t * restrict cl,
664 struct V3D33_BRANCH * restrict values)
665 {
666 values->opcode = __gen_unpack_uint(cl, 0, 7);
667 values->address = __gen_unpack_address(cl, 8, 39);
668 }
669 #endif
670
671
672 #define V3D33_BRANCH_TO_SUB_LIST_opcode 17
673 #define V3D33_BRANCH_TO_SUB_LIST_header \
674 .opcode = 17
675
676 struct V3D33_BRANCH_TO_SUB_LIST {
677 uint32_t opcode;
678 __gen_address_type address;
679 };
680
681 static inline void
V3D33_BRANCH_TO_SUB_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BRANCH_TO_SUB_LIST * restrict values)682 V3D33_BRANCH_TO_SUB_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
683 const struct V3D33_BRANCH_TO_SUB_LIST * restrict values)
684 {
685 cl[ 0] = __gen_uint(values->opcode, 0, 7);
686
687 __gen_emit_reloc(data, &values->address);
688 cl[ 1] = __gen_address_offset(&values->address);
689
690 cl[ 2] = __gen_address_offset(&values->address) >> 8;
691
692 cl[ 3] = __gen_address_offset(&values->address) >> 16;
693
694 cl[ 4] = __gen_address_offset(&values->address) >> 24;
695
696 }
697
698 #define V3D33_BRANCH_TO_SUB_LIST_length 5
699 #ifdef __gen_unpack_address
700 static inline void
V3D33_BRANCH_TO_SUB_LIST_unpack(const uint8_t * restrict cl,struct V3D33_BRANCH_TO_SUB_LIST * restrict values)701 V3D33_BRANCH_TO_SUB_LIST_unpack(const uint8_t * restrict cl,
702 struct V3D33_BRANCH_TO_SUB_LIST * restrict values)
703 {
704 values->opcode = __gen_unpack_uint(cl, 0, 7);
705 values->address = __gen_unpack_address(cl, 8, 39);
706 }
707 #endif
708
709
710 #define V3D33_RETURN_FROM_SUB_LIST_opcode 18
711 #define V3D33_RETURN_FROM_SUB_LIST_header \
712 .opcode = 18
713
714 struct V3D33_RETURN_FROM_SUB_LIST {
715 uint32_t opcode;
716 };
717
718 static inline void
V3D33_RETURN_FROM_SUB_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_RETURN_FROM_SUB_LIST * restrict values)719 V3D33_RETURN_FROM_SUB_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
720 const struct V3D33_RETURN_FROM_SUB_LIST * restrict values)
721 {
722 cl[ 0] = __gen_uint(values->opcode, 0, 7);
723
724 }
725
726 #define V3D33_RETURN_FROM_SUB_LIST_length 1
727 #ifdef __gen_unpack_address
728 static inline void
V3D33_RETURN_FROM_SUB_LIST_unpack(const uint8_t * restrict cl,struct V3D33_RETURN_FROM_SUB_LIST * restrict values)729 V3D33_RETURN_FROM_SUB_LIST_unpack(const uint8_t * restrict cl,
730 struct V3D33_RETURN_FROM_SUB_LIST * restrict values)
731 {
732 values->opcode = __gen_unpack_uint(cl, 0, 7);
733 }
734 #endif
735
736
737 #define V3D33_FLUSH_VCD_CACHE_opcode 19
738 #define V3D33_FLUSH_VCD_CACHE_header \
739 .opcode = 19
740
741 struct V3D33_FLUSH_VCD_CACHE {
742 uint32_t opcode;
743 };
744
745 static inline void
V3D33_FLUSH_VCD_CACHE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_FLUSH_VCD_CACHE * restrict values)746 V3D33_FLUSH_VCD_CACHE_pack(__gen_user_data *data, uint8_t * restrict cl,
747 const struct V3D33_FLUSH_VCD_CACHE * restrict values)
748 {
749 cl[ 0] = __gen_uint(values->opcode, 0, 7);
750
751 }
752
753 #define V3D33_FLUSH_VCD_CACHE_length 1
754 #ifdef __gen_unpack_address
755 static inline void
V3D33_FLUSH_VCD_CACHE_unpack(const uint8_t * restrict cl,struct V3D33_FLUSH_VCD_CACHE * restrict values)756 V3D33_FLUSH_VCD_CACHE_unpack(const uint8_t * restrict cl,
757 struct V3D33_FLUSH_VCD_CACHE * restrict values)
758 {
759 values->opcode = __gen_unpack_uint(cl, 0, 7);
760 }
761 #endif
762
763
764 #define V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST_opcode 20
765 #define V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST_header\
766 .opcode = 20
767
768 struct V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST {
769 uint32_t opcode;
770 __gen_address_type start;
771 __gen_address_type end;
772 };
773
774 static inline void
V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST * restrict values)775 V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
776 const struct V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST * restrict values)
777 {
778 cl[ 0] = __gen_uint(values->opcode, 0, 7);
779
780 __gen_emit_reloc(data, &values->start);
781 cl[ 1] = __gen_address_offset(&values->start);
782
783 cl[ 2] = __gen_address_offset(&values->start) >> 8;
784
785 cl[ 3] = __gen_address_offset(&values->start) >> 16;
786
787 cl[ 4] = __gen_address_offset(&values->start) >> 24;
788
789 __gen_emit_reloc(data, &values->end);
790 cl[ 5] = __gen_address_offset(&values->end);
791
792 cl[ 6] = __gen_address_offset(&values->end) >> 8;
793
794 cl[ 7] = __gen_address_offset(&values->end) >> 16;
795
796 cl[ 8] = __gen_address_offset(&values->end) >> 24;
797
798 }
799
800 #define V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST_length 9
801 #ifdef __gen_unpack_address
802 static inline void
V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST_unpack(const uint8_t * restrict cl,struct V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST * restrict values)803 V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST_unpack(const uint8_t * restrict cl,
804 struct V3D33_START_ADDRESS_OF_GENERIC_TILE_LIST * restrict values)
805 {
806 values->opcode = __gen_unpack_uint(cl, 0, 7);
807 values->start = __gen_unpack_address(cl, 8, 39);
808 values->end = __gen_unpack_address(cl, 40, 71);
809 }
810 #endif
811
812
813 #define V3D33_BRANCH_TO_IMPLICIT_TILE_LIST_opcode 21
814 #define V3D33_BRANCH_TO_IMPLICIT_TILE_LIST_header\
815 .opcode = 21
816
817 struct V3D33_BRANCH_TO_IMPLICIT_TILE_LIST {
818 uint32_t opcode;
819 uint32_t tile_list_set_number;
820 };
821
822 static inline void
V3D33_BRANCH_TO_IMPLICIT_TILE_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BRANCH_TO_IMPLICIT_TILE_LIST * restrict values)823 V3D33_BRANCH_TO_IMPLICIT_TILE_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
824 const struct V3D33_BRANCH_TO_IMPLICIT_TILE_LIST * restrict values)
825 {
826 cl[ 0] = __gen_uint(values->opcode, 0, 7);
827
828 cl[ 1] = __gen_uint(values->tile_list_set_number, 0, 7);
829
830 }
831
832 #define V3D33_BRANCH_TO_IMPLICIT_TILE_LIST_length 2
833 #ifdef __gen_unpack_address
834 static inline void
V3D33_BRANCH_TO_IMPLICIT_TILE_LIST_unpack(const uint8_t * restrict cl,struct V3D33_BRANCH_TO_IMPLICIT_TILE_LIST * restrict values)835 V3D33_BRANCH_TO_IMPLICIT_TILE_LIST_unpack(const uint8_t * restrict cl,
836 struct V3D33_BRANCH_TO_IMPLICIT_TILE_LIST * restrict values)
837 {
838 values->opcode = __gen_unpack_uint(cl, 0, 7);
839 values->tile_list_set_number = __gen_unpack_uint(cl, 8, 15);
840 }
841 #endif
842
843
844 #define V3D33_BRANCH_TO_EXPLICIT_SUPERTILE_opcode 22
845 #define V3D33_BRANCH_TO_EXPLICIT_SUPERTILE_header\
846 .opcode = 22
847
848 struct V3D33_BRANCH_TO_EXPLICIT_SUPERTILE {
849 uint32_t opcode;
850 __gen_address_type absolute_address_of_explicit_supertile_render_list;
851 uint32_t explicit_supertile_number;
852 uint32_t row_number;
853 uint32_t column_number;
854 };
855
856 static inline void
V3D33_BRANCH_TO_EXPLICIT_SUPERTILE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BRANCH_TO_EXPLICIT_SUPERTILE * restrict values)857 V3D33_BRANCH_TO_EXPLICIT_SUPERTILE_pack(__gen_user_data *data, uint8_t * restrict cl,
858 const struct V3D33_BRANCH_TO_EXPLICIT_SUPERTILE * restrict values)
859 {
860 cl[ 0] = __gen_uint(values->opcode, 0, 7);
861
862 cl[ 1] = __gen_uint(values->column_number, 0, 7);
863
864 cl[ 2] = __gen_uint(values->row_number, 0, 7);
865
866 cl[ 3] = __gen_uint(values->explicit_supertile_number, 0, 7);
867
868 __gen_emit_reloc(data, &values->absolute_address_of_explicit_supertile_render_list);
869 cl[ 4] = __gen_address_offset(&values->absolute_address_of_explicit_supertile_render_list);
870
871 cl[ 5] = __gen_address_offset(&values->absolute_address_of_explicit_supertile_render_list) >> 8;
872
873 cl[ 6] = __gen_address_offset(&values->absolute_address_of_explicit_supertile_render_list) >> 16;
874
875 cl[ 7] = __gen_address_offset(&values->absolute_address_of_explicit_supertile_render_list) >> 24;
876
877 }
878
879 #define V3D33_BRANCH_TO_EXPLICIT_SUPERTILE_length 8
880 #ifdef __gen_unpack_address
881 static inline void
V3D33_BRANCH_TO_EXPLICIT_SUPERTILE_unpack(const uint8_t * restrict cl,struct V3D33_BRANCH_TO_EXPLICIT_SUPERTILE * restrict values)882 V3D33_BRANCH_TO_EXPLICIT_SUPERTILE_unpack(const uint8_t * restrict cl,
883 struct V3D33_BRANCH_TO_EXPLICIT_SUPERTILE * restrict values)
884 {
885 values->opcode = __gen_unpack_uint(cl, 0, 7);
886 values->absolute_address_of_explicit_supertile_render_list = __gen_unpack_address(cl, 32, 63);
887 values->explicit_supertile_number = __gen_unpack_uint(cl, 24, 31);
888 values->row_number = __gen_unpack_uint(cl, 16, 23);
889 values->column_number = __gen_unpack_uint(cl, 8, 15);
890 }
891 #endif
892
893
894 #define V3D33_SUPERTILE_COORDINATES_opcode 23
895 #define V3D33_SUPERTILE_COORDINATES_header \
896 .opcode = 23
897
898 struct V3D33_SUPERTILE_COORDINATES {
899 uint32_t opcode;
900 uint32_t row_number_in_supertiles;
901 uint32_t column_number_in_supertiles;
902 };
903
904 static inline void
V3D33_SUPERTILE_COORDINATES_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_SUPERTILE_COORDINATES * restrict values)905 V3D33_SUPERTILE_COORDINATES_pack(__gen_user_data *data, uint8_t * restrict cl,
906 const struct V3D33_SUPERTILE_COORDINATES * restrict values)
907 {
908 cl[ 0] = __gen_uint(values->opcode, 0, 7);
909
910 cl[ 1] = __gen_uint(values->column_number_in_supertiles, 0, 7);
911
912 cl[ 2] = __gen_uint(values->row_number_in_supertiles, 0, 7);
913
914 }
915
916 #define V3D33_SUPERTILE_COORDINATES_length 3
917 #ifdef __gen_unpack_address
918 static inline void
V3D33_SUPERTILE_COORDINATES_unpack(const uint8_t * restrict cl,struct V3D33_SUPERTILE_COORDINATES * restrict values)919 V3D33_SUPERTILE_COORDINATES_unpack(const uint8_t * restrict cl,
920 struct V3D33_SUPERTILE_COORDINATES * restrict values)
921 {
922 values->opcode = __gen_unpack_uint(cl, 0, 7);
923 values->row_number_in_supertiles = __gen_unpack_uint(cl, 16, 23);
924 values->column_number_in_supertiles = __gen_unpack_uint(cl, 8, 15);
925 }
926 #endif
927
928
929 #define V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_opcode 24
930 #define V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_header\
931 .opcode = 24
932
933 struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER {
934 uint32_t opcode;
935 };
936
937 static inline void
V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER * restrict values)938 V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_pack(__gen_user_data *data, uint8_t * restrict cl,
939 const struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER * restrict values)
940 {
941 cl[ 0] = __gen_uint(values->opcode, 0, 7);
942
943 }
944
945 #define V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_length 1
946 #ifdef __gen_unpack_address
947 static inline void
V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_unpack(const uint8_t * restrict cl,struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER * restrict values)948 V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_unpack(const uint8_t * restrict cl,
949 struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER * restrict values)
950 {
951 values->opcode = __gen_unpack_uint(cl, 0, 7);
952 }
953 #endif
954
955
956 #define V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED_opcode 25
957 #define V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED_header\
958 .opcode = 25
959
960 struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED {
961 uint32_t opcode;
962 uint32_t disable_color_buffer_write;
963 bool enable_z_write;
964 bool enable_stencil_write;
965 bool disable_color_buffers_clear_on_write;
966 bool disable_stencil_buffer_clear_on_write;
967 bool disable_z_buffer_clear_on_write;
968 bool disable_fast_opportunistic_write_out_in_multisample_mode;
969 bool last_tile_of_frame;
970 };
971
972 static inline void
V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED * restrict values)973 V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED_pack(__gen_user_data *data, uint8_t * restrict cl,
974 const struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED * restrict values)
975 {
976 cl[ 0] = __gen_uint(values->opcode, 0, 7);
977
978 cl[ 1] = __gen_uint(values->enable_z_write, 7, 7) |
979 __gen_uint(values->enable_stencil_write, 6, 6) |
980 __gen_uint(values->disable_color_buffers_clear_on_write, 4, 4) |
981 __gen_uint(values->disable_stencil_buffer_clear_on_write, 3, 3) |
982 __gen_uint(values->disable_z_buffer_clear_on_write, 2, 2) |
983 __gen_uint(values->disable_fast_opportunistic_write_out_in_multisample_mode, 1, 1) |
984 __gen_uint(values->last_tile_of_frame, 0, 0);
985
986 cl[ 2] = __gen_uint(values->disable_color_buffer_write, 0, 7);
987
988 }
989
990 #define V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED_length 3
991 #ifdef __gen_unpack_address
992 static inline void
V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED_unpack(const uint8_t * restrict cl,struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED * restrict values)993 V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED_unpack(const uint8_t * restrict cl,
994 struct V3D33_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED * restrict values)
995 {
996 values->opcode = __gen_unpack_uint(cl, 0, 7);
997 values->disable_color_buffer_write = __gen_unpack_uint(cl, 16, 23);
998 values->enable_z_write = __gen_unpack_uint(cl, 15, 15);
999 values->enable_stencil_write = __gen_unpack_uint(cl, 14, 14);
1000 values->disable_color_buffers_clear_on_write = __gen_unpack_uint(cl, 12, 12);
1001 values->disable_stencil_buffer_clear_on_write = __gen_unpack_uint(cl, 11, 11);
1002 values->disable_z_buffer_clear_on_write = __gen_unpack_uint(cl, 10, 10);
1003 values->disable_fast_opportunistic_write_out_in_multisample_mode = __gen_unpack_uint(cl, 9, 9);
1004 values->last_tile_of_frame = __gen_unpack_uint(cl, 8, 8);
1005 }
1006 #endif
1007
1008
1009 #define V3D33_RELOAD_TILE_COLOR_BUFFER_opcode 26
1010 #define V3D33_RELOAD_TILE_COLOR_BUFFER_header \
1011 .opcode = 26
1012
1013 struct V3D33_RELOAD_TILE_COLOR_BUFFER {
1014 uint32_t opcode;
1015 uint32_t disable_color_buffer_load;
1016 bool enable_z_load;
1017 bool enable_stencil_load;
1018 };
1019
1020 static inline void
V3D33_RELOAD_TILE_COLOR_BUFFER_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_RELOAD_TILE_COLOR_BUFFER * restrict values)1021 V3D33_RELOAD_TILE_COLOR_BUFFER_pack(__gen_user_data *data, uint8_t * restrict cl,
1022 const struct V3D33_RELOAD_TILE_COLOR_BUFFER * restrict values)
1023 {
1024 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1025
1026 cl[ 1] = __gen_uint(values->enable_z_load, 7, 7) |
1027 __gen_uint(values->enable_stencil_load, 6, 6);
1028
1029 cl[ 2] = __gen_uint(values->disable_color_buffer_load, 0, 7);
1030
1031 }
1032
1033 #define V3D33_RELOAD_TILE_COLOR_BUFFER_length 3
1034 #ifdef __gen_unpack_address
1035 static inline void
V3D33_RELOAD_TILE_COLOR_BUFFER_unpack(const uint8_t * restrict cl,struct V3D33_RELOAD_TILE_COLOR_BUFFER * restrict values)1036 V3D33_RELOAD_TILE_COLOR_BUFFER_unpack(const uint8_t * restrict cl,
1037 struct V3D33_RELOAD_TILE_COLOR_BUFFER * restrict values)
1038 {
1039 values->opcode = __gen_unpack_uint(cl, 0, 7);
1040 values->disable_color_buffer_load = __gen_unpack_uint(cl, 16, 23);
1041 values->enable_z_load = __gen_unpack_uint(cl, 15, 15);
1042 values->enable_stencil_load = __gen_unpack_uint(cl, 14, 14);
1043 }
1044 #endif
1045
1046
1047 #define V3D33_END_OF_TILE_MARKER_opcode 27
1048 #define V3D33_END_OF_TILE_MARKER_header \
1049 .opcode = 27
1050
1051 struct V3D33_END_OF_TILE_MARKER {
1052 uint32_t opcode;
1053 };
1054
1055 static inline void
V3D33_END_OF_TILE_MARKER_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_END_OF_TILE_MARKER * restrict values)1056 V3D33_END_OF_TILE_MARKER_pack(__gen_user_data *data, uint8_t * restrict cl,
1057 const struct V3D33_END_OF_TILE_MARKER * restrict values)
1058 {
1059 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1060
1061 }
1062
1063 #define V3D33_END_OF_TILE_MARKER_length 1
1064 #ifdef __gen_unpack_address
1065 static inline void
V3D33_END_OF_TILE_MARKER_unpack(const uint8_t * restrict cl,struct V3D33_END_OF_TILE_MARKER * restrict values)1066 V3D33_END_OF_TILE_MARKER_unpack(const uint8_t * restrict cl,
1067 struct V3D33_END_OF_TILE_MARKER * restrict values)
1068 {
1069 values->opcode = __gen_unpack_uint(cl, 0, 7);
1070 }
1071 #endif
1072
1073
1074 #define V3D33_STORE_TILE_BUFFER_GENERAL_opcode 29
1075 #define V3D33_STORE_TILE_BUFFER_GENERAL_header \
1076 .opcode = 29
1077
1078 struct V3D33_STORE_TILE_BUFFER_GENERAL {
1079 uint32_t opcode;
1080 __gen_address_type address;
1081 uint32_t padded_height_of_output_image_in_uif_blocks;
1082 bool xor_uif;
1083 bool last_tile_of_frame;
1084 bool disable_color_buffers_clear_on_write;
1085 bool disable_stencil_buffer_clear_on_write;
1086 bool disable_z_buffer_clear_on_write;
1087 bool raw_mode;
1088 uint32_t buffer_to_store;
1089 #define RENDER_TARGET_0 0
1090 #define RENDER_TARGET_1 1
1091 #define RENDER_TARGET_2 2
1092 #define RENDER_TARGET_3 3
1093 #define NONE 8
1094 #define Z 9
1095 #define STENCIL 10
1096 #define ZSTENCIL 11
1097 };
1098
1099 static inline void
V3D33_STORE_TILE_BUFFER_GENERAL_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_STORE_TILE_BUFFER_GENERAL * restrict values)1100 V3D33_STORE_TILE_BUFFER_GENERAL_pack(__gen_user_data *data, uint8_t * restrict cl,
1101 const struct V3D33_STORE_TILE_BUFFER_GENERAL * restrict values)
1102 {
1103 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1104
1105 cl[ 1] = __gen_uint(values->disable_color_buffers_clear_on_write, 7, 7) |
1106 __gen_uint(values->disable_stencil_buffer_clear_on_write, 6, 6) |
1107 __gen_uint(values->disable_z_buffer_clear_on_write, 5, 5) |
1108 __gen_uint(values->raw_mode, 4, 4) |
1109 __gen_uint(values->buffer_to_store, 0, 3);
1110
1111 cl[ 2] = __gen_uint(values->padded_height_of_output_image_in_uif_blocks, 3, 15) |
1112 __gen_uint(values->xor_uif, 2, 2) |
1113 __gen_uint(values->last_tile_of_frame, 0, 0);
1114
1115 cl[ 3] = __gen_uint(values->padded_height_of_output_image_in_uif_blocks, 3, 15) >> 8;
1116
1117 __gen_emit_reloc(data, &values->address);
1118 cl[ 4] = __gen_address_offset(&values->address) >> 8;
1119
1120 cl[ 5] = __gen_address_offset(&values->address) >> 16;
1121
1122 cl[ 6] = __gen_address_offset(&values->address) >> 24;
1123
1124 }
1125
1126 #define V3D33_STORE_TILE_BUFFER_GENERAL_length 7
1127 #ifdef __gen_unpack_address
1128 static inline void
V3D33_STORE_TILE_BUFFER_GENERAL_unpack(const uint8_t * restrict cl,struct V3D33_STORE_TILE_BUFFER_GENERAL * restrict values)1129 V3D33_STORE_TILE_BUFFER_GENERAL_unpack(const uint8_t * restrict cl,
1130 struct V3D33_STORE_TILE_BUFFER_GENERAL * restrict values)
1131 {
1132 values->opcode = __gen_unpack_uint(cl, 0, 7);
1133 values->address = __gen_unpack_address(cl, 32, 55);
1134 values->padded_height_of_output_image_in_uif_blocks = __gen_unpack_uint(cl, 19, 31);
1135 values->xor_uif = __gen_unpack_uint(cl, 18, 18);
1136 values->last_tile_of_frame = __gen_unpack_uint(cl, 16, 16);
1137 values->disable_color_buffers_clear_on_write = __gen_unpack_uint(cl, 15, 15);
1138 values->disable_stencil_buffer_clear_on_write = __gen_unpack_uint(cl, 14, 14);
1139 values->disable_z_buffer_clear_on_write = __gen_unpack_uint(cl, 13, 13);
1140 values->raw_mode = __gen_unpack_uint(cl, 12, 12);
1141 values->buffer_to_store = __gen_unpack_uint(cl, 8, 11);
1142 }
1143 #endif
1144
1145
1146 #define V3D33_LOAD_TILE_BUFFER_GENERAL_opcode 30
1147 #define V3D33_LOAD_TILE_BUFFER_GENERAL_header \
1148 .opcode = 30
1149
1150 struct V3D33_LOAD_TILE_BUFFER_GENERAL {
1151 uint32_t opcode;
1152 __gen_address_type address;
1153 uint32_t padded_height_of_output_image_in_uif_blocks;
1154 bool xor_uif;
1155 bool raw_mode;
1156 uint32_t buffer_to_load;
1157 #define RENDER_TARGET_0 0
1158 #define RENDER_TARGET_1 1
1159 #define RENDER_TARGET_2 2
1160 #define RENDER_TARGET_3 3
1161 #define NONE 8
1162 #define Z 9
1163 #define STENCIL 10
1164 #define ZSTENCIL 11
1165 };
1166
1167 static inline void
V3D33_LOAD_TILE_BUFFER_GENERAL_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_LOAD_TILE_BUFFER_GENERAL * restrict values)1168 V3D33_LOAD_TILE_BUFFER_GENERAL_pack(__gen_user_data *data, uint8_t * restrict cl,
1169 const struct V3D33_LOAD_TILE_BUFFER_GENERAL * restrict values)
1170 {
1171 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1172
1173 cl[ 1] = __gen_uint(values->raw_mode, 4, 4) |
1174 __gen_uint(values->buffer_to_load, 0, 3);
1175
1176 cl[ 2] = __gen_uint(values->padded_height_of_output_image_in_uif_blocks, 3, 15) |
1177 __gen_uint(values->xor_uif, 2, 2);
1178
1179 cl[ 3] = __gen_uint(values->padded_height_of_output_image_in_uif_blocks, 3, 15) >> 8;
1180
1181 __gen_emit_reloc(data, &values->address);
1182 cl[ 4] = __gen_address_offset(&values->address) >> 8;
1183
1184 cl[ 5] = __gen_address_offset(&values->address) >> 16;
1185
1186 cl[ 6] = __gen_address_offset(&values->address) >> 24;
1187
1188 }
1189
1190 #define V3D33_LOAD_TILE_BUFFER_GENERAL_length 7
1191 #ifdef __gen_unpack_address
1192 static inline void
V3D33_LOAD_TILE_BUFFER_GENERAL_unpack(const uint8_t * restrict cl,struct V3D33_LOAD_TILE_BUFFER_GENERAL * restrict values)1193 V3D33_LOAD_TILE_BUFFER_GENERAL_unpack(const uint8_t * restrict cl,
1194 struct V3D33_LOAD_TILE_BUFFER_GENERAL * restrict values)
1195 {
1196 values->opcode = __gen_unpack_uint(cl, 0, 7);
1197 values->address = __gen_unpack_address(cl, 32, 55);
1198 values->padded_height_of_output_image_in_uif_blocks = __gen_unpack_uint(cl, 19, 31);
1199 values->xor_uif = __gen_unpack_uint(cl, 18, 18);
1200 values->raw_mode = __gen_unpack_uint(cl, 12, 12);
1201 values->buffer_to_load = __gen_unpack_uint(cl, 8, 11);
1202 }
1203 #endif
1204
1205
1206 #define V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT_opcode 31
1207 #define V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT_header\
1208 .opcode = 31
1209
1210 struct V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT {
1211 uint32_t opcode;
1212 };
1213
1214 static inline void
V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT * restrict values)1215 V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT_pack(__gen_user_data *data, uint8_t * restrict cl,
1216 const struct V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT * restrict values)
1217 {
1218 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1219
1220 }
1221
1222 #define V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT_length 1
1223 #ifdef __gen_unpack_address
1224 static inline void
V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT_unpack(const uint8_t * restrict cl,struct V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT * restrict values)1225 V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT_unpack(const uint8_t * restrict cl,
1226 struct V3D33_TRANSFORM_FEEDBACK_FLUSH_AND_COUNT * restrict values)
1227 {
1228 values->opcode = __gen_unpack_uint(cl, 0, 7);
1229 }
1230 #endif
1231
1232
1233 #define V3D33_INDEXED_PRIM_LIST_opcode 32
1234 #define V3D33_INDEXED_PRIM_LIST_header \
1235 .opcode = 32
1236
1237 struct V3D33_INDEXED_PRIM_LIST {
1238 uint32_t opcode;
1239 uint32_t minimum_index;
1240 bool enable_primitive_restarts;
1241 uint32_t maximum_index;
1242 __gen_address_type address_of_indices_list;
1243 uint32_t length;
1244 uint32_t index_type;
1245 #define INDEX_TYPE_8_BIT 0
1246 #define INDEX_TYPE_16_BIT 1
1247 #define INDEX_TYPE_32_BIT 2
1248 enum V3D33_Primitive mode;
1249 };
1250
1251 static inline void
V3D33_INDEXED_PRIM_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_INDEXED_PRIM_LIST * restrict values)1252 V3D33_INDEXED_PRIM_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
1253 const struct V3D33_INDEXED_PRIM_LIST * restrict values)
1254 {
1255 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1256
1257 cl[ 1] = __gen_uint(values->index_type, 6, 7) |
1258 __gen_uint(values->mode, 0, 4);
1259
1260
1261 memcpy(&cl[2], &values->length, sizeof(values->length));
1262 __gen_emit_reloc(data, &values->address_of_indices_list);
1263 cl[ 6] = __gen_address_offset(&values->address_of_indices_list);
1264
1265 cl[ 7] = __gen_address_offset(&values->address_of_indices_list) >> 8;
1266
1267 cl[ 8] = __gen_address_offset(&values->address_of_indices_list) >> 16;
1268
1269 cl[ 9] = __gen_address_offset(&values->address_of_indices_list) >> 24;
1270
1271 cl[10] = __gen_uint(values->maximum_index, 0, 30);
1272
1273 cl[11] = __gen_uint(values->maximum_index, 0, 30) >> 8;
1274
1275 cl[12] = __gen_uint(values->maximum_index, 0, 30) >> 16;
1276
1277 cl[13] = __gen_uint(values->enable_primitive_restarts, 7, 7) |
1278 __gen_uint(values->maximum_index, 0, 30) >> 24;
1279
1280
1281 memcpy(&cl[14], &values->minimum_index, sizeof(values->minimum_index));
1282 }
1283
1284 #define V3D33_INDEXED_PRIM_LIST_length 18
1285 #ifdef __gen_unpack_address
1286 static inline void
V3D33_INDEXED_PRIM_LIST_unpack(const uint8_t * restrict cl,struct V3D33_INDEXED_PRIM_LIST * restrict values)1287 V3D33_INDEXED_PRIM_LIST_unpack(const uint8_t * restrict cl,
1288 struct V3D33_INDEXED_PRIM_LIST * restrict values)
1289 {
1290 values->opcode = __gen_unpack_uint(cl, 0, 7);
1291 values->minimum_index = __gen_unpack_uint(cl, 112, 143);
1292 values->enable_primitive_restarts = __gen_unpack_uint(cl, 111, 111);
1293 values->maximum_index = __gen_unpack_uint(cl, 80, 110);
1294 values->address_of_indices_list = __gen_unpack_address(cl, 48, 79);
1295 values->length = __gen_unpack_uint(cl, 16, 47);
1296 values->index_type = __gen_unpack_uint(cl, 14, 15);
1297 values->mode = __gen_unpack_uint(cl, 8, 12);
1298 }
1299 #endif
1300
1301
1302 #define V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST_opcode 33
1303 #define V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST_header\
1304 .opcode = 33
1305
1306 struct V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST {
1307 uint32_t opcode;
1308 uint32_t stride_in_multiples_of_4_bytes;
1309 __gen_address_type address_of_indices_list;
1310 __gen_address_type address;
1311 bool enable_primitive_restarts;
1312 uint32_t number_of_draw_indirect_indexed_records;
1313 uint32_t index_type;
1314 #define INDEX_TYPE_8_BIT 0
1315 #define INDEX_TYPE_16_BIT 1
1316 #define INDEX_TYPE_32_BIT 2
1317 enum V3D33_Primitive mode;
1318 };
1319
1320 static inline void
V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST * restrict values)1321 V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
1322 const struct V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST * restrict values)
1323 {
1324 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1325
1326 cl[ 1] = __gen_uint(values->index_type, 6, 7) |
1327 __gen_uint(values->mode, 0, 5);
1328
1329 cl[ 2] = __gen_uint(values->number_of_draw_indirect_indexed_records, 0, 30);
1330
1331 cl[ 3] = __gen_uint(values->number_of_draw_indirect_indexed_records, 0, 30) >> 8;
1332
1333 cl[ 4] = __gen_uint(values->number_of_draw_indirect_indexed_records, 0, 30) >> 16;
1334
1335 cl[ 5] = __gen_uint(values->enable_primitive_restarts, 7, 7) |
1336 __gen_uint(values->number_of_draw_indirect_indexed_records, 0, 30) >> 24;
1337
1338 __gen_emit_reloc(data, &values->address);
1339 cl[ 6] = __gen_address_offset(&values->address);
1340
1341 cl[ 7] = __gen_address_offset(&values->address) >> 8;
1342
1343 cl[ 8] = __gen_address_offset(&values->address) >> 16;
1344
1345 cl[ 9] = __gen_address_offset(&values->address) >> 24;
1346
1347 __gen_emit_reloc(data, &values->address_of_indices_list);
1348 cl[10] = __gen_address_offset(&values->address_of_indices_list);
1349
1350 cl[11] = __gen_address_offset(&values->address_of_indices_list) >> 8;
1351
1352 cl[12] = __gen_address_offset(&values->address_of_indices_list) >> 16;
1353
1354 cl[13] = __gen_address_offset(&values->address_of_indices_list) >> 24;
1355
1356 cl[14] = __gen_uint(values->stride_in_multiples_of_4_bytes, 0, 7);
1357
1358 }
1359
1360 #define V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST_length 15
1361 #ifdef __gen_unpack_address
1362 static inline void
V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST_unpack(const uint8_t * restrict cl,struct V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST * restrict values)1363 V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST_unpack(const uint8_t * restrict cl,
1364 struct V3D33_INDIRECT_INDEXED_INSTANCED_PRIM_LIST * restrict values)
1365 {
1366 values->opcode = __gen_unpack_uint(cl, 0, 7);
1367 values->stride_in_multiples_of_4_bytes = __gen_unpack_uint(cl, 112, 119);
1368 values->address_of_indices_list = __gen_unpack_address(cl, 80, 111);
1369 values->address = __gen_unpack_address(cl, 48, 79);
1370 values->enable_primitive_restarts = __gen_unpack_uint(cl, 47, 47);
1371 values->number_of_draw_indirect_indexed_records = __gen_unpack_uint(cl, 16, 46);
1372 values->index_type = __gen_unpack_uint(cl, 14, 15);
1373 values->mode = __gen_unpack_uint(cl, 8, 13);
1374 }
1375 #endif
1376
1377
1378 #define V3D33_INDEXED_INSTANCED_PRIM_LIST_opcode 34
1379 #define V3D33_INDEXED_INSTANCED_PRIM_LIST_header\
1380 .opcode = 34
1381
1382 struct V3D33_INDEXED_INSTANCED_PRIM_LIST {
1383 uint32_t opcode;
1384 bool enable_primitive_restarts;
1385 uint32_t maximum_index;
1386 __gen_address_type address_of_indices_list;
1387 uint32_t number_of_instances;
1388 uint32_t instance_length;
1389 uint32_t index_type;
1390 #define INDEX_TYPE_8_BIT 0
1391 #define INDEX_TYPE_16_BIT 1
1392 #define INDEX_TYPE_32_BIT 2
1393 enum V3D33_Primitive mode;
1394 };
1395
1396 static inline void
V3D33_INDEXED_INSTANCED_PRIM_LIST_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_INDEXED_INSTANCED_PRIM_LIST * restrict values)1397 V3D33_INDEXED_INSTANCED_PRIM_LIST_pack(__gen_user_data *data, uint8_t * restrict cl,
1398 const struct V3D33_INDEXED_INSTANCED_PRIM_LIST * restrict values)
1399 {
1400 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1401
1402 cl[ 1] = __gen_uint(values->index_type, 6, 7) |
1403 __gen_uint(values->mode, 0, 4);
1404
1405
1406 memcpy(&cl[2], &values->instance_length, sizeof(values->instance_length));
1407
1408 memcpy(&cl[6], &values->number_of_instances, sizeof(values->number_of_instances));
1409 __gen_emit_reloc(data, &values->address_of_indices_list);
1410 cl[10] = __gen_address_offset(&values->address_of_indices_list);
1411
1412 cl[11] = __gen_address_offset(&values->address_of_indices_list) >> 8;
1413
1414 cl[12] = __gen_address_offset(&values->address_of_indices_list) >> 16;
1415
1416 cl[13] = __gen_address_offset(&values->address_of_indices_list) >> 24;
1417
1418 cl[14] = __gen_uint(values->maximum_index, 0, 30);
1419
1420 cl[15] = __gen_uint(values->maximum_index, 0, 30) >> 8;
1421
1422 cl[16] = __gen_uint(values->maximum_index, 0, 30) >> 16;
1423
1424 cl[17] = __gen_uint(values->enable_primitive_restarts, 7, 7) |
1425 __gen_uint(values->maximum_index, 0, 30) >> 24;
1426
1427 }
1428
1429 #define V3D33_INDEXED_INSTANCED_PRIM_LIST_length 18
1430 #ifdef __gen_unpack_address
1431 static inline void
V3D33_INDEXED_INSTANCED_PRIM_LIST_unpack(const uint8_t * restrict cl,struct V3D33_INDEXED_INSTANCED_PRIM_LIST * restrict values)1432 V3D33_INDEXED_INSTANCED_PRIM_LIST_unpack(const uint8_t * restrict cl,
1433 struct V3D33_INDEXED_INSTANCED_PRIM_LIST * restrict values)
1434 {
1435 values->opcode = __gen_unpack_uint(cl, 0, 7);
1436 values->enable_primitive_restarts = __gen_unpack_uint(cl, 143, 143);
1437 values->maximum_index = __gen_unpack_uint(cl, 112, 142);
1438 values->address_of_indices_list = __gen_unpack_address(cl, 80, 111);
1439 values->number_of_instances = __gen_unpack_uint(cl, 48, 79);
1440 values->instance_length = __gen_unpack_uint(cl, 16, 47);
1441 values->index_type = __gen_unpack_uint(cl, 14, 15);
1442 values->mode = __gen_unpack_uint(cl, 8, 12);
1443 }
1444 #endif
1445
1446
1447 #define V3D33_VERTEX_ARRAY_PRIMS_opcode 36
1448 #define V3D33_VERTEX_ARRAY_PRIMS_header \
1449 .opcode = 36
1450
1451 struct V3D33_VERTEX_ARRAY_PRIMS {
1452 uint32_t opcode;
1453 uint32_t index_of_first_vertex;
1454 uint32_t length;
1455 enum V3D33_Primitive mode;
1456 };
1457
1458 static inline void
V3D33_VERTEX_ARRAY_PRIMS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_VERTEX_ARRAY_PRIMS * restrict values)1459 V3D33_VERTEX_ARRAY_PRIMS_pack(__gen_user_data *data, uint8_t * restrict cl,
1460 const struct V3D33_VERTEX_ARRAY_PRIMS * restrict values)
1461 {
1462 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1463
1464 cl[ 1] = __gen_uint(values->mode, 0, 7);
1465
1466
1467 memcpy(&cl[2], &values->length, sizeof(values->length));
1468
1469 memcpy(&cl[6], &values->index_of_first_vertex, sizeof(values->index_of_first_vertex));
1470 }
1471
1472 #define V3D33_VERTEX_ARRAY_PRIMS_length 10
1473 #ifdef __gen_unpack_address
1474 static inline void
V3D33_VERTEX_ARRAY_PRIMS_unpack(const uint8_t * restrict cl,struct V3D33_VERTEX_ARRAY_PRIMS * restrict values)1475 V3D33_VERTEX_ARRAY_PRIMS_unpack(const uint8_t * restrict cl,
1476 struct V3D33_VERTEX_ARRAY_PRIMS * restrict values)
1477 {
1478 values->opcode = __gen_unpack_uint(cl, 0, 7);
1479 values->index_of_first_vertex = __gen_unpack_uint(cl, 48, 79);
1480 values->length = __gen_unpack_uint(cl, 16, 47);
1481 values->mode = __gen_unpack_uint(cl, 8, 15);
1482 }
1483 #endif
1484
1485
1486 #define V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS_opcode 37
1487 #define V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS_header\
1488 .opcode = 37
1489
1490 struct V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS {
1491 uint32_t opcode;
1492 uint32_t stride_in_multiples_of_4_bytes;
1493 __gen_address_type address;
1494 uint32_t number_of_draw_indirect_array_records;
1495 enum V3D33_Primitive mode;
1496 };
1497
1498 static inline void
V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)1499 V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS_pack(__gen_user_data *data, uint8_t * restrict cl,
1500 const struct V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)
1501 {
1502 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1503
1504 cl[ 1] = __gen_uint(values->mode, 0, 7);
1505
1506
1507 memcpy(&cl[2], &values->number_of_draw_indirect_array_records, sizeof(values->number_of_draw_indirect_array_records));
1508 __gen_emit_reloc(data, &values->address);
1509 cl[ 6] = __gen_address_offset(&values->address);
1510
1511 cl[ 7] = __gen_address_offset(&values->address) >> 8;
1512
1513 cl[ 8] = __gen_address_offset(&values->address) >> 16;
1514
1515 cl[ 9] = __gen_address_offset(&values->address) >> 24;
1516
1517 cl[10] = __gen_uint(values->stride_in_multiples_of_4_bytes, 0, 7);
1518
1519 }
1520
1521 #define V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS_length 11
1522 #ifdef __gen_unpack_address
1523 static inline void
V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS_unpack(const uint8_t * restrict cl,struct V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)1524 V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS_unpack(const uint8_t * restrict cl,
1525 struct V3D33_INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)
1526 {
1527 values->opcode = __gen_unpack_uint(cl, 0, 7);
1528 values->stride_in_multiples_of_4_bytes = __gen_unpack_uint(cl, 80, 87);
1529 values->address = __gen_unpack_address(cl, 48, 79);
1530 values->number_of_draw_indirect_array_records = __gen_unpack_uint(cl, 16, 47);
1531 values->mode = __gen_unpack_uint(cl, 8, 15);
1532 }
1533 #endif
1534
1535
1536 #define V3D33_VERTEX_ARRAY_INSTANCED_PRIMS_opcode 38
1537 #define V3D33_VERTEX_ARRAY_INSTANCED_PRIMS_header\
1538 .opcode = 38
1539
1540 struct V3D33_VERTEX_ARRAY_INSTANCED_PRIMS {
1541 uint32_t opcode;
1542 uint32_t index_of_first_vertex;
1543 uint32_t number_of_instances;
1544 uint32_t instance_length;
1545 enum V3D33_Primitive mode;
1546 };
1547
1548 static inline void
V3D33_VERTEX_ARRAY_INSTANCED_PRIMS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)1549 V3D33_VERTEX_ARRAY_INSTANCED_PRIMS_pack(__gen_user_data *data, uint8_t * restrict cl,
1550 const struct V3D33_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)
1551 {
1552 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1553
1554 cl[ 1] = __gen_uint(values->mode, 0, 7);
1555
1556
1557 memcpy(&cl[2], &values->instance_length, sizeof(values->instance_length));
1558
1559 memcpy(&cl[6], &values->number_of_instances, sizeof(values->number_of_instances));
1560
1561 memcpy(&cl[10], &values->index_of_first_vertex, sizeof(values->index_of_first_vertex));
1562 }
1563
1564 #define V3D33_VERTEX_ARRAY_INSTANCED_PRIMS_length 14
1565 #ifdef __gen_unpack_address
1566 static inline void
V3D33_VERTEX_ARRAY_INSTANCED_PRIMS_unpack(const uint8_t * restrict cl,struct V3D33_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)1567 V3D33_VERTEX_ARRAY_INSTANCED_PRIMS_unpack(const uint8_t * restrict cl,
1568 struct V3D33_VERTEX_ARRAY_INSTANCED_PRIMS * restrict values)
1569 {
1570 values->opcode = __gen_unpack_uint(cl, 0, 7);
1571 values->index_of_first_vertex = __gen_unpack_uint(cl, 80, 111);
1572 values->number_of_instances = __gen_unpack_uint(cl, 48, 79);
1573 values->instance_length = __gen_unpack_uint(cl, 16, 47);
1574 values->mode = __gen_unpack_uint(cl, 8, 15);
1575 }
1576 #endif
1577
1578
1579 #define V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS_opcode 39
1580 #define V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS_header\
1581 .opcode = 39
1582
1583 struct V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS {
1584 uint32_t opcode;
1585 uint32_t index_of_first_vertex;
1586 uint32_t instance_id;
1587 uint32_t instance_length;
1588 enum V3D33_Primitive mode;
1589 };
1590
1591 static inline void
V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS * restrict values)1592 V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS_pack(__gen_user_data *data, uint8_t * restrict cl,
1593 const struct V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS * restrict values)
1594 {
1595 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1596
1597 cl[ 1] = __gen_uint(values->mode, 0, 7);
1598
1599
1600 memcpy(&cl[2], &values->instance_length, sizeof(values->instance_length));
1601
1602 memcpy(&cl[6], &values->instance_id, sizeof(values->instance_id));
1603
1604 memcpy(&cl[10], &values->index_of_first_vertex, sizeof(values->index_of_first_vertex));
1605 }
1606
1607 #define V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS_length 14
1608 #ifdef __gen_unpack_address
1609 static inline void
V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS_unpack(const uint8_t * restrict cl,struct V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS * restrict values)1610 V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS_unpack(const uint8_t * restrict cl,
1611 struct V3D33_VERTEX_ARRAY_SINGLE_INSTANCE_PRIMS * restrict values)
1612 {
1613 values->opcode = __gen_unpack_uint(cl, 0, 7);
1614 values->index_of_first_vertex = __gen_unpack_uint(cl, 80, 111);
1615 values->instance_id = __gen_unpack_uint(cl, 48, 79);
1616 values->instance_length = __gen_unpack_uint(cl, 16, 47);
1617 values->mode = __gen_unpack_uint(cl, 8, 15);
1618 }
1619 #endif
1620
1621
1622 #define V3D33_BASE_VERTEX_BASE_INSTANCE_opcode 43
1623 #define V3D33_BASE_VERTEX_BASE_INSTANCE_header \
1624 .opcode = 43
1625
1626 struct V3D33_BASE_VERTEX_BASE_INSTANCE {
1627 uint32_t opcode;
1628 uint32_t base_instance;
1629 uint32_t base_vertex;
1630 };
1631
1632 static inline void
V3D33_BASE_VERTEX_BASE_INSTANCE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BASE_VERTEX_BASE_INSTANCE * restrict values)1633 V3D33_BASE_VERTEX_BASE_INSTANCE_pack(__gen_user_data *data, uint8_t * restrict cl,
1634 const struct V3D33_BASE_VERTEX_BASE_INSTANCE * restrict values)
1635 {
1636 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1637
1638
1639 memcpy(&cl[1], &values->base_vertex, sizeof(values->base_vertex));
1640
1641 memcpy(&cl[5], &values->base_instance, sizeof(values->base_instance));
1642 }
1643
1644 #define V3D33_BASE_VERTEX_BASE_INSTANCE_length 9
1645 #ifdef __gen_unpack_address
1646 static inline void
V3D33_BASE_VERTEX_BASE_INSTANCE_unpack(const uint8_t * restrict cl,struct V3D33_BASE_VERTEX_BASE_INSTANCE * restrict values)1647 V3D33_BASE_VERTEX_BASE_INSTANCE_unpack(const uint8_t * restrict cl,
1648 struct V3D33_BASE_VERTEX_BASE_INSTANCE * restrict values)
1649 {
1650 values->opcode = __gen_unpack_uint(cl, 0, 7);
1651 values->base_instance = __gen_unpack_uint(cl, 40, 71);
1652 values->base_vertex = __gen_unpack_uint(cl, 8, 39);
1653 }
1654 #endif
1655
1656
1657 #define V3D33_PRIM_LIST_FORMAT_opcode 56
1658 #define V3D33_PRIM_LIST_FORMAT_header \
1659 .opcode = 56
1660
1661 struct V3D33_PRIM_LIST_FORMAT {
1662 uint32_t opcode;
1663 bool tri_strip_or_fan;
1664 uint32_t primitive_type;
1665 #define LIST_POINTS 0
1666 #define LIST_LINES 1
1667 #define LIST_TRIANGLES 2
1668 };
1669
1670 static inline void
V3D33_PRIM_LIST_FORMAT_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_PRIM_LIST_FORMAT * restrict values)1671 V3D33_PRIM_LIST_FORMAT_pack(__gen_user_data *data, uint8_t * restrict cl,
1672 const struct V3D33_PRIM_LIST_FORMAT * restrict values)
1673 {
1674 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1675
1676 cl[ 1] = __gen_uint(values->tri_strip_or_fan, 7, 7) |
1677 __gen_uint(values->primitive_type, 0, 5);
1678
1679 }
1680
1681 #define V3D33_PRIM_LIST_FORMAT_length 2
1682 #ifdef __gen_unpack_address
1683 static inline void
V3D33_PRIM_LIST_FORMAT_unpack(const uint8_t * restrict cl,struct V3D33_PRIM_LIST_FORMAT * restrict values)1684 V3D33_PRIM_LIST_FORMAT_unpack(const uint8_t * restrict cl,
1685 struct V3D33_PRIM_LIST_FORMAT * restrict values)
1686 {
1687 values->opcode = __gen_unpack_uint(cl, 0, 7);
1688 values->tri_strip_or_fan = __gen_unpack_uint(cl, 15, 15);
1689 values->primitive_type = __gen_unpack_uint(cl, 8, 13);
1690 }
1691 #endif
1692
1693
1694 #define V3D33_SERIAL_NUMBER_LIST_START_opcode 57
1695 #define V3D33_SERIAL_NUMBER_LIST_START_header \
1696 .opcode = 57
1697
1698 struct V3D33_SERIAL_NUMBER_LIST_START {
1699 uint32_t opcode;
1700 __gen_address_type address;
1701 uint32_t block_size;
1702 #define BLOCK_SIZE_64B 0
1703 #define BLOCK_SIZE_128B 1
1704 #define BLOCK_SIZE_256B 2
1705 };
1706
1707 static inline void
V3D33_SERIAL_NUMBER_LIST_START_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_SERIAL_NUMBER_LIST_START * restrict values)1708 V3D33_SERIAL_NUMBER_LIST_START_pack(__gen_user_data *data, uint8_t * restrict cl,
1709 const struct V3D33_SERIAL_NUMBER_LIST_START * restrict values)
1710 {
1711 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1712
1713 __gen_emit_reloc(data, &values->address);
1714 cl[ 1] = __gen_address_offset(&values->address) |
1715 __gen_uint(values->block_size, 0, 1);
1716
1717 cl[ 2] = __gen_address_offset(&values->address) >> 8;
1718
1719 cl[ 3] = __gen_address_offset(&values->address) >> 16;
1720
1721 cl[ 4] = __gen_address_offset(&values->address) >> 24;
1722
1723 }
1724
1725 #define V3D33_SERIAL_NUMBER_LIST_START_length 5
1726 #ifdef __gen_unpack_address
1727 static inline void
V3D33_SERIAL_NUMBER_LIST_START_unpack(const uint8_t * restrict cl,struct V3D33_SERIAL_NUMBER_LIST_START * restrict values)1728 V3D33_SERIAL_NUMBER_LIST_START_unpack(const uint8_t * restrict cl,
1729 struct V3D33_SERIAL_NUMBER_LIST_START * restrict values)
1730 {
1731 values->opcode = __gen_unpack_uint(cl, 0, 7);
1732 values->address = __gen_unpack_address(cl, 14, 39);
1733 values->block_size = __gen_unpack_uint(cl, 8, 9);
1734 }
1735 #endif
1736
1737
1738 #define V3D33_GL_SHADER_STATE_opcode 64
1739 #define V3D33_GL_SHADER_STATE_header \
1740 .opcode = 64
1741
1742 struct V3D33_GL_SHADER_STATE {
1743 uint32_t opcode;
1744 __gen_address_type address;
1745 uint32_t number_of_attribute_arrays;
1746 };
1747
1748 static inline void
V3D33_GL_SHADER_STATE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_GL_SHADER_STATE * restrict values)1749 V3D33_GL_SHADER_STATE_pack(__gen_user_data *data, uint8_t * restrict cl,
1750 const struct V3D33_GL_SHADER_STATE * restrict values)
1751 {
1752 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1753
1754 __gen_emit_reloc(data, &values->address);
1755 cl[ 1] = __gen_address_offset(&values->address) |
1756 __gen_uint(values->number_of_attribute_arrays, 0, 4);
1757
1758 cl[ 2] = __gen_address_offset(&values->address) >> 8;
1759
1760 cl[ 3] = __gen_address_offset(&values->address) >> 16;
1761
1762 cl[ 4] = __gen_address_offset(&values->address) >> 24;
1763
1764 }
1765
1766 #define V3D33_GL_SHADER_STATE_length 5
1767 #ifdef __gen_unpack_address
1768 static inline void
V3D33_GL_SHADER_STATE_unpack(const uint8_t * restrict cl,struct V3D33_GL_SHADER_STATE * restrict values)1769 V3D33_GL_SHADER_STATE_unpack(const uint8_t * restrict cl,
1770 struct V3D33_GL_SHADER_STATE * restrict values)
1771 {
1772 values->opcode = __gen_unpack_uint(cl, 0, 7);
1773 values->address = __gen_unpack_address(cl, 13, 39);
1774 values->number_of_attribute_arrays = __gen_unpack_uint(cl, 8, 12);
1775 }
1776 #endif
1777
1778
1779 #define V3D33_PRIMITIVE_COUNTS_FEEDBACK_opcode 72
1780 #define V3D33_PRIMITIVE_COUNTS_FEEDBACK_header \
1781 .opcode = 72
1782
1783 struct V3D33_PRIMITIVE_COUNTS_FEEDBACK {
1784 uint32_t opcode;
1785 __gen_address_type address;
1786 bool read_write_64byte;
1787 uint32_t op;
1788 #define STORE_PRIMITIVE_COUNTS 0
1789 #define STORE_PRIMITIVE_COUNTS_AND_ZERO 1
1790 #define STORE_BUFFER_STATE 2
1791 #define STORE_BUFFER_STATE_CL 3
1792 #define LOAD_BUFFER_STATE 8
1793 };
1794
1795 static inline void
V3D33_PRIMITIVE_COUNTS_FEEDBACK_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_PRIMITIVE_COUNTS_FEEDBACK * restrict values)1796 V3D33_PRIMITIVE_COUNTS_FEEDBACK_pack(__gen_user_data *data, uint8_t * restrict cl,
1797 const struct V3D33_PRIMITIVE_COUNTS_FEEDBACK * restrict values)
1798 {
1799 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1800
1801 __gen_emit_reloc(data, &values->address);
1802 cl[ 1] = __gen_address_offset(&values->address) |
1803 __gen_uint(values->read_write_64byte, 4, 4) |
1804 __gen_uint(values->op, 0, 3);
1805
1806 cl[ 2] = __gen_address_offset(&values->address) >> 8;
1807
1808 cl[ 3] = __gen_address_offset(&values->address) >> 16;
1809
1810 cl[ 4] = __gen_address_offset(&values->address) >> 24;
1811
1812 }
1813
1814 #define V3D33_PRIMITIVE_COUNTS_FEEDBACK_length 5
1815 #ifdef __gen_unpack_address
1816 static inline void
V3D33_PRIMITIVE_COUNTS_FEEDBACK_unpack(const uint8_t * restrict cl,struct V3D33_PRIMITIVE_COUNTS_FEEDBACK * restrict values)1817 V3D33_PRIMITIVE_COUNTS_FEEDBACK_unpack(const uint8_t * restrict cl,
1818 struct V3D33_PRIMITIVE_COUNTS_FEEDBACK * restrict values)
1819 {
1820 values->opcode = __gen_unpack_uint(cl, 0, 7);
1821 values->address = __gen_unpack_address(cl, 13, 39);
1822 values->read_write_64byte = __gen_unpack_uint(cl, 12, 12);
1823 values->op = __gen_unpack_uint(cl, 8, 11);
1824 }
1825 #endif
1826
1827
1828 #define V3D33_VCM_CACHE_SIZE_opcode 73
1829 #define V3D33_VCM_CACHE_SIZE_header \
1830 .opcode = 73
1831
1832 struct V3D33_VCM_CACHE_SIZE {
1833 uint32_t opcode;
1834 uint32_t number_of_16_vertex_batches_for_rendering;
1835 uint32_t number_of_16_vertex_batches_for_binning;
1836 };
1837
1838 static inline void
V3D33_VCM_CACHE_SIZE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_VCM_CACHE_SIZE * restrict values)1839 V3D33_VCM_CACHE_SIZE_pack(__gen_user_data *data, uint8_t * restrict cl,
1840 const struct V3D33_VCM_CACHE_SIZE * restrict values)
1841 {
1842 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1843
1844 cl[ 1] = __gen_uint(values->number_of_16_vertex_batches_for_rendering, 4, 7) |
1845 __gen_uint(values->number_of_16_vertex_batches_for_binning, 0, 3);
1846
1847 }
1848
1849 #define V3D33_VCM_CACHE_SIZE_length 2
1850 #ifdef __gen_unpack_address
1851 static inline void
V3D33_VCM_CACHE_SIZE_unpack(const uint8_t * restrict cl,struct V3D33_VCM_CACHE_SIZE * restrict values)1852 V3D33_VCM_CACHE_SIZE_unpack(const uint8_t * restrict cl,
1853 struct V3D33_VCM_CACHE_SIZE * restrict values)
1854 {
1855 values->opcode = __gen_unpack_uint(cl, 0, 7);
1856 values->number_of_16_vertex_batches_for_rendering = __gen_unpack_uint(cl, 12, 15);
1857 values->number_of_16_vertex_batches_for_binning = __gen_unpack_uint(cl, 8, 11);
1858 }
1859 #endif
1860
1861
1862 #define V3D33_TRANSFORM_FEEDBACK_ENABLE_opcode 74
1863 #define V3D33_TRANSFORM_FEEDBACK_ENABLE_header \
1864 .opcode = 74
1865
1866 struct V3D33_TRANSFORM_FEEDBACK_ENABLE {
1867 uint32_t opcode;
1868 uint32_t number_of_32_bit_output_buffer_address_following;
1869 uint32_t number_of_16_bit_output_data_specs_following;
1870 };
1871
1872 static inline void
V3D33_TRANSFORM_FEEDBACK_ENABLE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TRANSFORM_FEEDBACK_ENABLE * restrict values)1873 V3D33_TRANSFORM_FEEDBACK_ENABLE_pack(__gen_user_data *data, uint8_t * restrict cl,
1874 const struct V3D33_TRANSFORM_FEEDBACK_ENABLE * restrict values)
1875 {
1876 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1877
1878 cl[ 1] = 0;
1879 cl[ 2] = __gen_uint(values->number_of_32_bit_output_buffer_address_following, 0, 2) |
1880 __gen_uint(values->number_of_16_bit_output_data_specs_following, 3, 7);
1881
1882 }
1883
1884 #define V3D33_TRANSFORM_FEEDBACK_ENABLE_length 3
1885 #ifdef __gen_unpack_address
1886 static inline void
V3D33_TRANSFORM_FEEDBACK_ENABLE_unpack(const uint8_t * restrict cl,struct V3D33_TRANSFORM_FEEDBACK_ENABLE * restrict values)1887 V3D33_TRANSFORM_FEEDBACK_ENABLE_unpack(const uint8_t * restrict cl,
1888 struct V3D33_TRANSFORM_FEEDBACK_ENABLE * restrict values)
1889 {
1890 values->opcode = __gen_unpack_uint(cl, 0, 7);
1891 values->number_of_32_bit_output_buffer_address_following = __gen_unpack_uint(cl, 16, 18);
1892 values->number_of_16_bit_output_data_specs_following = __gen_unpack_uint(cl, 19, 23);
1893 }
1894 #endif
1895
1896
1897 #define V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA_opcode 75
1898 #define V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA_header\
1899 .opcode = 75
1900
1901 struct V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA {
1902 uint32_t opcode;
1903 };
1904
1905 static inline void
V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA * restrict values)1906 V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA_pack(__gen_user_data *data, uint8_t * restrict cl,
1907 const struct V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA * restrict values)
1908 {
1909 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1910
1911 }
1912
1913 #define V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA_length 1
1914 #ifdef __gen_unpack_address
1915 static inline void
V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA_unpack(const uint8_t * restrict cl,struct V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA * restrict values)1916 V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA_unpack(const uint8_t * restrict cl,
1917 struct V3D33_FLUSH_TRANSFORM_FEEDBACK_DATA * restrict values)
1918 {
1919 values->opcode = __gen_unpack_uint(cl, 0, 7);
1920 }
1921 #endif
1922
1923
1924 #define V3D33_L1_CACHE_FLUSH_CONTROL_opcode 76
1925 #define V3D33_L1_CACHE_FLUSH_CONTROL_header \
1926 .opcode = 76
1927
1928 struct V3D33_L1_CACHE_FLUSH_CONTROL {
1929 uint32_t opcode;
1930 uint32_t tmu_config_cache_clear;
1931 uint32_t tmu_data_cache_clear;
1932 uint32_t uniforms_cache_clear;
1933 uint32_t instruction_cache_clear;
1934 };
1935
1936 static inline void
V3D33_L1_CACHE_FLUSH_CONTROL_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_L1_CACHE_FLUSH_CONTROL * restrict values)1937 V3D33_L1_CACHE_FLUSH_CONTROL_pack(__gen_user_data *data, uint8_t * restrict cl,
1938 const struct V3D33_L1_CACHE_FLUSH_CONTROL * restrict values)
1939 {
1940 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1941
1942 cl[ 1] = __gen_uint(values->uniforms_cache_clear, 4, 7) |
1943 __gen_uint(values->instruction_cache_clear, 0, 3);
1944
1945 cl[ 2] = __gen_uint(values->tmu_config_cache_clear, 4, 7) |
1946 __gen_uint(values->tmu_data_cache_clear, 0, 3);
1947
1948 }
1949
1950 #define V3D33_L1_CACHE_FLUSH_CONTROL_length 3
1951 #ifdef __gen_unpack_address
1952 static inline void
V3D33_L1_CACHE_FLUSH_CONTROL_unpack(const uint8_t * restrict cl,struct V3D33_L1_CACHE_FLUSH_CONTROL * restrict values)1953 V3D33_L1_CACHE_FLUSH_CONTROL_unpack(const uint8_t * restrict cl,
1954 struct V3D33_L1_CACHE_FLUSH_CONTROL * restrict values)
1955 {
1956 values->opcode = __gen_unpack_uint(cl, 0, 7);
1957 values->tmu_config_cache_clear = __gen_unpack_uint(cl, 20, 23);
1958 values->tmu_data_cache_clear = __gen_unpack_uint(cl, 16, 19);
1959 values->uniforms_cache_clear = __gen_unpack_uint(cl, 12, 15);
1960 values->instruction_cache_clear = __gen_unpack_uint(cl, 8, 11);
1961 }
1962 #endif
1963
1964
1965 #define V3D33_L2T_CACHE_FLUSH_CONTROL_opcode 77
1966 #define V3D33_L2T_CACHE_FLUSH_CONTROL_header \
1967 .opcode = 77
1968
1969 struct V3D33_L2T_CACHE_FLUSH_CONTROL {
1970 uint32_t opcode;
1971 enum V3D33_L2T_Flush_Mode l2t_flush_mode;
1972 __gen_address_type l2t_flush_end;
1973 __gen_address_type l2t_flush_start;
1974 };
1975
1976 static inline void
V3D33_L2T_CACHE_FLUSH_CONTROL_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_L2T_CACHE_FLUSH_CONTROL * restrict values)1977 V3D33_L2T_CACHE_FLUSH_CONTROL_pack(__gen_user_data *data, uint8_t * restrict cl,
1978 const struct V3D33_L2T_CACHE_FLUSH_CONTROL * restrict values)
1979 {
1980 cl[ 0] = __gen_uint(values->opcode, 0, 7);
1981
1982 __gen_emit_reloc(data, &values->l2t_flush_start);
1983 cl[ 1] = __gen_address_offset(&values->l2t_flush_start);
1984
1985 cl[ 2] = __gen_address_offset(&values->l2t_flush_start) >> 8;
1986
1987 cl[ 3] = __gen_address_offset(&values->l2t_flush_start) >> 16;
1988
1989 cl[ 4] = __gen_address_offset(&values->l2t_flush_start) >> 24;
1990
1991 __gen_emit_reloc(data, &values->l2t_flush_end);
1992 cl[ 5] = __gen_address_offset(&values->l2t_flush_end);
1993
1994 cl[ 6] = __gen_address_offset(&values->l2t_flush_end) >> 8;
1995
1996 cl[ 7] = __gen_address_offset(&values->l2t_flush_end) >> 16;
1997
1998 cl[ 8] = __gen_address_offset(&values->l2t_flush_end) >> 24;
1999
2000 cl[ 9] = __gen_uint(values->l2t_flush_mode, 0, 3);
2001
2002 }
2003
2004 #define V3D33_L2T_CACHE_FLUSH_CONTROL_length 10
2005 #ifdef __gen_unpack_address
2006 static inline void
V3D33_L2T_CACHE_FLUSH_CONTROL_unpack(const uint8_t * restrict cl,struct V3D33_L2T_CACHE_FLUSH_CONTROL * restrict values)2007 V3D33_L2T_CACHE_FLUSH_CONTROL_unpack(const uint8_t * restrict cl,
2008 struct V3D33_L2T_CACHE_FLUSH_CONTROL * restrict values)
2009 {
2010 values->opcode = __gen_unpack_uint(cl, 0, 7);
2011 values->l2t_flush_mode = __gen_unpack_uint(cl, 72, 75);
2012 values->l2t_flush_end = __gen_unpack_address(cl, 40, 71);
2013 values->l2t_flush_start = __gen_unpack_address(cl, 8, 39);
2014 }
2015 #endif
2016
2017
2018 #define V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_header\
2019
2020
2021 struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC {
2022 uint32_t first_shaded_vertex_value_to_output;
2023 uint32_t number_of_consecutive_vertex_values_to_output_as_32_bit_values;
2024 uint32_t output_buffer_to_write_to;
2025 };
2026
2027 static inline void
V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC * restrict values)2028 V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_pack(__gen_user_data *data, uint8_t * restrict cl,
2029 const struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC * restrict values)
2030 {
2031 assert(values->number_of_consecutive_vertex_values_to_output_as_32_bit_values >= 1);
2032 cl[ 0] = __gen_uint(values->first_shaded_vertex_value_to_output, 0, 7);
2033
2034 cl[ 1] = __gen_uint(values->number_of_consecutive_vertex_values_to_output_as_32_bit_values - 1, 0, 3) |
2035 __gen_uint(values->output_buffer_to_write_to, 4, 5);
2036
2037 }
2038
2039 #define V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_length 2
2040 #ifdef __gen_unpack_address
2041 static inline void
V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_unpack(const uint8_t * restrict cl,struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC * restrict values)2042 V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_unpack(const uint8_t * restrict cl,
2043 struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC * restrict values)
2044 {
2045 values->first_shaded_vertex_value_to_output = __gen_unpack_uint(cl, 0, 7);
2046 values->number_of_consecutive_vertex_values_to_output_as_32_bit_values = __gen_unpack_uint(cl, 8, 11) + 1;
2047 values->output_buffer_to_write_to = __gen_unpack_uint(cl, 12, 13);
2048 }
2049 #endif
2050
2051
2052 #define V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS_header\
2053
2054
2055 struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS {
2056 __gen_address_type address;
2057 };
2058
2059 static inline void
V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS * restrict values)2060 V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS_pack(__gen_user_data *data, uint8_t * restrict cl,
2061 const struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS * restrict values)
2062 {
2063 __gen_emit_reloc(data, &values->address);
2064 cl[ 0] = __gen_address_offset(&values->address);
2065
2066 cl[ 1] = __gen_address_offset(&values->address) >> 8;
2067
2068 cl[ 2] = __gen_address_offset(&values->address) >> 16;
2069
2070 cl[ 3] = __gen_address_offset(&values->address) >> 24;
2071
2072 }
2073
2074 #define V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS_length 4
2075 #ifdef __gen_unpack_address
2076 static inline void
V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS_unpack(const uint8_t * restrict cl,struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS * restrict values)2077 V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS_unpack(const uint8_t * restrict cl,
2078 struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_ADDRESS * restrict values)
2079 {
2080 values->address = __gen_unpack_address(cl, 0, 31);
2081 }
2082 #endif
2083
2084
2085 #define V3D33_STENCIL_CFG_opcode 80
2086 #define V3D33_STENCIL_CFG_header \
2087 .opcode = 80
2088
2089 struct V3D33_STENCIL_CFG {
2090 uint32_t opcode;
2091 uint32_t stencil_write_mask;
2092 bool back_config;
2093 bool front_config;
2094 enum V3D33_Stencil_Op stencil_pass_op;
2095 enum V3D33_Stencil_Op depth_test_fail_op;
2096 enum V3D33_Stencil_Op stencil_test_fail_op;
2097 enum V3D33_Compare_Function stencil_test_function;
2098 uint32_t stencil_test_mask;
2099 uint32_t stencil_ref_value;
2100 };
2101
2102 static inline void
V3D33_STENCIL_CFG_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_STENCIL_CFG * restrict values)2103 V3D33_STENCIL_CFG_pack(__gen_user_data *data, uint8_t * restrict cl,
2104 const struct V3D33_STENCIL_CFG * restrict values)
2105 {
2106 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2107
2108 cl[ 1] = __gen_uint(values->stencil_ref_value, 0, 7);
2109
2110 cl[ 2] = __gen_uint(values->stencil_test_mask, 0, 7);
2111
2112 cl[ 3] = __gen_uint(values->depth_test_fail_op, 6, 8) |
2113 __gen_uint(values->stencil_test_fail_op, 3, 5) |
2114 __gen_uint(values->stencil_test_function, 0, 2);
2115
2116 cl[ 4] = __gen_uint(values->back_config, 5, 5) |
2117 __gen_uint(values->front_config, 4, 4) |
2118 __gen_uint(values->stencil_pass_op, 1, 3) |
2119 __gen_uint(values->depth_test_fail_op, 6, 8) >> 8;
2120
2121 cl[ 5] = __gen_uint(values->stencil_write_mask, 0, 7);
2122
2123 }
2124
2125 #define V3D33_STENCIL_CFG_length 6
2126 #ifdef __gen_unpack_address
2127 static inline void
V3D33_STENCIL_CFG_unpack(const uint8_t * restrict cl,struct V3D33_STENCIL_CFG * restrict values)2128 V3D33_STENCIL_CFG_unpack(const uint8_t * restrict cl,
2129 struct V3D33_STENCIL_CFG * restrict values)
2130 {
2131 values->opcode = __gen_unpack_uint(cl, 0, 7);
2132 values->stencil_write_mask = __gen_unpack_uint(cl, 40, 47);
2133 values->back_config = __gen_unpack_uint(cl, 37, 37);
2134 values->front_config = __gen_unpack_uint(cl, 36, 36);
2135 values->stencil_pass_op = __gen_unpack_uint(cl, 33, 35);
2136 values->depth_test_fail_op = __gen_unpack_uint(cl, 30, 32);
2137 values->stencil_test_fail_op = __gen_unpack_uint(cl, 27, 29);
2138 values->stencil_test_function = __gen_unpack_uint(cl, 24, 26);
2139 values->stencil_test_mask = __gen_unpack_uint(cl, 16, 23);
2140 values->stencil_ref_value = __gen_unpack_uint(cl, 8, 15);
2141 }
2142 #endif
2143
2144
2145 #define V3D33_BLEND_CFG_opcode 84
2146 #define V3D33_BLEND_CFG_header \
2147 .opcode = 84
2148
2149 struct V3D33_BLEND_CFG {
2150 uint32_t opcode;
2151 enum V3D33_Blend_Factor color_blend_dst_factor;
2152 enum V3D33_Blend_Factor color_blend_src_factor;
2153 enum V3D33_Blend_Mode color_blend_mode;
2154 enum V3D33_Blend_Factor alpha_blend_dst_factor;
2155 enum V3D33_Blend_Factor alpha_blend_src_factor;
2156 enum V3D33_Blend_Mode alpha_blend_mode;
2157 };
2158
2159 static inline void
V3D33_BLEND_CFG_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BLEND_CFG * restrict values)2160 V3D33_BLEND_CFG_pack(__gen_user_data *data, uint8_t * restrict cl,
2161 const struct V3D33_BLEND_CFG * restrict values)
2162 {
2163 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2164
2165 cl[ 1] = __gen_uint(values->alpha_blend_src_factor, 4, 7) |
2166 __gen_uint(values->alpha_blend_mode, 0, 3);
2167
2168 cl[ 2] = __gen_uint(values->color_blend_mode, 4, 7) |
2169 __gen_uint(values->alpha_blend_dst_factor, 0, 3);
2170
2171 cl[ 3] = __gen_uint(values->color_blend_dst_factor, 4, 7) |
2172 __gen_uint(values->color_blend_src_factor, 0, 3);
2173
2174 }
2175
2176 #define V3D33_BLEND_CFG_length 4
2177 #ifdef __gen_unpack_address
2178 static inline void
V3D33_BLEND_CFG_unpack(const uint8_t * restrict cl,struct V3D33_BLEND_CFG * restrict values)2179 V3D33_BLEND_CFG_unpack(const uint8_t * restrict cl,
2180 struct V3D33_BLEND_CFG * restrict values)
2181 {
2182 values->opcode = __gen_unpack_uint(cl, 0, 7);
2183 values->color_blend_dst_factor = __gen_unpack_uint(cl, 28, 31);
2184 values->color_blend_src_factor = __gen_unpack_uint(cl, 24, 27);
2185 values->color_blend_mode = __gen_unpack_uint(cl, 20, 23);
2186 values->alpha_blend_dst_factor = __gen_unpack_uint(cl, 16, 19);
2187 values->alpha_blend_src_factor = __gen_unpack_uint(cl, 12, 15);
2188 values->alpha_blend_mode = __gen_unpack_uint(cl, 8, 11);
2189 }
2190 #endif
2191
2192
2193 #define V3D33_BLEND_CONSTANT_COLOR_opcode 86
2194 #define V3D33_BLEND_CONSTANT_COLOR_header \
2195 .opcode = 86
2196
2197 struct V3D33_BLEND_CONSTANT_COLOR {
2198 uint32_t opcode;
2199 uint32_t alpha_f16;
2200 uint32_t blue_f16;
2201 uint32_t green_f16;
2202 uint32_t red_f16;
2203 };
2204
2205 static inline void
V3D33_BLEND_CONSTANT_COLOR_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_BLEND_CONSTANT_COLOR * restrict values)2206 V3D33_BLEND_CONSTANT_COLOR_pack(__gen_user_data *data, uint8_t * restrict cl,
2207 const struct V3D33_BLEND_CONSTANT_COLOR * restrict values)
2208 {
2209 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2210
2211 cl[ 1] = __gen_uint(values->red_f16, 0, 15);
2212
2213 cl[ 2] = __gen_uint(values->red_f16, 0, 15) >> 8;
2214
2215 cl[ 3] = __gen_uint(values->green_f16, 0, 15);
2216
2217 cl[ 4] = __gen_uint(values->green_f16, 0, 15) >> 8;
2218
2219 cl[ 5] = __gen_uint(values->blue_f16, 0, 15);
2220
2221 cl[ 6] = __gen_uint(values->blue_f16, 0, 15) >> 8;
2222
2223 cl[ 7] = __gen_uint(values->alpha_f16, 0, 15);
2224
2225 cl[ 8] = __gen_uint(values->alpha_f16, 0, 15) >> 8;
2226
2227 }
2228
2229 #define V3D33_BLEND_CONSTANT_COLOR_length 9
2230 #ifdef __gen_unpack_address
2231 static inline void
V3D33_BLEND_CONSTANT_COLOR_unpack(const uint8_t * restrict cl,struct V3D33_BLEND_CONSTANT_COLOR * restrict values)2232 V3D33_BLEND_CONSTANT_COLOR_unpack(const uint8_t * restrict cl,
2233 struct V3D33_BLEND_CONSTANT_COLOR * restrict values)
2234 {
2235 values->opcode = __gen_unpack_uint(cl, 0, 7);
2236 values->alpha_f16 = __gen_unpack_uint(cl, 56, 71);
2237 values->blue_f16 = __gen_unpack_uint(cl, 40, 55);
2238 values->green_f16 = __gen_unpack_uint(cl, 24, 39);
2239 values->red_f16 = __gen_unpack_uint(cl, 8, 23);
2240 }
2241 #endif
2242
2243
2244 #define V3D33_COLOR_WRITE_MASKS_opcode 87
2245 #define V3D33_COLOR_WRITE_MASKS_header \
2246 .opcode = 87
2247
2248 struct V3D33_COLOR_WRITE_MASKS {
2249 uint32_t opcode;
2250 uint32_t mask;
2251 };
2252
2253 static inline void
V3D33_COLOR_WRITE_MASKS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_COLOR_WRITE_MASKS * restrict values)2254 V3D33_COLOR_WRITE_MASKS_pack(__gen_user_data *data, uint8_t * restrict cl,
2255 const struct V3D33_COLOR_WRITE_MASKS * restrict values)
2256 {
2257 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2258
2259
2260 memcpy(&cl[1], &values->mask, sizeof(values->mask));
2261 }
2262
2263 #define V3D33_COLOR_WRITE_MASKS_length 5
2264 #ifdef __gen_unpack_address
2265 static inline void
V3D33_COLOR_WRITE_MASKS_unpack(const uint8_t * restrict cl,struct V3D33_COLOR_WRITE_MASKS * restrict values)2266 V3D33_COLOR_WRITE_MASKS_unpack(const uint8_t * restrict cl,
2267 struct V3D33_COLOR_WRITE_MASKS * restrict values)
2268 {
2269 values->opcode = __gen_unpack_uint(cl, 0, 7);
2270 values->mask = __gen_unpack_uint(cl, 8, 39);
2271 }
2272 #endif
2273
2274
2275 #define V3D33_OCCLUSION_QUERY_COUNTER_opcode 92
2276 #define V3D33_OCCLUSION_QUERY_COUNTER_header \
2277 .opcode = 92
2278
2279 struct V3D33_OCCLUSION_QUERY_COUNTER {
2280 uint32_t opcode;
2281 __gen_address_type address;
2282 };
2283
2284 static inline void
V3D33_OCCLUSION_QUERY_COUNTER_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_OCCLUSION_QUERY_COUNTER * restrict values)2285 V3D33_OCCLUSION_QUERY_COUNTER_pack(__gen_user_data *data, uint8_t * restrict cl,
2286 const struct V3D33_OCCLUSION_QUERY_COUNTER * restrict values)
2287 {
2288 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2289
2290 __gen_emit_reloc(data, &values->address);
2291 cl[ 1] = __gen_address_offset(&values->address);
2292
2293 cl[ 2] = __gen_address_offset(&values->address) >> 8;
2294
2295 cl[ 3] = __gen_address_offset(&values->address) >> 16;
2296
2297 cl[ 4] = __gen_address_offset(&values->address) >> 24;
2298
2299 }
2300
2301 #define V3D33_OCCLUSION_QUERY_COUNTER_length 5
2302 #ifdef __gen_unpack_address
2303 static inline void
V3D33_OCCLUSION_QUERY_COUNTER_unpack(const uint8_t * restrict cl,struct V3D33_OCCLUSION_QUERY_COUNTER * restrict values)2304 V3D33_OCCLUSION_QUERY_COUNTER_unpack(const uint8_t * restrict cl,
2305 struct V3D33_OCCLUSION_QUERY_COUNTER * restrict values)
2306 {
2307 values->opcode = __gen_unpack_uint(cl, 0, 7);
2308 values->address = __gen_unpack_address(cl, 8, 39);
2309 }
2310 #endif
2311
2312
2313 #define V3D33_CFG_BITS_opcode 96
2314 #define V3D33_CFG_BITS_header \
2315 .opcode = 96
2316
2317 struct V3D33_CFG_BITS {
2318 uint32_t opcode;
2319 bool direct3d_provoking_vertex;
2320 bool direct3d_point_fill_mode;
2321 bool blend_enable;
2322 bool stencil_enable;
2323 bool early_z_updates_enable;
2324 bool early_z_enable;
2325 bool z_updates_enable;
2326 enum V3D33_Compare_Function depth_test_function;
2327 bool direct3d_wireframe_triangles_mode;
2328 uint32_t rasterizer_oversample_mode;
2329 uint32_t line_rasterization;
2330 bool enable_depth_offset;
2331 bool clockwise_primitives;
2332 bool enable_reverse_facing_primitive;
2333 bool enable_forward_facing_primitive;
2334 };
2335
2336 static inline void
V3D33_CFG_BITS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_CFG_BITS * restrict values)2337 V3D33_CFG_BITS_pack(__gen_user_data *data, uint8_t * restrict cl,
2338 const struct V3D33_CFG_BITS * restrict values)
2339 {
2340 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2341
2342 cl[ 1] = __gen_uint(values->rasterizer_oversample_mode, 6, 7) |
2343 __gen_uint(values->line_rasterization, 4, 5) |
2344 __gen_uint(values->enable_depth_offset, 3, 3) |
2345 __gen_uint(values->clockwise_primitives, 2, 2) |
2346 __gen_uint(values->enable_reverse_facing_primitive, 1, 1) |
2347 __gen_uint(values->enable_forward_facing_primitive, 0, 0);
2348
2349 cl[ 2] = __gen_uint(values->z_updates_enable, 7, 7) |
2350 __gen_uint(values->depth_test_function, 4, 6) |
2351 __gen_uint(values->direct3d_wireframe_triangles_mode, 3, 3);
2352
2353 cl[ 3] = __gen_uint(values->direct3d_provoking_vertex, 5, 5) |
2354 __gen_uint(values->direct3d_point_fill_mode, 4, 4) |
2355 __gen_uint(values->blend_enable, 3, 3) |
2356 __gen_uint(values->stencil_enable, 2, 2) |
2357 __gen_uint(values->early_z_updates_enable, 1, 1) |
2358 __gen_uint(values->early_z_enable, 0, 0);
2359
2360 }
2361
2362 #define V3D33_CFG_BITS_length 4
2363 #ifdef __gen_unpack_address
2364 static inline void
V3D33_CFG_BITS_unpack(const uint8_t * restrict cl,struct V3D33_CFG_BITS * restrict values)2365 V3D33_CFG_BITS_unpack(const uint8_t * restrict cl,
2366 struct V3D33_CFG_BITS * restrict values)
2367 {
2368 values->opcode = __gen_unpack_uint(cl, 0, 7);
2369 values->direct3d_provoking_vertex = __gen_unpack_uint(cl, 29, 29);
2370 values->direct3d_point_fill_mode = __gen_unpack_uint(cl, 28, 28);
2371 values->blend_enable = __gen_unpack_uint(cl, 27, 27);
2372 values->stencil_enable = __gen_unpack_uint(cl, 26, 26);
2373 values->early_z_updates_enable = __gen_unpack_uint(cl, 25, 25);
2374 values->early_z_enable = __gen_unpack_uint(cl, 24, 24);
2375 values->z_updates_enable = __gen_unpack_uint(cl, 23, 23);
2376 values->depth_test_function = __gen_unpack_uint(cl, 20, 22);
2377 values->direct3d_wireframe_triangles_mode = __gen_unpack_uint(cl, 19, 19);
2378 values->rasterizer_oversample_mode = __gen_unpack_uint(cl, 14, 15);
2379 values->line_rasterization = __gen_unpack_uint(cl, 12, 13);
2380 values->enable_depth_offset = __gen_unpack_uint(cl, 11, 11);
2381 values->clockwise_primitives = __gen_unpack_uint(cl, 10, 10);
2382 values->enable_reverse_facing_primitive = __gen_unpack_uint(cl, 9, 9);
2383 values->enable_forward_facing_primitive = __gen_unpack_uint(cl, 8, 8);
2384 }
2385 #endif
2386
2387
2388 #define V3D33_ZERO_ALL_FLAT_SHADE_FLAGS_opcode 97
2389 #define V3D33_ZERO_ALL_FLAT_SHADE_FLAGS_header \
2390 .opcode = 97
2391
2392 struct V3D33_ZERO_ALL_FLAT_SHADE_FLAGS {
2393 uint32_t opcode;
2394 };
2395
2396 static inline void
V3D33_ZERO_ALL_FLAT_SHADE_FLAGS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_ZERO_ALL_FLAT_SHADE_FLAGS * restrict values)2397 V3D33_ZERO_ALL_FLAT_SHADE_FLAGS_pack(__gen_user_data *data, uint8_t * restrict cl,
2398 const struct V3D33_ZERO_ALL_FLAT_SHADE_FLAGS * restrict values)
2399 {
2400 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2401
2402 }
2403
2404 #define V3D33_ZERO_ALL_FLAT_SHADE_FLAGS_length 1
2405 #ifdef __gen_unpack_address
2406 static inline void
V3D33_ZERO_ALL_FLAT_SHADE_FLAGS_unpack(const uint8_t * restrict cl,struct V3D33_ZERO_ALL_FLAT_SHADE_FLAGS * restrict values)2407 V3D33_ZERO_ALL_FLAT_SHADE_FLAGS_unpack(const uint8_t * restrict cl,
2408 struct V3D33_ZERO_ALL_FLAT_SHADE_FLAGS * restrict values)
2409 {
2410 values->opcode = __gen_unpack_uint(cl, 0, 7);
2411 }
2412 #endif
2413
2414
2415 #define V3D33_FLAT_SHADE_FLAGS_opcode 98
2416 #define V3D33_FLAT_SHADE_FLAGS_header \
2417 .opcode = 98
2418
2419 struct V3D33_FLAT_SHADE_FLAGS {
2420 uint32_t opcode;
2421 uint32_t flat_shade_flags_for_varyings_v024;
2422 enum V3D33_Varying_Flags_Action action_for_flat_shade_flags_of_higher_numbered_varyings;
2423 enum V3D33_Varying_Flags_Action action_for_flat_shade_flags_of_lower_numbered_varyings;
2424 uint32_t varying_offset_v0;
2425 };
2426
2427 static inline void
V3D33_FLAT_SHADE_FLAGS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_FLAT_SHADE_FLAGS * restrict values)2428 V3D33_FLAT_SHADE_FLAGS_pack(__gen_user_data *data, uint8_t * restrict cl,
2429 const struct V3D33_FLAT_SHADE_FLAGS * restrict values)
2430 {
2431 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2432
2433 cl[ 1] = __gen_uint(values->action_for_flat_shade_flags_of_higher_numbered_varyings, 6, 7) |
2434 __gen_uint(values->action_for_flat_shade_flags_of_lower_numbered_varyings, 4, 5) |
2435 __gen_uint(values->varying_offset_v0, 0, 3);
2436
2437 cl[ 2] = __gen_uint(values->flat_shade_flags_for_varyings_v024, 0, 23);
2438
2439 cl[ 3] = __gen_uint(values->flat_shade_flags_for_varyings_v024, 0, 23) >> 8;
2440
2441 cl[ 4] = __gen_uint(values->flat_shade_flags_for_varyings_v024, 0, 23) >> 16;
2442
2443 }
2444
2445 #define V3D33_FLAT_SHADE_FLAGS_length 5
2446 #ifdef __gen_unpack_address
2447 static inline void
V3D33_FLAT_SHADE_FLAGS_unpack(const uint8_t * restrict cl,struct V3D33_FLAT_SHADE_FLAGS * restrict values)2448 V3D33_FLAT_SHADE_FLAGS_unpack(const uint8_t * restrict cl,
2449 struct V3D33_FLAT_SHADE_FLAGS * restrict values)
2450 {
2451 values->opcode = __gen_unpack_uint(cl, 0, 7);
2452 values->flat_shade_flags_for_varyings_v024 = __gen_unpack_uint(cl, 16, 39);
2453 values->action_for_flat_shade_flags_of_higher_numbered_varyings = __gen_unpack_uint(cl, 14, 15);
2454 values->action_for_flat_shade_flags_of_lower_numbered_varyings = __gen_unpack_uint(cl, 12, 13);
2455 values->varying_offset_v0 = __gen_unpack_uint(cl, 8, 11);
2456 }
2457 #endif
2458
2459
2460 #define V3D33_POINT_SIZE_opcode 104
2461 #define V3D33_POINT_SIZE_header \
2462 .opcode = 104
2463
2464 struct V3D33_POINT_SIZE {
2465 uint32_t opcode;
2466 float point_size;
2467 };
2468
2469 static inline void
V3D33_POINT_SIZE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_POINT_SIZE * restrict values)2470 V3D33_POINT_SIZE_pack(__gen_user_data *data, uint8_t * restrict cl,
2471 const struct V3D33_POINT_SIZE * restrict values)
2472 {
2473 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2474
2475
2476 memcpy(&cl[1], &values->point_size, sizeof(values->point_size));
2477 }
2478
2479 #define V3D33_POINT_SIZE_length 5
2480 #ifdef __gen_unpack_address
2481 static inline void
V3D33_POINT_SIZE_unpack(const uint8_t * restrict cl,struct V3D33_POINT_SIZE * restrict values)2482 V3D33_POINT_SIZE_unpack(const uint8_t * restrict cl,
2483 struct V3D33_POINT_SIZE * restrict values)
2484 {
2485 values->opcode = __gen_unpack_uint(cl, 0, 7);
2486 values->point_size = __gen_unpack_float(cl, 8, 39);
2487 }
2488 #endif
2489
2490
2491 #define V3D33_LINE_WIDTH_opcode 105
2492 #define V3D33_LINE_WIDTH_header \
2493 .opcode = 105
2494
2495 struct V3D33_LINE_WIDTH {
2496 uint32_t opcode;
2497 float line_width;
2498 };
2499
2500 static inline void
V3D33_LINE_WIDTH_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_LINE_WIDTH * restrict values)2501 V3D33_LINE_WIDTH_pack(__gen_user_data *data, uint8_t * restrict cl,
2502 const struct V3D33_LINE_WIDTH * restrict values)
2503 {
2504 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2505
2506
2507 memcpy(&cl[1], &values->line_width, sizeof(values->line_width));
2508 }
2509
2510 #define V3D33_LINE_WIDTH_length 5
2511 #ifdef __gen_unpack_address
2512 static inline void
V3D33_LINE_WIDTH_unpack(const uint8_t * restrict cl,struct V3D33_LINE_WIDTH * restrict values)2513 V3D33_LINE_WIDTH_unpack(const uint8_t * restrict cl,
2514 struct V3D33_LINE_WIDTH * restrict values)
2515 {
2516 values->opcode = __gen_unpack_uint(cl, 0, 7);
2517 values->line_width = __gen_unpack_float(cl, 8, 39);
2518 }
2519 #endif
2520
2521
2522 #define V3D33_DEPTH_OFFSET_opcode 106
2523 #define V3D33_DEPTH_OFFSET_header \
2524 .opcode = 106
2525
2526 struct V3D33_DEPTH_OFFSET {
2527 uint32_t opcode;
2528 float depth_offset_units;
2529 float depth_offset_factor;
2530 };
2531
2532 static inline void
V3D33_DEPTH_OFFSET_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_DEPTH_OFFSET * restrict values)2533 V3D33_DEPTH_OFFSET_pack(__gen_user_data *data, uint8_t * restrict cl,
2534 const struct V3D33_DEPTH_OFFSET * restrict values)
2535 {
2536 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2537
2538 cl[ 1] = __gen_uint(fui(values->depth_offset_factor) >> 16, 0, 15);
2539
2540 cl[ 2] = __gen_uint(fui(values->depth_offset_factor) >> 16, 0, 15) >> 8;
2541
2542 cl[ 3] = __gen_uint(fui(values->depth_offset_units) >> 16, 0, 15);
2543
2544 cl[ 4] = __gen_uint(fui(values->depth_offset_units) >> 16, 0, 15) >> 8;
2545
2546 }
2547
2548 #define V3D33_DEPTH_OFFSET_length 5
2549 #ifdef __gen_unpack_address
2550 static inline void
V3D33_DEPTH_OFFSET_unpack(const uint8_t * restrict cl,struct V3D33_DEPTH_OFFSET * restrict values)2551 V3D33_DEPTH_OFFSET_unpack(const uint8_t * restrict cl,
2552 struct V3D33_DEPTH_OFFSET * restrict values)
2553 {
2554 values->opcode = __gen_unpack_uint(cl, 0, 7);
2555 values->depth_offset_units = __gen_unpack_f187(cl, 24, 39);
2556 values->depth_offset_factor = __gen_unpack_f187(cl, 8, 23);
2557 }
2558 #endif
2559
2560
2561 #define V3D33_CLIP_WINDOW_opcode 107
2562 #define V3D33_CLIP_WINDOW_header \
2563 .opcode = 107
2564
2565 struct V3D33_CLIP_WINDOW {
2566 uint32_t opcode;
2567 uint32_t clip_window_height_in_pixels;
2568 uint32_t clip_window_width_in_pixels;
2569 uint32_t clip_window_bottom_pixel_coordinate;
2570 uint32_t clip_window_left_pixel_coordinate;
2571 };
2572
2573 static inline void
V3D33_CLIP_WINDOW_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_CLIP_WINDOW * restrict values)2574 V3D33_CLIP_WINDOW_pack(__gen_user_data *data, uint8_t * restrict cl,
2575 const struct V3D33_CLIP_WINDOW * restrict values)
2576 {
2577 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2578
2579 cl[ 1] = __gen_uint(values->clip_window_left_pixel_coordinate, 0, 15);
2580
2581 cl[ 2] = __gen_uint(values->clip_window_left_pixel_coordinate, 0, 15) >> 8;
2582
2583 cl[ 3] = __gen_uint(values->clip_window_bottom_pixel_coordinate, 0, 15);
2584
2585 cl[ 4] = __gen_uint(values->clip_window_bottom_pixel_coordinate, 0, 15) >> 8;
2586
2587 cl[ 5] = __gen_uint(values->clip_window_width_in_pixels, 0, 15);
2588
2589 cl[ 6] = __gen_uint(values->clip_window_width_in_pixels, 0, 15) >> 8;
2590
2591 cl[ 7] = __gen_uint(values->clip_window_height_in_pixels, 0, 15);
2592
2593 cl[ 8] = __gen_uint(values->clip_window_height_in_pixels, 0, 15) >> 8;
2594
2595 }
2596
2597 #define V3D33_CLIP_WINDOW_length 9
2598 #ifdef __gen_unpack_address
2599 static inline void
V3D33_CLIP_WINDOW_unpack(const uint8_t * restrict cl,struct V3D33_CLIP_WINDOW * restrict values)2600 V3D33_CLIP_WINDOW_unpack(const uint8_t * restrict cl,
2601 struct V3D33_CLIP_WINDOW * restrict values)
2602 {
2603 values->opcode = __gen_unpack_uint(cl, 0, 7);
2604 values->clip_window_height_in_pixels = __gen_unpack_uint(cl, 56, 71);
2605 values->clip_window_width_in_pixels = __gen_unpack_uint(cl, 40, 55);
2606 values->clip_window_bottom_pixel_coordinate = __gen_unpack_uint(cl, 24, 39);
2607 values->clip_window_left_pixel_coordinate = __gen_unpack_uint(cl, 8, 23);
2608 }
2609 #endif
2610
2611
2612 #define V3D33_VIEWPORT_OFFSET_opcode 108
2613 #define V3D33_VIEWPORT_OFFSET_header \
2614 .opcode = 108
2615
2616 struct V3D33_VIEWPORT_OFFSET {
2617 uint32_t opcode;
2618 float viewport_centre_y_coordinate;
2619 float viewport_centre_x_coordinate;
2620 };
2621
2622 static inline void
V3D33_VIEWPORT_OFFSET_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_VIEWPORT_OFFSET * restrict values)2623 V3D33_VIEWPORT_OFFSET_pack(__gen_user_data *data, uint8_t * restrict cl,
2624 const struct V3D33_VIEWPORT_OFFSET * restrict values)
2625 {
2626 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2627
2628 cl[ 1] = __gen_sfixed(values->viewport_centre_x_coordinate, 0, 31, 8);
2629
2630 cl[ 2] = __gen_sfixed(values->viewport_centre_x_coordinate, 0, 31, 8) >> 8;
2631
2632 cl[ 3] = __gen_sfixed(values->viewport_centre_x_coordinate, 0, 31, 8) >> 16;
2633
2634 cl[ 4] = __gen_sfixed(values->viewport_centre_x_coordinate, 0, 31, 8) >> 24;
2635
2636 cl[ 5] = __gen_sfixed(values->viewport_centre_y_coordinate, 0, 31, 8);
2637
2638 cl[ 6] = __gen_sfixed(values->viewport_centre_y_coordinate, 0, 31, 8) >> 8;
2639
2640 cl[ 7] = __gen_sfixed(values->viewport_centre_y_coordinate, 0, 31, 8) >> 16;
2641
2642 cl[ 8] = __gen_sfixed(values->viewport_centre_y_coordinate, 0, 31, 8) >> 24;
2643
2644 }
2645
2646 #define V3D33_VIEWPORT_OFFSET_length 9
2647 #ifdef __gen_unpack_address
2648 static inline void
V3D33_VIEWPORT_OFFSET_unpack(const uint8_t * restrict cl,struct V3D33_VIEWPORT_OFFSET * restrict values)2649 V3D33_VIEWPORT_OFFSET_unpack(const uint8_t * restrict cl,
2650 struct V3D33_VIEWPORT_OFFSET * restrict values)
2651 {
2652 values->opcode = __gen_unpack_uint(cl, 0, 7);
2653 values->viewport_centre_y_coordinate = __gen_unpack_sfixed(cl, 40, 71, 8);
2654 values->viewport_centre_x_coordinate = __gen_unpack_sfixed(cl, 8, 39, 8);
2655 }
2656 #endif
2657
2658
2659 #define V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES_opcode 109
2660 #define V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES_header\
2661 .opcode = 109
2662
2663 struct V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES {
2664 uint32_t opcode;
2665 float maximum_zw;
2666 float minimum_zw;
2667 };
2668
2669 static inline void
V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES * restrict values)2670 V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES_pack(__gen_user_data *data, uint8_t * restrict cl,
2671 const struct V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES * restrict values)
2672 {
2673 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2674
2675
2676 memcpy(&cl[1], &values->minimum_zw, sizeof(values->minimum_zw));
2677
2678 memcpy(&cl[5], &values->maximum_zw, sizeof(values->maximum_zw));
2679 }
2680
2681 #define V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES_length 9
2682 #ifdef __gen_unpack_address
2683 static inline void
V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES_unpack(const uint8_t * restrict cl,struct V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES * restrict values)2684 V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES_unpack(const uint8_t * restrict cl,
2685 struct V3D33_CLIPPER_Z_MIN_MAX_CLIPPING_PLANES * restrict values)
2686 {
2687 values->opcode = __gen_unpack_uint(cl, 0, 7);
2688 values->maximum_zw = __gen_unpack_float(cl, 40, 71);
2689 values->minimum_zw = __gen_unpack_float(cl, 8, 39);
2690 }
2691 #endif
2692
2693
2694 #define V3D33_CLIPPER_XY_SCALING_opcode 110
2695 #define V3D33_CLIPPER_XY_SCALING_header \
2696 .opcode = 110
2697
2698 struct V3D33_CLIPPER_XY_SCALING {
2699 uint32_t opcode;
2700 float viewport_half_height_in_1_256th_of_pixel;
2701 float viewport_half_width_in_1_256th_of_pixel;
2702 };
2703
2704 static inline void
V3D33_CLIPPER_XY_SCALING_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_CLIPPER_XY_SCALING * restrict values)2705 V3D33_CLIPPER_XY_SCALING_pack(__gen_user_data *data, uint8_t * restrict cl,
2706 const struct V3D33_CLIPPER_XY_SCALING * restrict values)
2707 {
2708 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2709
2710
2711 memcpy(&cl[1], &values->viewport_half_width_in_1_256th_of_pixel, sizeof(values->viewport_half_width_in_1_256th_of_pixel));
2712
2713 memcpy(&cl[5], &values->viewport_half_height_in_1_256th_of_pixel, sizeof(values->viewport_half_height_in_1_256th_of_pixel));
2714 }
2715
2716 #define V3D33_CLIPPER_XY_SCALING_length 9
2717 #ifdef __gen_unpack_address
2718 static inline void
V3D33_CLIPPER_XY_SCALING_unpack(const uint8_t * restrict cl,struct V3D33_CLIPPER_XY_SCALING * restrict values)2719 V3D33_CLIPPER_XY_SCALING_unpack(const uint8_t * restrict cl,
2720 struct V3D33_CLIPPER_XY_SCALING * restrict values)
2721 {
2722 values->opcode = __gen_unpack_uint(cl, 0, 7);
2723 values->viewport_half_height_in_1_256th_of_pixel = __gen_unpack_float(cl, 40, 71);
2724 values->viewport_half_width_in_1_256th_of_pixel = __gen_unpack_float(cl, 8, 39);
2725 }
2726 #endif
2727
2728
2729 #define V3D33_CLIPPER_Z_SCALE_AND_OFFSET_opcode 111
2730 #define V3D33_CLIPPER_Z_SCALE_AND_OFFSET_header \
2731 .opcode = 111
2732
2733 struct V3D33_CLIPPER_Z_SCALE_AND_OFFSET {
2734 uint32_t opcode;
2735 float viewport_z_offset_zc_to_zs;
2736 float viewport_z_scale_zc_to_zs;
2737 };
2738
2739 static inline void
V3D33_CLIPPER_Z_SCALE_AND_OFFSET_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_CLIPPER_Z_SCALE_AND_OFFSET * restrict values)2740 V3D33_CLIPPER_Z_SCALE_AND_OFFSET_pack(__gen_user_data *data, uint8_t * restrict cl,
2741 const struct V3D33_CLIPPER_Z_SCALE_AND_OFFSET * restrict values)
2742 {
2743 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2744
2745
2746 memcpy(&cl[1], &values->viewport_z_scale_zc_to_zs, sizeof(values->viewport_z_scale_zc_to_zs));
2747
2748 memcpy(&cl[5], &values->viewport_z_offset_zc_to_zs, sizeof(values->viewport_z_offset_zc_to_zs));
2749 }
2750
2751 #define V3D33_CLIPPER_Z_SCALE_AND_OFFSET_length 9
2752 #ifdef __gen_unpack_address
2753 static inline void
V3D33_CLIPPER_Z_SCALE_AND_OFFSET_unpack(const uint8_t * restrict cl,struct V3D33_CLIPPER_Z_SCALE_AND_OFFSET * restrict values)2754 V3D33_CLIPPER_Z_SCALE_AND_OFFSET_unpack(const uint8_t * restrict cl,
2755 struct V3D33_CLIPPER_Z_SCALE_AND_OFFSET * restrict values)
2756 {
2757 values->opcode = __gen_unpack_uint(cl, 0, 7);
2758 values->viewport_z_offset_zc_to_zs = __gen_unpack_float(cl, 40, 71);
2759 values->viewport_z_scale_zc_to_zs = __gen_unpack_float(cl, 8, 39);
2760 }
2761 #endif
2762
2763
2764 #define V3D33_TILE_BINNING_MODE_CFG_PART1_opcode 120
2765 #define V3D33_TILE_BINNING_MODE_CFG_PART1_header\
2766 .opcode = 120, \
2767 .auto_initialize_tile_state_data_array = 1, \
2768 .sub_id = 0
2769
2770 struct V3D33_TILE_BINNING_MODE_CFG_PART1 {
2771 uint32_t opcode;
2772 bool double_buffer_in_non_ms_mode;
2773 bool multisample_mode_4x;
2774 enum V3D33_Internal_BPP maximum_bpp_of_all_render_targets;
2775 uint32_t number_of_render_targets;
2776 uint32_t height_in_tiles;
2777 uint32_t width_in_tiles;
2778 __gen_address_type tile_state_data_array_base_address;
2779 uint32_t tile_allocation_block_size;
2780 #define TILE_ALLOCATION_BLOCK_SIZE_64B 0
2781 #define TILE_ALLOCATION_BLOCK_SIZE_128B 1
2782 #define TILE_ALLOCATION_BLOCK_SIZE_256B 2
2783 uint32_t tile_allocation_initial_block_size;
2784 #define TILE_ALLOCATION_INITIAL_BLOCK_SIZE_64B 0
2785 #define TILE_ALLOCATION_INITIAL_BLOCK_SIZE_128B 1
2786 #define TILE_ALLOCATION_INITIAL_BLOCK_SIZE_256B 2
2787 bool auto_initialize_tile_state_data_array;
2788 uint32_t sub_id;
2789 };
2790
2791 static inline void
V3D33_TILE_BINNING_MODE_CFG_PART1_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_BINNING_MODE_CFG_PART1 * restrict values)2792 V3D33_TILE_BINNING_MODE_CFG_PART1_pack(__gen_user_data *data, uint8_t * restrict cl,
2793 const struct V3D33_TILE_BINNING_MODE_CFG_PART1 * restrict values)
2794 {
2795 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2796
2797 __gen_emit_reloc(data, &values->tile_state_data_array_base_address);
2798 cl[ 1] = __gen_address_offset(&values->tile_state_data_array_base_address) |
2799 __gen_uint(values->tile_allocation_block_size, 4, 5) |
2800 __gen_uint(values->tile_allocation_initial_block_size, 2, 3) |
2801 __gen_uint(values->auto_initialize_tile_state_data_array, 1, 1) |
2802 __gen_uint(values->sub_id, 0, 0);
2803
2804 cl[ 2] = __gen_address_offset(&values->tile_state_data_array_base_address) >> 8;
2805
2806 cl[ 3] = __gen_address_offset(&values->tile_state_data_array_base_address) >> 16;
2807
2808 cl[ 4] = __gen_address_offset(&values->tile_state_data_array_base_address) >> 24;
2809
2810 cl[ 5] = __gen_uint(values->width_in_tiles, 0, 11);
2811
2812 cl[ 6] = __gen_uint(values->height_in_tiles, 4, 15) |
2813 __gen_uint(values->width_in_tiles, 0, 11) >> 8;
2814
2815 cl[ 7] = __gen_uint(values->height_in_tiles, 4, 15) >> 8;
2816
2817 cl[ 8] = __gen_uint(values->double_buffer_in_non_ms_mode, 7, 7) |
2818 __gen_uint(values->multisample_mode_4x, 6, 6) |
2819 __gen_uint(values->maximum_bpp_of_all_render_targets, 4, 5) |
2820 __gen_uint(values->number_of_render_targets, 0, 3);
2821
2822 }
2823
2824 #define V3D33_TILE_BINNING_MODE_CFG_PART1_length 9
2825 #ifdef __gen_unpack_address
2826 static inline void
V3D33_TILE_BINNING_MODE_CFG_PART1_unpack(const uint8_t * restrict cl,struct V3D33_TILE_BINNING_MODE_CFG_PART1 * restrict values)2827 V3D33_TILE_BINNING_MODE_CFG_PART1_unpack(const uint8_t * restrict cl,
2828 struct V3D33_TILE_BINNING_MODE_CFG_PART1 * restrict values)
2829 {
2830 values->opcode = __gen_unpack_uint(cl, 0, 7);
2831 values->double_buffer_in_non_ms_mode = __gen_unpack_uint(cl, 71, 71);
2832 values->multisample_mode_4x = __gen_unpack_uint(cl, 70, 70);
2833 values->maximum_bpp_of_all_render_targets = __gen_unpack_uint(cl, 68, 69);
2834 values->number_of_render_targets = __gen_unpack_uint(cl, 64, 67);
2835 values->height_in_tiles = __gen_unpack_uint(cl, 52, 63);
2836 values->width_in_tiles = __gen_unpack_uint(cl, 40, 51);
2837 values->tile_state_data_array_base_address = __gen_unpack_address(cl, 14, 39);
2838 values->tile_allocation_block_size = __gen_unpack_uint(cl, 12, 13);
2839 values->tile_allocation_initial_block_size = __gen_unpack_uint(cl, 10, 11);
2840 values->auto_initialize_tile_state_data_array = __gen_unpack_uint(cl, 9, 9);
2841 values->sub_id = __gen_unpack_uint(cl, 8, 8);
2842 }
2843 #endif
2844
2845
2846 #define V3D33_TILE_BINNING_MODE_CFG_PART2_opcode 120
2847 #define V3D33_TILE_BINNING_MODE_CFG_PART2_header\
2848 .opcode = 120, \
2849 .sub_id = 1
2850
2851 struct V3D33_TILE_BINNING_MODE_CFG_PART2 {
2852 uint32_t opcode;
2853 __gen_address_type tile_allocation_memory_address;
2854 uint32_t tile_allocation_memory_size;
2855 uint32_t sub_id;
2856 };
2857
2858 static inline void
V3D33_TILE_BINNING_MODE_CFG_PART2_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_BINNING_MODE_CFG_PART2 * restrict values)2859 V3D33_TILE_BINNING_MODE_CFG_PART2_pack(__gen_user_data *data, uint8_t * restrict cl,
2860 const struct V3D33_TILE_BINNING_MODE_CFG_PART2 * restrict values)
2861 {
2862 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2863
2864 cl[ 1] = __gen_uint(values->tile_allocation_memory_size, 0, 31) |
2865 __gen_uint(values->sub_id, 0, 0);
2866
2867 cl[ 2] = __gen_uint(values->tile_allocation_memory_size, 0, 31) >> 8;
2868
2869 cl[ 3] = __gen_uint(values->tile_allocation_memory_size, 0, 31) >> 16;
2870
2871 cl[ 4] = __gen_uint(values->tile_allocation_memory_size, 0, 31) >> 24;
2872
2873 __gen_emit_reloc(data, &values->tile_allocation_memory_address);
2874 cl[ 5] = __gen_address_offset(&values->tile_allocation_memory_address);
2875
2876 cl[ 6] = __gen_address_offset(&values->tile_allocation_memory_address) >> 8;
2877
2878 cl[ 7] = __gen_address_offset(&values->tile_allocation_memory_address) >> 16;
2879
2880 cl[ 8] = __gen_address_offset(&values->tile_allocation_memory_address) >> 24;
2881
2882 }
2883
2884 #define V3D33_TILE_BINNING_MODE_CFG_PART2_length 9
2885 #ifdef __gen_unpack_address
2886 static inline void
V3D33_TILE_BINNING_MODE_CFG_PART2_unpack(const uint8_t * restrict cl,struct V3D33_TILE_BINNING_MODE_CFG_PART2 * restrict values)2887 V3D33_TILE_BINNING_MODE_CFG_PART2_unpack(const uint8_t * restrict cl,
2888 struct V3D33_TILE_BINNING_MODE_CFG_PART2 * restrict values)
2889 {
2890 values->opcode = __gen_unpack_uint(cl, 0, 7);
2891 values->tile_allocation_memory_address = __gen_unpack_address(cl, 40, 71);
2892 values->tile_allocation_memory_size = __gen_unpack_uint(cl, 8, 39);
2893 values->sub_id = __gen_unpack_uint(cl, 8, 8);
2894 }
2895 #endif
2896
2897
2898 #define V3D33_TILE_RENDERING_MODE_CFG_COMMON_opcode 121
2899 #define V3D33_TILE_RENDERING_MODE_CFG_COMMON_header\
2900 .opcode = 121, \
2901 .sub_id = 0
2902
2903 struct V3D33_TILE_RENDERING_MODE_CFG_COMMON {
2904 uint32_t opcode;
2905 uint32_t disable_render_target_stores;
2906 bool enable_z_store;
2907 bool enable_stencil_store;
2908 bool early_z_disable;
2909 uint32_t early_z_test_and_update_direction;
2910 #define EARLY_Z_DIRECTION_LT_LE 0
2911 #define EARLY_Z_DIRECTION_GT_GE 1
2912 bool double_buffer_in_non_ms_mode;
2913 bool multisample_mode_4x;
2914 uint32_t maximum_bpp_of_all_render_targets;
2915 #define RENDER_TARGET_MAXIMUM_32BPP 0
2916 #define RENDER_TARGET_MAXIMUM_64BPP 1
2917 #define RENDER_TARGET_MAXIMUM_128BPP 2
2918 uint32_t image_height_pixels;
2919 uint32_t image_width_pixels;
2920 uint32_t number_of_render_targets;
2921 uint32_t sub_id;
2922 };
2923
2924 static inline void
V3D33_TILE_RENDERING_MODE_CFG_COMMON_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_RENDERING_MODE_CFG_COMMON * restrict values)2925 V3D33_TILE_RENDERING_MODE_CFG_COMMON_pack(__gen_user_data *data, uint8_t * restrict cl,
2926 const struct V3D33_TILE_RENDERING_MODE_CFG_COMMON * restrict values)
2927 {
2928 assert(values->number_of_render_targets >= 1);
2929 cl[ 0] = __gen_uint(values->opcode, 0, 7);
2930
2931 cl[ 1] = __gen_uint(values->number_of_render_targets - 1, 4, 7) |
2932 __gen_uint(values->sub_id, 0, 3);
2933
2934 cl[ 2] = __gen_uint(values->image_width_pixels, 0, 15);
2935
2936 cl[ 3] = __gen_uint(values->image_width_pixels, 0, 15) >> 8;
2937
2938 cl[ 4] = __gen_uint(values->image_height_pixels, 0, 15);
2939
2940 cl[ 5] = __gen_uint(values->image_height_pixels, 0, 15) >> 8;
2941
2942 cl[ 6] = __gen_uint(values->early_z_disable, 6, 6) |
2943 __gen_uint(values->early_z_test_and_update_direction, 5, 5) |
2944 __gen_uint(values->double_buffer_in_non_ms_mode, 3, 3) |
2945 __gen_uint(values->multisample_mode_4x, 2, 2) |
2946 __gen_uint(values->maximum_bpp_of_all_render_targets, 0, 1);
2947
2948 cl[ 7] = __gen_uint(values->enable_z_store, 7, 7) |
2949 __gen_uint(values->enable_stencil_store, 6, 6);
2950
2951 cl[ 8] = __gen_uint(values->disable_render_target_stores, 0, 7);
2952
2953 }
2954
2955 #define V3D33_TILE_RENDERING_MODE_CFG_COMMON_length 9
2956 #ifdef __gen_unpack_address
2957 static inline void
V3D33_TILE_RENDERING_MODE_CFG_COMMON_unpack(const uint8_t * restrict cl,struct V3D33_TILE_RENDERING_MODE_CFG_COMMON * restrict values)2958 V3D33_TILE_RENDERING_MODE_CFG_COMMON_unpack(const uint8_t * restrict cl,
2959 struct V3D33_TILE_RENDERING_MODE_CFG_COMMON * restrict values)
2960 {
2961 values->opcode = __gen_unpack_uint(cl, 0, 7);
2962 values->disable_render_target_stores = __gen_unpack_uint(cl, 64, 71);
2963 values->enable_z_store = __gen_unpack_uint(cl, 63, 63);
2964 values->enable_stencil_store = __gen_unpack_uint(cl, 62, 62);
2965 values->early_z_disable = __gen_unpack_uint(cl, 54, 54);
2966 values->early_z_test_and_update_direction = __gen_unpack_uint(cl, 53, 53);
2967 values->double_buffer_in_non_ms_mode = __gen_unpack_uint(cl, 51, 51);
2968 values->multisample_mode_4x = __gen_unpack_uint(cl, 50, 50);
2969 values->maximum_bpp_of_all_render_targets = __gen_unpack_uint(cl, 48, 49);
2970 values->image_height_pixels = __gen_unpack_uint(cl, 32, 47);
2971 values->image_width_pixels = __gen_unpack_uint(cl, 16, 31);
2972 values->number_of_render_targets = __gen_unpack_uint(cl, 12, 15) + 1;
2973 values->sub_id = __gen_unpack_uint(cl, 8, 11);
2974 }
2975 #endif
2976
2977
2978 #define V3D33_TILE_RENDERING_MODE_CFG_COLOR_opcode 121
2979 #define V3D33_TILE_RENDERING_MODE_CFG_COLOR_header\
2980 .opcode = 121, \
2981 .sub_id = 2
2982
2983 struct V3D33_TILE_RENDERING_MODE_CFG_COLOR {
2984 uint32_t opcode;
2985 __gen_address_type address;
2986 uint32_t pad;
2987 bool flip_y;
2988 enum V3D33_Memory_Format memory_format;
2989 enum V3D33_Dither_Mode dither_mode;
2990 enum V3D33_Output_Image_Format output_image_format;
2991 enum V3D33_Decimate_Mode decimate_mode;
2992 enum V3D33_Internal_Type internal_type;
2993 enum V3D33_Internal_BPP internal_bpp;
2994 uint32_t render_target_number;
2995 uint32_t sub_id;
2996 };
2997
2998 static inline void
V3D33_TILE_RENDERING_MODE_CFG_COLOR_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_RENDERING_MODE_CFG_COLOR * restrict values)2999 V3D33_TILE_RENDERING_MODE_CFG_COLOR_pack(__gen_user_data *data, uint8_t * restrict cl,
3000 const struct V3D33_TILE_RENDERING_MODE_CFG_COLOR * restrict values)
3001 {
3002 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3003
3004 cl[ 1] = __gen_uint(values->render_target_number, 4, 7) |
3005 __gen_uint(values->sub_id, 0, 3);
3006
3007 cl[ 2] = __gen_uint(values->decimate_mode, 6, 7) |
3008 __gen_uint(values->internal_type, 2, 5) |
3009 __gen_uint(values->internal_bpp, 0, 1);
3010
3011 cl[ 3] = __gen_uint(values->dither_mode, 6, 7) |
3012 __gen_uint(values->output_image_format, 0, 5);
3013
3014 cl[ 4] = __gen_uint(values->pad, 4, 7) |
3015 __gen_uint(values->flip_y, 3, 3) |
3016 __gen_uint(values->memory_format, 0, 2);
3017
3018 __gen_emit_reloc(data, &values->address);
3019 cl[ 5] = __gen_address_offset(&values->address);
3020
3021 cl[ 6] = __gen_address_offset(&values->address) >> 8;
3022
3023 cl[ 7] = __gen_address_offset(&values->address) >> 16;
3024
3025 cl[ 8] = __gen_address_offset(&values->address) >> 24;
3026
3027 }
3028
3029 #define V3D33_TILE_RENDERING_MODE_CFG_COLOR_length 9
3030 #ifdef __gen_unpack_address
3031 static inline void
V3D33_TILE_RENDERING_MODE_CFG_COLOR_unpack(const uint8_t * restrict cl,struct V3D33_TILE_RENDERING_MODE_CFG_COLOR * restrict values)3032 V3D33_TILE_RENDERING_MODE_CFG_COLOR_unpack(const uint8_t * restrict cl,
3033 struct V3D33_TILE_RENDERING_MODE_CFG_COLOR * restrict values)
3034 {
3035 values->opcode = __gen_unpack_uint(cl, 0, 7);
3036 values->address = __gen_unpack_address(cl, 40, 71);
3037 values->pad = __gen_unpack_uint(cl, 36, 39);
3038 values->flip_y = __gen_unpack_uint(cl, 35, 35);
3039 values->memory_format = __gen_unpack_uint(cl, 32, 34);
3040 values->dither_mode = __gen_unpack_uint(cl, 30, 31);
3041 values->output_image_format = __gen_unpack_uint(cl, 24, 29);
3042 values->decimate_mode = __gen_unpack_uint(cl, 22, 23);
3043 values->internal_type = __gen_unpack_uint(cl, 18, 21);
3044 values->internal_bpp = __gen_unpack_uint(cl, 16, 17);
3045 values->render_target_number = __gen_unpack_uint(cl, 12, 15);
3046 values->sub_id = __gen_unpack_uint(cl, 8, 11);
3047 }
3048 #endif
3049
3050
3051 #define V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL_opcode 121
3052 #define V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL_header\
3053 .opcode = 121, \
3054 .z_stencil_id = 0, \
3055 .sub_id = 1
3056
3057 struct V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL {
3058 uint32_t opcode;
3059 __gen_address_type address;
3060 uint32_t padded_height_of_output_image_in_uif_blocks;
3061 enum V3D33_Memory_Format memory_format;
3062 enum V3D33_Z_S_Output_Image_Format output_image_format;
3063 uint32_t decimate_mode;
3064 enum V3D33_Internal_Depth_Type internal_type;
3065 uint32_t internal_bpp_ignored;
3066 uint32_t z_stencil_id;
3067 uint32_t sub_id;
3068 };
3069
3070 static inline void
V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL * restrict values)3071 V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL_pack(__gen_user_data *data, uint8_t * restrict cl,
3072 const struct V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL * restrict values)
3073 {
3074 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3075
3076 cl[ 1] = __gen_uint(values->z_stencil_id, 4, 7) |
3077 __gen_uint(values->sub_id, 0, 3);
3078
3079 cl[ 2] = __gen_uint(values->decimate_mode, 6, 7) |
3080 __gen_uint(values->internal_type, 2, 5) |
3081 __gen_uint(values->internal_bpp_ignored, 0, 1);
3082
3083 cl[ 3] = __gen_uint(values->memory_format, 6, 8) |
3084 __gen_uint(values->output_image_format, 0, 5);
3085
3086 cl[ 4] = __gen_uint(values->padded_height_of_output_image_in_uif_blocks, 1, 13) |
3087 __gen_uint(values->memory_format, 6, 8) >> 8;
3088
3089 __gen_emit_reloc(data, &values->address);
3090 cl[ 5] = __gen_address_offset(&values->address) |
3091 __gen_uint(values->padded_height_of_output_image_in_uif_blocks, 1, 13) >> 8;
3092
3093 cl[ 6] = __gen_address_offset(&values->address) >> 8;
3094
3095 cl[ 7] = __gen_address_offset(&values->address) >> 16;
3096
3097 cl[ 8] = __gen_address_offset(&values->address) >> 24;
3098
3099 }
3100
3101 #define V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL_length 9
3102 #ifdef __gen_unpack_address
3103 static inline void
V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL_unpack(const uint8_t * restrict cl,struct V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL * restrict values)3104 V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL_unpack(const uint8_t * restrict cl,
3105 struct V3D33_TILE_RENDERING_MODE_CFG_Z_STENCIL * restrict values)
3106 {
3107 values->opcode = __gen_unpack_uint(cl, 0, 7);
3108 values->address = __gen_unpack_address(cl, 46, 71);
3109 values->padded_height_of_output_image_in_uif_blocks = __gen_unpack_uint(cl, 33, 45);
3110 values->memory_format = __gen_unpack_uint(cl, 30, 32);
3111 values->output_image_format = __gen_unpack_uint(cl, 24, 29);
3112 values->decimate_mode = __gen_unpack_uint(cl, 22, 23);
3113 values->internal_type = __gen_unpack_uint(cl, 18, 21);
3114 values->internal_bpp_ignored = __gen_unpack_uint(cl, 16, 17);
3115 values->z_stencil_id = __gen_unpack_uint(cl, 12, 15);
3116 values->sub_id = __gen_unpack_uint(cl, 8, 11);
3117 }
3118 #endif
3119
3120
3121 #define V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES_opcode 121
3122 #define V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES_header\
3123 .opcode = 121, \
3124 .sub_id = 3
3125
3126 struct V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES {
3127 uint32_t opcode;
3128 uint32_t unused;
3129 float z_clear_value;
3130 uint32_t stencil_clear_value;
3131 uint32_t sub_id;
3132 };
3133
3134 static inline void
V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES * restrict values)3135 V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES_pack(__gen_user_data *data, uint8_t * restrict cl,
3136 const struct V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES * restrict values)
3137 {
3138 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3139
3140 cl[ 1] = __gen_uint(values->sub_id, 0, 3);
3141
3142 cl[ 2] = __gen_uint(values->stencil_clear_value, 0, 7);
3143
3144
3145 memcpy(&cl[3], &values->z_clear_value, sizeof(values->z_clear_value));
3146 cl[ 7] = __gen_uint(values->unused, 0, 15);
3147
3148 cl[ 8] = __gen_uint(values->unused, 0, 15) >> 8;
3149
3150 }
3151
3152 #define V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES_length 9
3153 #ifdef __gen_unpack_address
3154 static inline void
V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES_unpack(const uint8_t * restrict cl,struct V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES * restrict values)3155 V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES_unpack(const uint8_t * restrict cl,
3156 struct V3D33_TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES * restrict values)
3157 {
3158 values->opcode = __gen_unpack_uint(cl, 0, 7);
3159 values->unused = __gen_unpack_uint(cl, 56, 71);
3160 values->z_clear_value = __gen_unpack_float(cl, 24, 55);
3161 values->stencil_clear_value = __gen_unpack_uint(cl, 16, 23);
3162 values->sub_id = __gen_unpack_uint(cl, 8, 11);
3163 }
3164 #endif
3165
3166
3167 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1_opcode 121
3168 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1_header\
3169 .opcode = 121, \
3170 .sub_id = 4
3171
3172 struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1 {
3173 uint32_t opcode;
3174 uint32_t clear_color_next_24_bits;
3175 uint32_t clear_color_low_32_bits;
3176 uint32_t render_target_number;
3177 uint32_t sub_id;
3178 };
3179
3180 static inline void
V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1 * restrict values)3181 V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1_pack(__gen_user_data *data, uint8_t * restrict cl,
3182 const struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1 * restrict values)
3183 {
3184 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3185
3186 cl[ 1] = __gen_uint(values->render_target_number, 4, 7) |
3187 __gen_uint(values->sub_id, 0, 3);
3188
3189
3190 memcpy(&cl[2], &values->clear_color_low_32_bits, sizeof(values->clear_color_low_32_bits));
3191 cl[ 6] = __gen_uint(values->clear_color_next_24_bits, 0, 23);
3192
3193 cl[ 7] = __gen_uint(values->clear_color_next_24_bits, 0, 23) >> 8;
3194
3195 cl[ 8] = __gen_uint(values->clear_color_next_24_bits, 0, 23) >> 16;
3196
3197 }
3198
3199 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1_length 9
3200 #ifdef __gen_unpack_address
3201 static inline void
V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1_unpack(const uint8_t * restrict cl,struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1 * restrict values)3202 V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1_unpack(const uint8_t * restrict cl,
3203 struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1 * restrict values)
3204 {
3205 values->opcode = __gen_unpack_uint(cl, 0, 7);
3206 values->clear_color_next_24_bits = __gen_unpack_uint(cl, 48, 71);
3207 values->clear_color_low_32_bits = __gen_unpack_uint(cl, 16, 47);
3208 values->render_target_number = __gen_unpack_uint(cl, 12, 15);
3209 values->sub_id = __gen_unpack_uint(cl, 8, 11);
3210 }
3211 #endif
3212
3213
3214 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2_opcode 121
3215 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2_header\
3216 .opcode = 121, \
3217 .sub_id = 5
3218
3219 struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2 {
3220 uint32_t opcode;
3221 uint32_t clear_color_mid_high_24_bits;
3222 uint32_t clear_color_mid_low_32_bits;
3223 uint32_t render_target_number;
3224 uint32_t sub_id;
3225 };
3226
3227 static inline void
V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2 * restrict values)3228 V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2_pack(__gen_user_data *data, uint8_t * restrict cl,
3229 const struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2 * restrict values)
3230 {
3231 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3232
3233 cl[ 1] = __gen_uint(values->render_target_number, 4, 7) |
3234 __gen_uint(values->sub_id, 0, 3);
3235
3236
3237 memcpy(&cl[2], &values->clear_color_mid_low_32_bits, sizeof(values->clear_color_mid_low_32_bits));
3238 cl[ 6] = __gen_uint(values->clear_color_mid_high_24_bits, 0, 23);
3239
3240 cl[ 7] = __gen_uint(values->clear_color_mid_high_24_bits, 0, 23) >> 8;
3241
3242 cl[ 8] = __gen_uint(values->clear_color_mid_high_24_bits, 0, 23) >> 16;
3243
3244 }
3245
3246 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2_length 9
3247 #ifdef __gen_unpack_address
3248 static inline void
V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2_unpack(const uint8_t * restrict cl,struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2 * restrict values)3249 V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2_unpack(const uint8_t * restrict cl,
3250 struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2 * restrict values)
3251 {
3252 values->opcode = __gen_unpack_uint(cl, 0, 7);
3253 values->clear_color_mid_high_24_bits = __gen_unpack_uint(cl, 48, 71);
3254 values->clear_color_mid_low_32_bits = __gen_unpack_uint(cl, 16, 47);
3255 values->render_target_number = __gen_unpack_uint(cl, 12, 15);
3256 values->sub_id = __gen_unpack_uint(cl, 8, 11);
3257 }
3258 #endif
3259
3260
3261 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3_opcode 121
3262 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3_header\
3263 .opcode = 121, \
3264 .sub_id = 6
3265
3266 struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3 {
3267 uint32_t opcode;
3268 uint32_t pad;
3269 uint32_t uif_padded_height_in_uif_blocks;
3270 uint32_t raster_row_stride_or_image_height_in_pixels;
3271 uint32_t clear_color_high_16_bits;
3272 uint32_t render_target_number;
3273 uint32_t sub_id;
3274 };
3275
3276 static inline void
V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3 * restrict values)3277 V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3_pack(__gen_user_data *data, uint8_t * restrict cl,
3278 const struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3 * restrict values)
3279 {
3280 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3281
3282 cl[ 1] = __gen_uint(values->render_target_number, 4, 7) |
3283 __gen_uint(values->sub_id, 0, 3);
3284
3285 cl[ 2] = __gen_uint(values->clear_color_high_16_bits, 0, 15);
3286
3287 cl[ 3] = __gen_uint(values->clear_color_high_16_bits, 0, 15) >> 8;
3288
3289 cl[ 4] = __gen_uint(values->raster_row_stride_or_image_height_in_pixels, 0, 15);
3290
3291 cl[ 5] = __gen_uint(values->raster_row_stride_or_image_height_in_pixels, 0, 15) >> 8;
3292
3293 cl[ 6] = __gen_uint(values->uif_padded_height_in_uif_blocks, 0, 12);
3294
3295 cl[ 7] = __gen_uint(values->pad, 5, 15) |
3296 __gen_uint(values->uif_padded_height_in_uif_blocks, 0, 12) >> 8;
3297
3298 cl[ 8] = __gen_uint(values->pad, 5, 15) >> 8;
3299
3300 }
3301
3302 #define V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3_length 9
3303 #ifdef __gen_unpack_address
3304 static inline void
V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3_unpack(const uint8_t * restrict cl,struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3 * restrict values)3305 V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3_unpack(const uint8_t * restrict cl,
3306 struct V3D33_TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3 * restrict values)
3307 {
3308 values->opcode = __gen_unpack_uint(cl, 0, 7);
3309 values->pad = __gen_unpack_uint(cl, 61, 71);
3310 values->uif_padded_height_in_uif_blocks = __gen_unpack_uint(cl, 48, 60);
3311 values->raster_row_stride_or_image_height_in_pixels = __gen_unpack_uint(cl, 32, 47);
3312 values->clear_color_high_16_bits = __gen_unpack_uint(cl, 16, 31);
3313 values->render_target_number = __gen_unpack_uint(cl, 12, 15);
3314 values->sub_id = __gen_unpack_uint(cl, 8, 11);
3315 }
3316 #endif
3317
3318
3319 #define V3D33_TILE_COORDINATES_opcode 124
3320 #define V3D33_TILE_COORDINATES_header \
3321 .opcode = 124
3322
3323 struct V3D33_TILE_COORDINATES {
3324 uint32_t opcode;
3325 uint32_t tile_row_number;
3326 uint32_t tile_column_number;
3327 };
3328
3329 static inline void
V3D33_TILE_COORDINATES_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_COORDINATES * restrict values)3330 V3D33_TILE_COORDINATES_pack(__gen_user_data *data, uint8_t * restrict cl,
3331 const struct V3D33_TILE_COORDINATES * restrict values)
3332 {
3333 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3334
3335 cl[ 1] = __gen_uint(values->tile_column_number, 0, 11);
3336
3337 cl[ 2] = __gen_uint(values->tile_row_number, 4, 15) |
3338 __gen_uint(values->tile_column_number, 0, 11) >> 8;
3339
3340 cl[ 3] = __gen_uint(values->tile_row_number, 4, 15) >> 8;
3341
3342 }
3343
3344 #define V3D33_TILE_COORDINATES_length 4
3345 #ifdef __gen_unpack_address
3346 static inline void
V3D33_TILE_COORDINATES_unpack(const uint8_t * restrict cl,struct V3D33_TILE_COORDINATES * restrict values)3347 V3D33_TILE_COORDINATES_unpack(const uint8_t * restrict cl,
3348 struct V3D33_TILE_COORDINATES * restrict values)
3349 {
3350 values->opcode = __gen_unpack_uint(cl, 0, 7);
3351 values->tile_row_number = __gen_unpack_uint(cl, 20, 31);
3352 values->tile_column_number = __gen_unpack_uint(cl, 8, 19);
3353 }
3354 #endif
3355
3356
3357 #define V3D33_MULTICORE_RENDERING_SUPERTILE_CFG_opcode 122
3358 #define V3D33_MULTICORE_RENDERING_SUPERTILE_CFG_header\
3359 .opcode = 122
3360
3361 struct V3D33_MULTICORE_RENDERING_SUPERTILE_CFG {
3362 uint32_t opcode;
3363 uint32_t number_of_bin_tile_lists;
3364 bool supertile_raster_order;
3365 bool multicore_enable;
3366 uint32_t total_frame_height_in_tiles;
3367 uint32_t total_frame_width_in_tiles;
3368 uint32_t total_frame_height_in_supertiles;
3369 uint32_t total_frame_width_in_supertiles;
3370 uint32_t supertile_height_in_tiles;
3371 uint32_t supertile_width_in_tiles;
3372 };
3373
3374 static inline void
V3D33_MULTICORE_RENDERING_SUPERTILE_CFG_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_MULTICORE_RENDERING_SUPERTILE_CFG * restrict values)3375 V3D33_MULTICORE_RENDERING_SUPERTILE_CFG_pack(__gen_user_data *data, uint8_t * restrict cl,
3376 const struct V3D33_MULTICORE_RENDERING_SUPERTILE_CFG * restrict values)
3377 {
3378 assert(values->number_of_bin_tile_lists >= 1);
3379 assert(values->supertile_height_in_tiles >= 1);
3380 assert(values->supertile_width_in_tiles >= 1);
3381 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3382
3383 cl[ 1] = __gen_uint(values->supertile_width_in_tiles - 1, 0, 7);
3384
3385 cl[ 2] = __gen_uint(values->supertile_height_in_tiles - 1, 0, 7);
3386
3387 cl[ 3] = __gen_uint(values->total_frame_width_in_supertiles, 0, 7);
3388
3389 cl[ 4] = __gen_uint(values->total_frame_height_in_supertiles, 0, 7);
3390
3391 cl[ 5] = __gen_uint(values->total_frame_width_in_tiles, 0, 11);
3392
3393 cl[ 6] = __gen_uint(values->total_frame_height_in_tiles, 4, 15) |
3394 __gen_uint(values->total_frame_width_in_tiles, 0, 11) >> 8;
3395
3396 cl[ 7] = __gen_uint(values->total_frame_height_in_tiles, 4, 15) >> 8;
3397
3398 cl[ 8] = __gen_uint(values->number_of_bin_tile_lists - 1, 5, 7) |
3399 __gen_uint(values->supertile_raster_order, 4, 4) |
3400 __gen_uint(values->multicore_enable, 0, 0);
3401
3402 }
3403
3404 #define V3D33_MULTICORE_RENDERING_SUPERTILE_CFG_length 9
3405 #ifdef __gen_unpack_address
3406 static inline void
V3D33_MULTICORE_RENDERING_SUPERTILE_CFG_unpack(const uint8_t * restrict cl,struct V3D33_MULTICORE_RENDERING_SUPERTILE_CFG * restrict values)3407 V3D33_MULTICORE_RENDERING_SUPERTILE_CFG_unpack(const uint8_t * restrict cl,
3408 struct V3D33_MULTICORE_RENDERING_SUPERTILE_CFG * restrict values)
3409 {
3410 values->opcode = __gen_unpack_uint(cl, 0, 7);
3411 values->number_of_bin_tile_lists = __gen_unpack_uint(cl, 69, 71) + 1;
3412 values->supertile_raster_order = __gen_unpack_uint(cl, 68, 68);
3413 values->multicore_enable = __gen_unpack_uint(cl, 64, 64);
3414 values->total_frame_height_in_tiles = __gen_unpack_uint(cl, 52, 63);
3415 values->total_frame_width_in_tiles = __gen_unpack_uint(cl, 40, 51);
3416 values->total_frame_height_in_supertiles = __gen_unpack_uint(cl, 32, 39);
3417 values->total_frame_width_in_supertiles = __gen_unpack_uint(cl, 24, 31);
3418 values->supertile_height_in_tiles = __gen_unpack_uint(cl, 16, 23) + 1;
3419 values->supertile_width_in_tiles = __gen_unpack_uint(cl, 8, 15) + 1;
3420 }
3421 #endif
3422
3423
3424 #define V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE_opcode 123
3425 #define V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE_header\
3426 .opcode = 123
3427
3428 struct V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE {
3429 uint32_t opcode;
3430 __gen_address_type address;
3431 uint32_t tile_list_set_number;
3432 };
3433
3434 static inline void
V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE * restrict values)3435 V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE_pack(__gen_user_data *data, uint8_t * restrict cl,
3436 const struct V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE * restrict values)
3437 {
3438 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3439
3440 __gen_emit_reloc(data, &values->address);
3441 cl[ 1] = __gen_address_offset(&values->address) |
3442 __gen_uint(values->tile_list_set_number, 0, 3);
3443
3444 cl[ 2] = __gen_address_offset(&values->address) >> 8;
3445
3446 cl[ 3] = __gen_address_offset(&values->address) >> 16;
3447
3448 cl[ 4] = __gen_address_offset(&values->address) >> 24;
3449
3450 }
3451
3452 #define V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE_length 5
3453 #ifdef __gen_unpack_address
3454 static inline void
V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE_unpack(const uint8_t * restrict cl,struct V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE * restrict values)3455 V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE_unpack(const uint8_t * restrict cl,
3456 struct V3D33_MULTICORE_RENDERING_TILE_LIST_SET_BASE * restrict values)
3457 {
3458 values->opcode = __gen_unpack_uint(cl, 0, 7);
3459 values->address = __gen_unpack_address(cl, 14, 39);
3460 values->tile_list_set_number = __gen_unpack_uint(cl, 8, 11);
3461 }
3462 #endif
3463
3464
3465 #define V3D33_TILE_COORDINATES_IMPLICIT_opcode 125
3466 #define V3D33_TILE_COORDINATES_IMPLICIT_header \
3467 .opcode = 125
3468
3469 struct V3D33_TILE_COORDINATES_IMPLICIT {
3470 uint32_t opcode;
3471 };
3472
3473 static inline void
V3D33_TILE_COORDINATES_IMPLICIT_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_COORDINATES_IMPLICIT * restrict values)3474 V3D33_TILE_COORDINATES_IMPLICIT_pack(__gen_user_data *data, uint8_t * restrict cl,
3475 const struct V3D33_TILE_COORDINATES_IMPLICIT * restrict values)
3476 {
3477 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3478
3479 }
3480
3481 #define V3D33_TILE_COORDINATES_IMPLICIT_length 1
3482 #ifdef __gen_unpack_address
3483 static inline void
V3D33_TILE_COORDINATES_IMPLICIT_unpack(const uint8_t * restrict cl,struct V3D33_TILE_COORDINATES_IMPLICIT * restrict values)3484 V3D33_TILE_COORDINATES_IMPLICIT_unpack(const uint8_t * restrict cl,
3485 struct V3D33_TILE_COORDINATES_IMPLICIT * restrict values)
3486 {
3487 values->opcode = __gen_unpack_uint(cl, 0, 7);
3488 }
3489 #endif
3490
3491
3492 #define V3D33_TILE_LIST_INITIAL_BLOCK_SIZE_opcode 126
3493 #define V3D33_TILE_LIST_INITIAL_BLOCK_SIZE_header\
3494 .opcode = 126
3495
3496 struct V3D33_TILE_LIST_INITIAL_BLOCK_SIZE {
3497 uint32_t opcode;
3498 bool use_auto_chained_tile_lists;
3499 uint32_t size_of_first_block_in_chained_tile_lists;
3500 #define TILE_ALLOCATION_BLOCK_SIZE_64B 0
3501 #define TILE_ALLOCATION_BLOCK_SIZE_128B 1
3502 #define TILE_ALLOCATION_BLOCK_SIZE_256B 2
3503 };
3504
3505 static inline void
V3D33_TILE_LIST_INITIAL_BLOCK_SIZE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TILE_LIST_INITIAL_BLOCK_SIZE * restrict values)3506 V3D33_TILE_LIST_INITIAL_BLOCK_SIZE_pack(__gen_user_data *data, uint8_t * restrict cl,
3507 const struct V3D33_TILE_LIST_INITIAL_BLOCK_SIZE * restrict values)
3508 {
3509 cl[ 0] = __gen_uint(values->opcode, 0, 7);
3510
3511 cl[ 1] = __gen_uint(values->use_auto_chained_tile_lists, 2, 2) |
3512 __gen_uint(values->size_of_first_block_in_chained_tile_lists, 0, 1);
3513
3514 }
3515
3516 #define V3D33_TILE_LIST_INITIAL_BLOCK_SIZE_length 2
3517 #ifdef __gen_unpack_address
3518 static inline void
V3D33_TILE_LIST_INITIAL_BLOCK_SIZE_unpack(const uint8_t * restrict cl,struct V3D33_TILE_LIST_INITIAL_BLOCK_SIZE * restrict values)3519 V3D33_TILE_LIST_INITIAL_BLOCK_SIZE_unpack(const uint8_t * restrict cl,
3520 struct V3D33_TILE_LIST_INITIAL_BLOCK_SIZE * restrict values)
3521 {
3522 values->opcode = __gen_unpack_uint(cl, 0, 7);
3523 values->use_auto_chained_tile_lists = __gen_unpack_uint(cl, 10, 10);
3524 values->size_of_first_block_in_chained_tile_lists = __gen_unpack_uint(cl, 8, 9);
3525 }
3526 #endif
3527
3528
3529 #define V3D33_GL_SHADER_STATE_RECORD_header \
3530
3531
3532 struct V3D33_GL_SHADER_STATE_RECORD {
3533 bool point_size_in_shaded_vertex_data;
3534 bool enable_clipping;
3535 bool vertex_id_read_by_coordinate_shader;
3536 bool instance_id_read_by_coordinate_shader;
3537 bool vertex_id_read_by_vertex_shader;
3538 bool instance_id_read_by_vertex_shader;
3539 bool fragment_shader_does_z_writes;
3540 bool turn_off_early_z_test;
3541 bool coordinate_shader_has_separate_input_and_output_vpm_blocks;
3542 bool vertex_shader_has_separate_input_and_output_vpm_blocks;
3543 bool fragment_shader_uses_real_pixel_centre_w_in_addition_to_centroid_w2;
3544 uint32_t number_of_varyings_in_fragment_shader;
3545 uint32_t coordinate_shader_output_vpm_segment_size;
3546 uint32_t coordinate_shader_input_vpm_segment_size;
3547 uint32_t vertex_shader_output_vpm_segment_size;
3548 uint32_t vertex_shader_input_vpm_segment_size;
3549 __gen_address_type address_of_default_attribute_values;
3550 __gen_address_type fragment_shader_code_address;
3551 bool fragment_shader_2_way_threadable;
3552 bool fragment_shader_4_way_threadable;
3553 bool fragment_shader_propagate_nans;
3554 __gen_address_type fragment_shader_uniforms_address;
3555 __gen_address_type vertex_shader_code_address;
3556 bool vertex_shader_2_way_threadable;
3557 bool vertex_shader_4_way_threadable;
3558 bool vertex_shader_propagate_nans;
3559 __gen_address_type vertex_shader_uniforms_address;
3560 __gen_address_type coordinate_shader_code_address;
3561 bool coordinate_shader_2_way_threadable;
3562 bool coordinate_shader_4_way_threadable;
3563 bool coordinate_shader_propagate_nans;
3564 __gen_address_type coordinate_shader_uniforms_address;
3565 };
3566
3567 static inline void
V3D33_GL_SHADER_STATE_RECORD_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_GL_SHADER_STATE_RECORD * restrict values)3568 V3D33_GL_SHADER_STATE_RECORD_pack(__gen_user_data *data, uint8_t * restrict cl,
3569 const struct V3D33_GL_SHADER_STATE_RECORD * restrict values)
3570 {
3571 cl[ 0] = __gen_uint(values->point_size_in_shaded_vertex_data, 0, 0) |
3572 __gen_uint(values->enable_clipping, 1, 1) |
3573 __gen_uint(values->vertex_id_read_by_coordinate_shader, 2, 2) |
3574 __gen_uint(values->instance_id_read_by_coordinate_shader, 3, 3) |
3575 __gen_uint(values->vertex_id_read_by_vertex_shader, 4, 4) |
3576 __gen_uint(values->instance_id_read_by_vertex_shader, 5, 5) |
3577 __gen_uint(values->fragment_shader_does_z_writes, 6, 6) |
3578 __gen_uint(values->turn_off_early_z_test, 7, 7);
3579
3580 cl[ 1] = __gen_uint(values->coordinate_shader_has_separate_input_and_output_vpm_blocks, 0, 0) |
3581 __gen_uint(values->vertex_shader_has_separate_input_and_output_vpm_blocks, 1, 1) |
3582 __gen_uint(values->fragment_shader_uses_real_pixel_centre_w_in_addition_to_centroid_w2, 2, 2);
3583
3584 cl[ 2] = __gen_uint(values->number_of_varyings_in_fragment_shader, 0, 7);
3585
3586 cl[ 3] = 0;
3587 cl[ 4] = __gen_uint(values->coordinate_shader_output_vpm_segment_size, 0, 7);
3588
3589 cl[ 5] = __gen_uint(values->coordinate_shader_input_vpm_segment_size, 0, 7);
3590
3591 cl[ 6] = __gen_uint(values->vertex_shader_output_vpm_segment_size, 0, 7);
3592
3593 cl[ 7] = __gen_uint(values->vertex_shader_input_vpm_segment_size, 0, 7);
3594
3595 __gen_emit_reloc(data, &values->address_of_default_attribute_values);
3596 cl[ 8] = __gen_address_offset(&values->address_of_default_attribute_values);
3597
3598 cl[ 9] = __gen_address_offset(&values->address_of_default_attribute_values) >> 8;
3599
3600 cl[10] = __gen_address_offset(&values->address_of_default_attribute_values) >> 16;
3601
3602 cl[11] = __gen_address_offset(&values->address_of_default_attribute_values) >> 24;
3603
3604 __gen_emit_reloc(data, &values->fragment_shader_code_address);
3605 cl[12] = __gen_address_offset(&values->fragment_shader_code_address) |
3606 __gen_uint(values->fragment_shader_2_way_threadable, 0, 0) |
3607 __gen_uint(values->fragment_shader_4_way_threadable, 1, 1) |
3608 __gen_uint(values->fragment_shader_propagate_nans, 2, 2);
3609
3610 cl[13] = __gen_address_offset(&values->fragment_shader_code_address) >> 8;
3611
3612 cl[14] = __gen_address_offset(&values->fragment_shader_code_address) >> 16;
3613
3614 cl[15] = __gen_address_offset(&values->fragment_shader_code_address) >> 24;
3615
3616 __gen_emit_reloc(data, &values->fragment_shader_uniforms_address);
3617 cl[16] = __gen_address_offset(&values->fragment_shader_uniforms_address);
3618
3619 cl[17] = __gen_address_offset(&values->fragment_shader_uniforms_address) >> 8;
3620
3621 cl[18] = __gen_address_offset(&values->fragment_shader_uniforms_address) >> 16;
3622
3623 cl[19] = __gen_address_offset(&values->fragment_shader_uniforms_address) >> 24;
3624
3625 __gen_emit_reloc(data, &values->vertex_shader_code_address);
3626 cl[20] = __gen_address_offset(&values->vertex_shader_code_address) |
3627 __gen_uint(values->vertex_shader_2_way_threadable, 0, 0) |
3628 __gen_uint(values->vertex_shader_4_way_threadable, 1, 1) |
3629 __gen_uint(values->vertex_shader_propagate_nans, 2, 2);
3630
3631 cl[21] = __gen_address_offset(&values->vertex_shader_code_address) >> 8;
3632
3633 cl[22] = __gen_address_offset(&values->vertex_shader_code_address) >> 16;
3634
3635 cl[23] = __gen_address_offset(&values->vertex_shader_code_address) >> 24;
3636
3637 __gen_emit_reloc(data, &values->vertex_shader_uniforms_address);
3638 cl[24] = __gen_address_offset(&values->vertex_shader_uniforms_address);
3639
3640 cl[25] = __gen_address_offset(&values->vertex_shader_uniforms_address) >> 8;
3641
3642 cl[26] = __gen_address_offset(&values->vertex_shader_uniforms_address) >> 16;
3643
3644 cl[27] = __gen_address_offset(&values->vertex_shader_uniforms_address) >> 24;
3645
3646 __gen_emit_reloc(data, &values->coordinate_shader_code_address);
3647 cl[28] = __gen_address_offset(&values->coordinate_shader_code_address) |
3648 __gen_uint(values->coordinate_shader_2_way_threadable, 0, 0) |
3649 __gen_uint(values->coordinate_shader_4_way_threadable, 1, 1) |
3650 __gen_uint(values->coordinate_shader_propagate_nans, 2, 2);
3651
3652 cl[29] = __gen_address_offset(&values->coordinate_shader_code_address) >> 8;
3653
3654 cl[30] = __gen_address_offset(&values->coordinate_shader_code_address) >> 16;
3655
3656 cl[31] = __gen_address_offset(&values->coordinate_shader_code_address) >> 24;
3657
3658 __gen_emit_reloc(data, &values->coordinate_shader_uniforms_address);
3659 cl[32] = __gen_address_offset(&values->coordinate_shader_uniforms_address);
3660
3661 cl[33] = __gen_address_offset(&values->coordinate_shader_uniforms_address) >> 8;
3662
3663 cl[34] = __gen_address_offset(&values->coordinate_shader_uniforms_address) >> 16;
3664
3665 cl[35] = __gen_address_offset(&values->coordinate_shader_uniforms_address) >> 24;
3666
3667 }
3668
3669 #define V3D33_GL_SHADER_STATE_RECORD_length 36
3670 #ifdef __gen_unpack_address
3671 static inline void
V3D33_GL_SHADER_STATE_RECORD_unpack(const uint8_t * restrict cl,struct V3D33_GL_SHADER_STATE_RECORD * restrict values)3672 V3D33_GL_SHADER_STATE_RECORD_unpack(const uint8_t * restrict cl,
3673 struct V3D33_GL_SHADER_STATE_RECORD * restrict values)
3674 {
3675 values->point_size_in_shaded_vertex_data = __gen_unpack_uint(cl, 0, 0);
3676 values->enable_clipping = __gen_unpack_uint(cl, 1, 1);
3677 values->vertex_id_read_by_coordinate_shader = __gen_unpack_uint(cl, 2, 2);
3678 values->instance_id_read_by_coordinate_shader = __gen_unpack_uint(cl, 3, 3);
3679 values->vertex_id_read_by_vertex_shader = __gen_unpack_uint(cl, 4, 4);
3680 values->instance_id_read_by_vertex_shader = __gen_unpack_uint(cl, 5, 5);
3681 values->fragment_shader_does_z_writes = __gen_unpack_uint(cl, 6, 6);
3682 values->turn_off_early_z_test = __gen_unpack_uint(cl, 7, 7);
3683 values->coordinate_shader_has_separate_input_and_output_vpm_blocks = __gen_unpack_uint(cl, 8, 8);
3684 values->vertex_shader_has_separate_input_and_output_vpm_blocks = __gen_unpack_uint(cl, 9, 9);
3685 values->fragment_shader_uses_real_pixel_centre_w_in_addition_to_centroid_w2 = __gen_unpack_uint(cl, 10, 10);
3686 values->number_of_varyings_in_fragment_shader = __gen_unpack_uint(cl, 16, 23);
3687 values->coordinate_shader_output_vpm_segment_size = __gen_unpack_uint(cl, 32, 39);
3688 values->coordinate_shader_input_vpm_segment_size = __gen_unpack_uint(cl, 40, 47);
3689 values->vertex_shader_output_vpm_segment_size = __gen_unpack_uint(cl, 48, 55);
3690 values->vertex_shader_input_vpm_segment_size = __gen_unpack_uint(cl, 56, 63);
3691 values->address_of_default_attribute_values = __gen_unpack_address(cl, 64, 95);
3692 values->fragment_shader_code_address = __gen_unpack_address(cl, 99, 127);
3693 values->fragment_shader_2_way_threadable = __gen_unpack_uint(cl, 96, 96);
3694 values->fragment_shader_4_way_threadable = __gen_unpack_uint(cl, 97, 97);
3695 values->fragment_shader_propagate_nans = __gen_unpack_uint(cl, 98, 98);
3696 values->fragment_shader_uniforms_address = __gen_unpack_address(cl, 128, 159);
3697 values->vertex_shader_code_address = __gen_unpack_address(cl, 160, 191);
3698 values->vertex_shader_2_way_threadable = __gen_unpack_uint(cl, 160, 160);
3699 values->vertex_shader_4_way_threadable = __gen_unpack_uint(cl, 161, 161);
3700 values->vertex_shader_propagate_nans = __gen_unpack_uint(cl, 162, 162);
3701 values->vertex_shader_uniforms_address = __gen_unpack_address(cl, 192, 223);
3702 values->coordinate_shader_code_address = __gen_unpack_address(cl, 224, 255);
3703 values->coordinate_shader_2_way_threadable = __gen_unpack_uint(cl, 224, 224);
3704 values->coordinate_shader_4_way_threadable = __gen_unpack_uint(cl, 225, 225);
3705 values->coordinate_shader_propagate_nans = __gen_unpack_uint(cl, 226, 226);
3706 values->coordinate_shader_uniforms_address = __gen_unpack_address(cl, 256, 287);
3707 }
3708 #endif
3709
3710
3711 #define V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS_header\
3712
3713
3714 struct V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS {
3715 enum V3D33_TCS_flush_mode tcs_batch_flush_mode;
3716 uint32_t per_patch_data_column_depth;
3717 uint32_t tcs_output_segment_size_in_sectors;
3718 enum V3D33_Pack_Mode tcs_output_segment_pack_mode;
3719 uint32_t tes_output_segment_size_in_sectors;
3720 enum V3D33_Pack_Mode tes_output_segment_pack_mode;
3721 uint32_t gs_output_segment_size_in_sectors;
3722 enum V3D33_Pack_Mode gs_output_segment_pack_mode;
3723 uint32_t tbg_max_patches_per_tcs_batch;
3724 uint32_t tbg_max_extra_vertex_segs_for_patches_after_first;
3725 uint32_t tbg_min_tcs_output_segments_required_in_play;
3726 uint32_t tbg_min_per_patch_data_segments_required_in_play;
3727 uint32_t tpg_max_patches_per_tes_batch;
3728 uint32_t tpg_max_vertex_segments_per_tes_batch;
3729 uint32_t tpg_max_tcs_output_segments_per_tes_batch;
3730 uint32_t tpg_min_tes_output_segments_required_in_play;
3731 uint32_t gbg_max_tes_output_vertex_segments_per_gs_batch;
3732 uint32_t gbg_min_gs_output_segments_required_in_play;
3733 };
3734
3735 static inline void
V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS * restrict values)3736 V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS_pack(__gen_user_data *data, uint8_t * restrict cl,
3737 const struct V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS * restrict values)
3738 {
3739 assert(values->tbg_max_patches_per_tcs_batch >= 1);
3740 assert(values->tbg_min_tcs_output_segments_required_in_play >= 1);
3741 assert(values->tbg_min_per_patch_data_segments_required_in_play >= 1);
3742 assert(values->tpg_max_patches_per_tes_batch >= 1);
3743 assert(values->tpg_max_tcs_output_segments_per_tes_batch >= 1);
3744 assert(values->tpg_min_tes_output_segments_required_in_play >= 1);
3745 assert(values->gbg_min_gs_output_segments_required_in_play >= 1);
3746 cl[ 0] = __gen_uint(values->tcs_batch_flush_mode, 0, 1) |
3747 __gen_uint(values->per_patch_data_column_depth, 2, 5);
3748
3749 cl[ 1] = __gen_uint(values->tcs_output_segment_size_in_sectors, 0, 5) |
3750 __gen_uint(values->tcs_output_segment_pack_mode, 6, 7);
3751
3752 cl[ 2] = __gen_uint(values->tes_output_segment_size_in_sectors, 0, 5) |
3753 __gen_uint(values->tes_output_segment_pack_mode, 6, 7);
3754
3755 cl[ 3] = __gen_uint(values->gs_output_segment_size_in_sectors, 0, 5) |
3756 __gen_uint(values->gs_output_segment_pack_mode, 6, 7);
3757
3758 cl[ 4] = __gen_uint(values->tbg_max_patches_per_tcs_batch - 1, 0, 3) |
3759 __gen_uint(values->tbg_max_extra_vertex_segs_for_patches_after_first, 4, 5) |
3760 __gen_uint(values->tbg_min_tcs_output_segments_required_in_play - 1, 6, 7);
3761
3762 cl[ 5] = __gen_uint(values->tbg_min_per_patch_data_segments_required_in_play - 1, 0, 2) |
3763 __gen_uint(values->tpg_max_patches_per_tes_batch - 1, 5, 8);
3764
3765 cl[ 6] = __gen_uint(values->tpg_max_patches_per_tes_batch - 1, 5, 8) >> 8 |
3766 __gen_uint(values->tpg_max_vertex_segments_per_tes_batch, 1, 2) |
3767 __gen_uint(values->tpg_max_tcs_output_segments_per_tes_batch - 1, 3, 5) |
3768 __gen_uint(values->tpg_min_tes_output_segments_required_in_play - 1, 6, 8);
3769
3770 cl[ 7] = __gen_uint(values->tpg_min_tes_output_segments_required_in_play - 1, 6, 8) >> 8 |
3771 __gen_uint(values->gbg_max_tes_output_vertex_segments_per_gs_batch, 1, 2) |
3772 __gen_uint(values->gbg_min_gs_output_segments_required_in_play - 1, 3, 5);
3773
3774 }
3775
3776 #define V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS_length 8
3777 #ifdef __gen_unpack_address
3778 static inline void
V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS_unpack(const uint8_t * restrict cl,struct V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS * restrict values)3779 V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS_unpack(const uint8_t * restrict cl,
3780 struct V3D33_TESSELLATION_GEOMETRY_SHADER_PARAMS * restrict values)
3781 {
3782 values->tcs_batch_flush_mode = __gen_unpack_uint(cl, 0, 1);
3783 values->per_patch_data_column_depth = __gen_unpack_uint(cl, 2, 5);
3784 values->tcs_output_segment_size_in_sectors = __gen_unpack_uint(cl, 8, 13);
3785 values->tcs_output_segment_pack_mode = __gen_unpack_uint(cl, 14, 15);
3786 values->tes_output_segment_size_in_sectors = __gen_unpack_uint(cl, 16, 21);
3787 values->tes_output_segment_pack_mode = __gen_unpack_uint(cl, 22, 23);
3788 values->gs_output_segment_size_in_sectors = __gen_unpack_uint(cl, 24, 29);
3789 values->gs_output_segment_pack_mode = __gen_unpack_uint(cl, 30, 31);
3790 values->tbg_max_patches_per_tcs_batch = __gen_unpack_uint(cl, 32, 35) + 1;
3791 values->tbg_max_extra_vertex_segs_for_patches_after_first = __gen_unpack_uint(cl, 36, 37);
3792 values->tbg_min_tcs_output_segments_required_in_play = __gen_unpack_uint(cl, 38, 39) + 1;
3793 values->tbg_min_per_patch_data_segments_required_in_play = __gen_unpack_uint(cl, 40, 42) + 1;
3794 values->tpg_max_patches_per_tes_batch = __gen_unpack_uint(cl, 45, 48) + 1;
3795 values->tpg_max_vertex_segments_per_tes_batch = __gen_unpack_uint(cl, 49, 50);
3796 values->tpg_max_tcs_output_segments_per_tes_batch = __gen_unpack_uint(cl, 51, 53) + 1;
3797 values->tpg_min_tes_output_segments_required_in_play = __gen_unpack_uint(cl, 54, 56) + 1;
3798 values->gbg_max_tes_output_vertex_segments_per_gs_batch = __gen_unpack_uint(cl, 57, 58);
3799 values->gbg_min_gs_output_segments_required_in_play = __gen_unpack_uint(cl, 59, 61) + 1;
3800 }
3801 #endif
3802
3803
3804 #define V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD_header\
3805
3806
3807 struct V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD {
3808 __gen_address_type address;
3809 uint32_t vec_size;
3810 uint32_t type;
3811 #define ATTRIBUTE_HALF_FLOAT 1
3812 #define ATTRIBUTE_FLOAT 2
3813 #define ATTRIBUTE_FIXED 3
3814 #define ATTRIBUTE_BYTE 4
3815 #define ATTRIBUTE_SHORT 5
3816 #define ATTRIBUTE_INT 6
3817 #define ATTRIBUTE_INT2_10_10_10 7
3818 bool signed_int_type;
3819 bool normalized_int_type;
3820 bool read_as_int_uint;
3821 uint32_t number_of_values_read_by_coordinate_shader;
3822 uint32_t number_of_values_read_by_vertex_shader;
3823 uint32_t instance_divisor;
3824 uint32_t stride;
3825 };
3826
3827 static inline void
V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD * restrict values)3828 V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD_pack(__gen_user_data *data, uint8_t * restrict cl,
3829 const struct V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD * restrict values)
3830 {
3831 __gen_emit_reloc(data, &values->address);
3832 cl[ 0] = __gen_address_offset(&values->address);
3833
3834 cl[ 1] = __gen_address_offset(&values->address) >> 8;
3835
3836 cl[ 2] = __gen_address_offset(&values->address) >> 16;
3837
3838 cl[ 3] = __gen_address_offset(&values->address) >> 24;
3839
3840 cl[ 4] = __gen_uint(values->vec_size, 0, 1) |
3841 __gen_uint(values->type, 2, 4) |
3842 __gen_uint(values->signed_int_type, 5, 5) |
3843 __gen_uint(values->normalized_int_type, 6, 6) |
3844 __gen_uint(values->read_as_int_uint, 7, 7);
3845
3846 cl[ 5] = __gen_uint(values->number_of_values_read_by_coordinate_shader, 0, 3) |
3847 __gen_uint(values->number_of_values_read_by_vertex_shader, 4, 7);
3848
3849 cl[ 6] = __gen_uint(values->instance_divisor, 0, 15);
3850
3851 cl[ 7] = __gen_uint(values->instance_divisor, 0, 15) >> 8;
3852
3853
3854 memcpy(&cl[8], &values->stride, sizeof(values->stride));
3855 }
3856
3857 #define V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD_length 12
3858 #ifdef __gen_unpack_address
3859 static inline void
V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD_unpack(const uint8_t * restrict cl,struct V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD * restrict values)3860 V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD_unpack(const uint8_t * restrict cl,
3861 struct V3D33_GL_SHADER_STATE_ATTRIBUTE_RECORD * restrict values)
3862 {
3863 values->address = __gen_unpack_address(cl, 0, 31);
3864 values->vec_size = __gen_unpack_uint(cl, 32, 33);
3865 values->type = __gen_unpack_uint(cl, 34, 36);
3866 values->signed_int_type = __gen_unpack_uint(cl, 37, 37);
3867 values->normalized_int_type = __gen_unpack_uint(cl, 38, 38);
3868 values->read_as_int_uint = __gen_unpack_uint(cl, 39, 39);
3869 values->number_of_values_read_by_coordinate_shader = __gen_unpack_uint(cl, 40, 43);
3870 values->number_of_values_read_by_vertex_shader = __gen_unpack_uint(cl, 44, 47);
3871 values->instance_divisor = __gen_unpack_uint(cl, 48, 63);
3872 values->stride = __gen_unpack_uint(cl, 64, 95);
3873 }
3874 #endif
3875
3876
3877 #define V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP_header\
3878 .id = 0, \
3879 .id0 = 0
3880
3881 struct V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP {
3882 uint32_t id;
3883 uint32_t id0;
3884 bool horiz;
3885 bool laned;
3886 bool segs;
3887 int32_t stride;
3888 uint32_t size;
3889 #define VPM_SETUP_SIZE_8_BIT 0
3890 #define VPM_SETUP_SIZE_16_BIT 1
3891 #define VPM_SETUP_SIZE_32_BIT 2
3892 uint32_t addr;
3893 };
3894
3895 static inline void
V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP * restrict values)3896 V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP_pack(__gen_user_data *data, uint8_t * restrict cl,
3897 const struct V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP * restrict values)
3898 {
3899 cl[ 0] = __gen_uint(values->addr, 0, 12);
3900
3901 cl[ 1] = __gen_sint(values->stride, 7, 13) |
3902 __gen_uint(values->size, 5, 6) |
3903 __gen_uint(values->addr, 0, 12) >> 8;
3904
3905 cl[ 2] = __gen_uint(values->laned, 7, 7) |
3906 __gen_uint(values->segs, 6, 6) |
3907 __gen_sint(values->stride, 7, 13) >> 8;
3908
3909 cl[ 3] = __gen_uint(values->id, 6, 7) |
3910 __gen_uint(values->id0, 3, 5) |
3911 __gen_uint(values->horiz, 0, 0);
3912
3913 }
3914
3915 #define V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP_length 4
3916 #ifdef __gen_unpack_address
3917 static inline void
V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP_unpack(const uint8_t * restrict cl,struct V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP * restrict values)3918 V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP_unpack(const uint8_t * restrict cl,
3919 struct V3D33_VPM_GENERIC_BLOCK_WRITE_SETUP * restrict values)
3920 {
3921 values->id = __gen_unpack_uint(cl, 30, 31);
3922 values->id0 = __gen_unpack_uint(cl, 27, 29);
3923 values->horiz = __gen_unpack_uint(cl, 24, 24);
3924 values->laned = __gen_unpack_uint(cl, 23, 23);
3925 values->segs = __gen_unpack_uint(cl, 22, 22);
3926 values->stride = __gen_unpack_sint(cl, 15, 21);
3927 values->size = __gen_unpack_uint(cl, 13, 14);
3928 values->addr = __gen_unpack_uint(cl, 0, 12);
3929 }
3930 #endif
3931
3932
3933 #define V3D33_VPM_GENERIC_BLOCK_READ_SETUP_header\
3934 .id = 1
3935
3936 struct V3D33_VPM_GENERIC_BLOCK_READ_SETUP {
3937 uint32_t id;
3938 bool horiz;
3939 bool laned;
3940 bool segs;
3941 uint32_t num;
3942 int32_t stride;
3943 uint32_t size;
3944 #define VPM_SETUP_SIZE_8_BIT 0
3945 #define VPM_SETUP_SIZE_16_BIT 1
3946 #define VPM_SETUP_SIZE_32_BIT 2
3947 uint32_t addr;
3948 };
3949
3950 static inline void
V3D33_VPM_GENERIC_BLOCK_READ_SETUP_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_VPM_GENERIC_BLOCK_READ_SETUP * restrict values)3951 V3D33_VPM_GENERIC_BLOCK_READ_SETUP_pack(__gen_user_data *data, uint8_t * restrict cl,
3952 const struct V3D33_VPM_GENERIC_BLOCK_READ_SETUP * restrict values)
3953 {
3954 cl[ 0] = __gen_uint(values->addr, 0, 12);
3955
3956 cl[ 1] = __gen_sint(values->stride, 7, 13) |
3957 __gen_uint(values->size, 5, 6) |
3958 __gen_uint(values->addr, 0, 12) >> 8;
3959
3960 cl[ 2] = __gen_uint(values->num, 6, 10) |
3961 __gen_sint(values->stride, 7, 13) >> 8;
3962
3963 cl[ 3] = __gen_uint(values->id, 6, 7) |
3964 __gen_uint(values->horiz, 5, 5) |
3965 __gen_uint(values->laned, 4, 4) |
3966 __gen_uint(values->segs, 3, 3) |
3967 __gen_uint(values->num, 6, 10) >> 8;
3968
3969 }
3970
3971 #define V3D33_VPM_GENERIC_BLOCK_READ_SETUP_length 4
3972 #ifdef __gen_unpack_address
3973 static inline void
V3D33_VPM_GENERIC_BLOCK_READ_SETUP_unpack(const uint8_t * restrict cl,struct V3D33_VPM_GENERIC_BLOCK_READ_SETUP * restrict values)3974 V3D33_VPM_GENERIC_BLOCK_READ_SETUP_unpack(const uint8_t * restrict cl,
3975 struct V3D33_VPM_GENERIC_BLOCK_READ_SETUP * restrict values)
3976 {
3977 values->id = __gen_unpack_uint(cl, 30, 31);
3978 values->horiz = __gen_unpack_uint(cl, 29, 29);
3979 values->laned = __gen_unpack_uint(cl, 28, 28);
3980 values->segs = __gen_unpack_uint(cl, 27, 27);
3981 values->num = __gen_unpack_uint(cl, 22, 26);
3982 values->stride = __gen_unpack_sint(cl, 15, 21);
3983 values->size = __gen_unpack_uint(cl, 13, 14);
3984 values->addr = __gen_unpack_uint(cl, 0, 12);
3985 }
3986 #endif
3987
3988
3989 #define V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1_header\
3990 .new_configuration_mode = 1
3991
3992 struct V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1 {
3993 bool per_pixel_mask_enable;
3994 int32_t texel_offset_for_r_coordinate;
3995 int32_t texel_offset_for_t_coordinate;
3996 int32_t texel_offset_for_s_coordinate;
3997 enum V3D33_Wrap_Mode r_wrap_mode;
3998 enum V3D33_Wrap_Mode t_wrap_mode;
3999 enum V3D33_Wrap_Mode s_wrap_mode;
4000 bool new_configuration_mode;
4001 bool shadow;
4002 bool coefficient_lookup_mode;
4003 bool disable_autolod_use_bias_only;
4004 bool bias_supplied;
4005 bool gather_sample_mode;
4006 bool fetch_sample_mode;
4007 uint32_t lookup_type;
4008 #define TEXTURE_2D 0
4009 #define TEXTURE_2D_ARRAY 1
4010 #define TEXTURE_3D 2
4011 #define TEXTURE_CUBE_MAP 3
4012 #define TEXTURE_1D 4
4013 #define TEXTURE_1D_ARRAY 5
4014 #define TEXTURE_CHILD_IMAGE 6
4015 };
4016
4017 static inline void
V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1 * restrict values)4018 V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1_pack(__gen_user_data *data, uint8_t * restrict cl,
4019 const struct V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1 * restrict values)
4020 {
4021 cl[ 0] = __gen_uint(values->coefficient_lookup_mode, 7, 7) |
4022 __gen_uint(values->disable_autolod_use_bias_only, 6, 6) |
4023 __gen_uint(values->bias_supplied, 5, 5) |
4024 __gen_uint(values->gather_sample_mode, 4, 4) |
4025 __gen_uint(values->fetch_sample_mode, 3, 3) |
4026 __gen_uint(values->lookup_type, 0, 2);
4027
4028 cl[ 1] = __gen_uint(values->t_wrap_mode, 5, 7) |
4029 __gen_uint(values->s_wrap_mode, 2, 4) |
4030 __gen_uint(values->new_configuration_mode, 1, 1) |
4031 __gen_uint(values->shadow, 0, 0);
4032
4033 cl[ 2] = __gen_sint(values->texel_offset_for_t_coordinate, 7, 10) |
4034 __gen_sint(values->texel_offset_for_s_coordinate, 3, 6) |
4035 __gen_uint(values->r_wrap_mode, 0, 2);
4036
4037 cl[ 3] = __gen_uint(values->per_pixel_mask_enable, 7, 7) |
4038 __gen_sint(values->texel_offset_for_r_coordinate, 3, 6) |
4039 __gen_sint(values->texel_offset_for_t_coordinate, 7, 10) >> 8;
4040
4041 }
4042
4043 #define V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1_length 4
4044 #ifdef __gen_unpack_address
4045 static inline void
V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1_unpack(const uint8_t * restrict cl,struct V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1 * restrict values)4046 V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1_unpack(const uint8_t * restrict cl,
4047 struct V3D33_TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1 * restrict values)
4048 {
4049 values->per_pixel_mask_enable = __gen_unpack_uint(cl, 31, 31);
4050 values->texel_offset_for_r_coordinate = __gen_unpack_sint(cl, 27, 30);
4051 values->texel_offset_for_t_coordinate = __gen_unpack_sint(cl, 23, 26);
4052 values->texel_offset_for_s_coordinate = __gen_unpack_sint(cl, 19, 22);
4053 values->r_wrap_mode = __gen_unpack_uint(cl, 16, 18);
4054 values->t_wrap_mode = __gen_unpack_uint(cl, 13, 15);
4055 values->s_wrap_mode = __gen_unpack_uint(cl, 10, 12);
4056 values->new_configuration_mode = __gen_unpack_uint(cl, 9, 9);
4057 values->shadow = __gen_unpack_uint(cl, 8, 8);
4058 values->coefficient_lookup_mode = __gen_unpack_uint(cl, 7, 7);
4059 values->disable_autolod_use_bias_only = __gen_unpack_uint(cl, 6, 6);
4060 values->bias_supplied = __gen_unpack_uint(cl, 5, 5);
4061 values->gather_sample_mode = __gen_unpack_uint(cl, 4, 4);
4062 values->fetch_sample_mode = __gen_unpack_uint(cl, 3, 3);
4063 values->lookup_type = __gen_unpack_uint(cl, 0, 2);
4064 }
4065 #endif
4066
4067
4068 #define V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1_header\
4069
4070
4071 struct V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1 {
4072 __gen_address_type texture_state_record_base_address;
4073 uint32_t return_words_of_texture_data;
4074 };
4075
4076 static inline void
V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1 * restrict values)4077 V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1_pack(__gen_user_data *data, uint8_t * restrict cl,
4078 const struct V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1 * restrict values)
4079 {
4080 __gen_emit_reloc(data, &values->texture_state_record_base_address);
4081 cl[ 0] = __gen_address_offset(&values->texture_state_record_base_address) |
4082 __gen_uint(values->return_words_of_texture_data, 0, 3);
4083
4084 cl[ 1] = __gen_address_offset(&values->texture_state_record_base_address) >> 8;
4085
4086 cl[ 2] = __gen_address_offset(&values->texture_state_record_base_address) >> 16;
4087
4088 cl[ 3] = __gen_address_offset(&values->texture_state_record_base_address) >> 24;
4089
4090 }
4091
4092 #define V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1_length 4
4093 #ifdef __gen_unpack_address
4094 static inline void
V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1_unpack(const uint8_t * restrict cl,struct V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1 * restrict values)4095 V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1_unpack(const uint8_t * restrict cl,
4096 struct V3D33_TEXTURE_UNIFORM_PARAMETER_1_CFG_MODE1 * restrict values)
4097 {
4098 values->texture_state_record_base_address = __gen_unpack_address(cl, 4, 31);
4099 values->return_words_of_texture_data = __gen_unpack_uint(cl, 0, 3);
4100 }
4101 #endif
4102
4103
4104 #define V3D33_TEXTURE_SHADER_STATE_header \
4105 .flip_etc_y = 1
4106
4107 struct V3D33_TEXTURE_SHADER_STATE {
4108 bool uif_xor_disable;
4109 bool level_0_is_strictly_uif;
4110 bool level_0_xor_enable;
4111 uint32_t level_0_ub_pad;
4112 bool output_32_bit;
4113 uint32_t sample_number;
4114 uint32_t base_level;
4115 float fixed_bias;
4116 float max_level_of_detail;
4117 float min_level_of_detail;
4118 uint32_t border_color_alpha;
4119 uint32_t border_color_blue;
4120 uint32_t border_color_green;
4121 uint32_t border_color_red;
4122 bool flip_s_and_t_on_incoming_request;
4123 bool flip_etc_y;
4124 bool flip_texture_y_axis;
4125 bool flip_texture_x_axis;
4126 uint32_t swizzle_a;
4127 #define SWIZZLE_ZERO 0
4128 #define SWIZZLE_ONE 1
4129 #define SWIZZLE_RED 2
4130 #define SWIZZLE_GREEN 3
4131 #define SWIZZLE_BLUE 4
4132 #define SWIZZLE_ALPHA 5
4133 uint32_t swizzle_b;
4134 uint32_t swizzle_g;
4135 uint32_t swizzle_r;
4136 enum V3D33_Compare_Function depth_compare_function;
4137 bool srgb;
4138 uint32_t texture_type;
4139 uint32_t image_depth;
4140 uint32_t image_height;
4141 uint32_t image_width;
4142 uint32_t array_stride_64_byte_aligned;
4143 __gen_address_type texture_base_pointer;
4144 enum V3D33_TMU_Filter filter;
4145 };
4146
4147 static inline void
V3D33_TEXTURE_SHADER_STATE_pack(__gen_user_data * data,uint8_t * restrict cl,const struct V3D33_TEXTURE_SHADER_STATE * restrict values)4148 V3D33_TEXTURE_SHADER_STATE_pack(__gen_user_data *data, uint8_t * restrict cl,
4149 const struct V3D33_TEXTURE_SHADER_STATE * restrict values)
4150 {
4151 __gen_emit_reloc(data, &values->texture_base_pointer);
4152 cl[ 0] = __gen_address_offset(&values->texture_base_pointer) |
4153 __gen_uint(values->filter, 0, 3);
4154
4155 cl[ 1] = __gen_address_offset(&values->texture_base_pointer) >> 8;
4156
4157 cl[ 2] = __gen_address_offset(&values->texture_base_pointer) >> 16;
4158
4159 cl[ 3] = __gen_address_offset(&values->texture_base_pointer) >> 24;
4160
4161 cl[ 4] = __gen_uint(values->array_stride_64_byte_aligned, 0, 25);
4162
4163 cl[ 5] = __gen_uint(values->array_stride_64_byte_aligned, 0, 25) >> 8;
4164
4165 cl[ 6] = __gen_uint(values->array_stride_64_byte_aligned, 0, 25) >> 16;
4166
4167 cl[ 7] = __gen_uint(values->image_width, 2, 15) |
4168 __gen_uint(values->array_stride_64_byte_aligned, 0, 25) >> 24;
4169
4170 cl[ 8] = __gen_uint(values->image_width, 2, 15) >> 8;
4171
4172 cl[ 9] = __gen_uint(values->image_height, 0, 13);
4173
4174 cl[10] = __gen_uint(values->image_depth, 6, 19) |
4175 __gen_uint(values->image_height, 0, 13) >> 8;
4176
4177 cl[11] = __gen_uint(values->image_depth, 6, 19) >> 8;
4178
4179 cl[12] = __gen_uint(values->texture_type, 4, 10) |
4180 __gen_uint(values->image_depth, 6, 19) >> 16;
4181
4182 cl[13] = __gen_uint(values->depth_compare_function, 5, 7) |
4183 __gen_uint(values->srgb, 3, 3) |
4184 __gen_uint(values->texture_type, 4, 10) >> 8;
4185
4186 cl[14] = __gen_uint(values->swizzle_b, 6, 8) |
4187 __gen_uint(values->swizzle_g, 3, 5) |
4188 __gen_uint(values->swizzle_r, 0, 2);
4189
4190 cl[15] = __gen_uint(values->flip_s_and_t_on_incoming_request, 7, 7) |
4191 __gen_uint(values->flip_etc_y, 6, 6) |
4192 __gen_uint(values->flip_texture_y_axis, 5, 5) |
4193 __gen_uint(values->flip_texture_x_axis, 4, 4) |
4194 __gen_uint(values->swizzle_a, 1, 3) |
4195 __gen_uint(values->swizzle_b, 6, 8) >> 8;
4196
4197 cl[16] = __gen_uint(values->border_color_red, 0, 15);
4198
4199 cl[17] = __gen_uint(values->border_color_red, 0, 15) >> 8;
4200
4201 cl[18] = __gen_uint(values->border_color_green, 0, 15);
4202
4203 cl[19] = __gen_uint(values->border_color_green, 0, 15) >> 8;
4204
4205 cl[20] = __gen_uint(values->border_color_blue, 0, 15);
4206
4207 cl[21] = __gen_uint(values->border_color_blue, 0, 15) >> 8;
4208
4209 cl[22] = __gen_uint(values->border_color_alpha, 0, 15);
4210
4211 cl[23] = __gen_uint(values->border_color_alpha, 0, 15) >> 8;
4212
4213 cl[24] = __gen_sfixed(values->min_level_of_detail, 0, 15, 8);
4214
4215 cl[25] = __gen_sfixed(values->min_level_of_detail, 0, 15, 8) >> 8;
4216
4217 cl[26] = __gen_sfixed(values->max_level_of_detail, 0, 15, 8);
4218
4219 cl[27] = __gen_sfixed(values->max_level_of_detail, 0, 15, 8) >> 8;
4220
4221 cl[28] = __gen_sfixed(values->fixed_bias, 0, 15, 8);
4222
4223 cl[29] = __gen_sfixed(values->fixed_bias, 0, 15, 8) >> 8;
4224
4225 cl[30] = __gen_uint(values->output_32_bit, 6, 6) |
4226 __gen_uint(values->sample_number, 4, 5) |
4227 __gen_uint(values->base_level, 0, 3);
4228
4229 cl[31] = __gen_uint(values->uif_xor_disable, 7, 7) |
4230 __gen_uint(values->level_0_is_strictly_uif, 6, 6) |
4231 __gen_uint(values->level_0_xor_enable, 4, 4) |
4232 __gen_uint(values->level_0_ub_pad, 0, 3);
4233
4234 }
4235
4236 #define V3D33_TEXTURE_SHADER_STATE_length 32
4237 #ifdef __gen_unpack_address
4238 static inline void
V3D33_TEXTURE_SHADER_STATE_unpack(const uint8_t * restrict cl,struct V3D33_TEXTURE_SHADER_STATE * restrict values)4239 V3D33_TEXTURE_SHADER_STATE_unpack(const uint8_t * restrict cl,
4240 struct V3D33_TEXTURE_SHADER_STATE * restrict values)
4241 {
4242 values->uif_xor_disable = __gen_unpack_uint(cl, 255, 255);
4243 values->level_0_is_strictly_uif = __gen_unpack_uint(cl, 254, 254);
4244 values->level_0_xor_enable = __gen_unpack_uint(cl, 252, 252);
4245 values->level_0_ub_pad = __gen_unpack_uint(cl, 248, 251);
4246 values->output_32_bit = __gen_unpack_uint(cl, 246, 246);
4247 values->sample_number = __gen_unpack_uint(cl, 244, 245);
4248 values->base_level = __gen_unpack_uint(cl, 240, 243);
4249 values->fixed_bias = __gen_unpack_sfixed(cl, 224, 239, 8);
4250 values->max_level_of_detail = __gen_unpack_sfixed(cl, 208, 223, 8);
4251 values->min_level_of_detail = __gen_unpack_sfixed(cl, 192, 207, 8);
4252 values->border_color_alpha = __gen_unpack_uint(cl, 176, 191);
4253 values->border_color_blue = __gen_unpack_uint(cl, 160, 175);
4254 values->border_color_green = __gen_unpack_uint(cl, 144, 159);
4255 values->border_color_red = __gen_unpack_uint(cl, 128, 143);
4256 values->flip_s_and_t_on_incoming_request = __gen_unpack_uint(cl, 127, 127);
4257 values->flip_etc_y = __gen_unpack_uint(cl, 126, 126);
4258 values->flip_texture_y_axis = __gen_unpack_uint(cl, 125, 125);
4259 values->flip_texture_x_axis = __gen_unpack_uint(cl, 124, 124);
4260 values->swizzle_a = __gen_unpack_uint(cl, 121, 123);
4261 values->swizzle_b = __gen_unpack_uint(cl, 118, 120);
4262 values->swizzle_g = __gen_unpack_uint(cl, 115, 117);
4263 values->swizzle_r = __gen_unpack_uint(cl, 112, 114);
4264 values->depth_compare_function = __gen_unpack_uint(cl, 109, 111);
4265 values->srgb = __gen_unpack_uint(cl, 107, 107);
4266 values->texture_type = __gen_unpack_uint(cl, 100, 106);
4267 values->image_depth = __gen_unpack_uint(cl, 86, 99);
4268 values->image_height = __gen_unpack_uint(cl, 72, 85);
4269 values->image_width = __gen_unpack_uint(cl, 58, 71);
4270 values->array_stride_64_byte_aligned = __gen_unpack_uint(cl, 32, 57);
4271 values->texture_base_pointer = __gen_unpack_address(cl, 2, 31);
4272 values->filter = __gen_unpack_uint(cl, 0, 3);
4273 }
4274 #endif
4275
4276
4277 enum V3D33_Texture_Data_Formats {
4278 TEXTURE_DATA_FORMAT_R8 = 0,
4279 TEXTURE_DATA_FORMAT_R8_SNORM = 1,
4280 TEXTURE_DATA_FORMAT_RG8 = 2,
4281 TEXTURE_DATA_FORMAT_RG8_SNORM = 3,
4282 TEXTURE_DATA_FORMAT_RGBA8 = 4,
4283 TEXTURE_DATA_FORMAT_RGBA8_SNORM = 5,
4284 TEXTURE_DATA_FORMAT_RGB565 = 6,
4285 TEXTURE_DATA_FORMAT_RGBA4 = 7,
4286 TEXTURE_DATA_FORMAT_RGB5_A1 = 8,
4287 TEXTURE_DATA_FORMAT_RGB10_A2 = 9,
4288 TEXTURE_DATA_FORMAT_R16 = 10,
4289 TEXTURE_DATA_FORMAT_R16_SNORM = 11,
4290 TEXTURE_DATA_FORMAT_RG16 = 12,
4291 TEXTURE_DATA_FORMAT_RG16_SNORM = 13,
4292 TEXTURE_DATA_FORMAT_RGBA16 = 14,
4293 TEXTURE_DATA_FORMAT_RGBA16_SNORM = 15,
4294 TEXTURE_DATA_FORMAT_R16F = 16,
4295 TEXTURE_DATA_FORMAT_RG16F = 17,
4296 TEXTURE_DATA_FORMAT_RGBA16F = 18,
4297 TEXTURE_DATA_FORMAT_R11F_G11F_B10F = 19,
4298 TEXTURE_DATA_FORMAT_RGB9_E5 = 20,
4299 TEXTURE_DATA_FORMAT_DEPTH_COMP16 = 21,
4300 TEXTURE_DATA_FORMAT_DEPTH_COMP24 = 22,
4301 TEXTURE_DATA_FORMAT_DEPTH_COMP32F = 23,
4302 TEXTURE_DATA_FORMAT_DEPTH24_X8 = 24,
4303 TEXTURE_DATA_FORMAT_R4 = 25,
4304 TEXTURE_DATA_FORMAT_R1 = 26,
4305 TEXTURE_DATA_FORMAT_S8 = 27,
4306 TEXTURE_DATA_FORMAT_S16 = 28,
4307 TEXTURE_DATA_FORMAT_R32F = 29,
4308 TEXTURE_DATA_FORMAT_RG32F = 30,
4309 TEXTURE_DATA_FORMAT_RGBA32F = 31,
4310 TEXTURE_DATA_FORMAT_RGB8_ETC2 = 32,
4311 TEXTURE_DATA_FORMAT_RGB8_PUNCHTHROUGH_ALPHA1 = 33,
4312 TEXTURE_DATA_FORMAT_R11_EAC = 34,
4313 TEXTURE_DATA_FORMAT_SIGNED_R11_EAC = 35,
4314 TEXTURE_DATA_FORMAT_RG11_EAC = 36,
4315 TEXTURE_DATA_FORMAT_SIGNED_RG11_EAC = 37,
4316 TEXTURE_DATA_FORMAT_RGBA8_ETC2_EAC = 38,
4317 TEXTURE_DATA_FORMAT_YCBCR_LUMA = 39,
4318 TEXTURE_DATA_FORMAT_YCBCR_420_CHROMA = 40,
4319 TEXTURE_DATA_FORMAT_BC1 = 48,
4320 TEXTURE_DATA_FORMAT_BC2 = 49,
4321 TEXTURE_DATA_FORMAT_BC3 = 50,
4322 TEXTURE_DATA_FORMAT_ASTC_4X4 = 64,
4323 TEXTURE_DATA_FORMAT_ASTC_5X4 = 65,
4324 TEXTURE_DATA_FORMAT_ASTC_5X5 = 66,
4325 TEXTURE_DATA_FORMAT_ASTC_6X5 = 67,
4326 TEXTURE_DATA_FORMAT_ASTC_6X6 = 68,
4327 TEXTURE_DATA_FORMAT_ASTC_8X5 = 69,
4328 TEXTURE_DATA_FORMAT_ASTC_8X6 = 70,
4329 TEXTURE_DATA_FORMAT_ASTC_8X8 = 71,
4330 TEXTURE_DATA_FORMAT_ASTC_10X5 = 72,
4331 TEXTURE_DATA_FORMAT_ASTC_10X6 = 73,
4332 TEXTURE_DATA_FORMAT_ASTC_10X8 = 74,
4333 TEXTURE_DATA_FORMAT_ASTC_10X10 = 75,
4334 TEXTURE_DATA_FORMAT_ASTC_12X10 = 76,
4335 TEXTURE_DATA_FORMAT_ASTC_12X12 = 77,
4336 TEXTURE_DATA_FORMAT_R8I = 96,
4337 TEXTURE_DATA_FORMAT_R8UI = 97,
4338 TEXTURE_DATA_FORMAT_RG8I = 98,
4339 TEXTURE_DATA_FORMAT_RG8UI = 99,
4340 TEXTURE_DATA_FORMAT_RGBA8I = 100,
4341 TEXTURE_DATA_FORMAT_RGBA8UI = 101,
4342 TEXTURE_DATA_FORMAT_R16I = 102,
4343 TEXTURE_DATA_FORMAT_R16UI = 103,
4344 TEXTURE_DATA_FORMAT_RG16I = 104,
4345 TEXTURE_DATA_FORMAT_RG16UI = 105,
4346 TEXTURE_DATA_FORMAT_RGBA16I = 106,
4347 TEXTURE_DATA_FORMAT_RGBA16UI = 107,
4348 TEXTURE_DATA_FORMAT_R32I = 108,
4349 TEXTURE_DATA_FORMAT_R32UI = 109,
4350 TEXTURE_DATA_FORMAT_RG32I = 110,
4351 TEXTURE_DATA_FORMAT_RG32UI = 111,
4352 TEXTURE_DATA_FORMAT_RGBA32I = 112,
4353 TEXTURE_DATA_FORMAT_RGBA32UI = 113,
4354 TEXTURE_DATA_FORMAT_RGB10_A2UI = 114,
4355 TEXTURE_DATA_FORMAT_A1_RGB5 = 115,
4356 };
4357
4358 #endif /* V3D33_PACK_H */
4359