sync-ing asm and dis for minimal shaders
[vulkan-misc.git] / 2d / kickstart / vk_types.h
blob28c778da69d2cbc92133b1e9257b90f55cac68da
1 #ifndef VK_TYPES_H
2 #define VK_TYPES_H
3 /*
4 * this is public domain without any warranties of any kind
5 * Sylvain BERTRAND
6 */
7 /* XXX: KEEP AN EYE ON ABBREVIATIONS */
8 /*
9 * XXX: we are fixing vulkan ABI which made the huge mistake to use
10 * enums as function parameters or function return values.
12 #include <stddef.h>
13 #include <xcb.h> /* we use the xcb wsi */
14 #include "app_core_types.h"
15 /* macro */
16 /*----------------------------------------------------------------------------*/
17 #define vk_true 1
18 #define vk_false 0
19 #define vk_whole_sz 0xffffffffffffffff
20 #define vk_q_fam_ignored 0xffffffff
21 /*----------------------------------------------------------------------------*/
22 #define VK_VERSION_MAJOR(x) (x >> 22)
23 #define VK_VERSION_MINOR(x) ((x >> 12) & 0x3ff)
24 #define VK_VERSION_PATCH(x) (x & 0xfff)
25 /* macro */
26 /******************************************************************************/
27 /* types */
29 * 64 bits platforms: enums do default to 32 bits, but can go up to 64 bits
30 * based on the range of values they hold. this is important for
31 * vulkan ABI which we will fix.
32 * _individually_, each value is defaulted to 32bits, if possible, and signed
33 * or not.
34 * XXX: All vulkan enums use 32 bits storage
36 enum {
37 vk_err_out_of_host_mem = -1,
38 /*--------------------------------------------------------------------*/
39 vk_success = 0,
40 vk_incomplete = 5,
41 vk_r_enum_max = 0x7fffffff
44 enum {
45 vk_struct_type_instance_create_info = 1,
46 vk_struct_type_dev_q_create_info = 2,
47 vk_struct_type_dev_create_info = 3,
48 vk_struct_type_submit_info = 4,
49 vk_struct_type_mem_alloc_info = 5,
50 vk_struct_type_fence_create_info = 8,
51 vk_struct_type_sem_create_info = 9,
52 vk_struct_type_img_create_info = 14,
53 vk_struct_type_cmdpool_create_info = 39,
54 vk_struct_type_cmdbuf_alloc_info = 40,
55 vk_struct_type_cmdbuf_begin_info = 42,
56 vk_struct_type_img_mem_barrier = 45,
57 /* extension number 2 or index 1, offset 0 */
58 vk_struct_type_swpchn_create_info = 1000000000 + 1000 + 0,
59 /* extension number 2 or index 1, offset 1 */
60 vk_struct_type_present_info = 1000000000 + 1000 + 1,
61 /* extension number 6 or index 5, offset 0 */
62 vk_struct_type_xcb_surf_create_info = 1000000000 + 5000 + 0,
63 /* extension number 60 or index 59, offset 1 */
64 vk_struct_type_phydev_props = 1000000000 + 59000 + 1,
65 /* extension number 60 or index 59, offset 5 */
66 vk_struct_type_q_fam_props = 1000000000 + 59000 + 5,
67 /* extension number 60 or index 59, offset 6 */
68 vk_struct_type_phydev_mem_props = 1000000000 + 59000 + 6,
69 /* extension number 60 or index 59, offset 10 */
70 vk_struct_type_acquire_next_img_info = 1000000000 + 59000 + 10,
71 /* extension number 91 or index 90, offset 0 */
72 vk_struct_type_surf_caps = 1000000000 + 90000 + 0,
73 /* extension number 120 or index 119, offset 0 */
74 vk_struct_type_phydev_surf_info = 1000000000 + 119000 + 0,
75 /* extension number 120 or index 119, offset 2 */
76 vk_struct_type_surf_texel_mem_blk_conf = 1000000000 + 119000 + 2,
77 /* extension number 147 or index 146, offset 1 */
78 vk_struct_type_img_mem_rqmts_info = 1000000000 + 146000 + 1,
79 /* extension number 147 or index 146, offset 3 */
80 vk_struct_type_mem_rqmts = 1000000000 + 146000 + 3,
81 /* extension number 158 or index 157, offset 1 */
82 vk_struct_type_bind_img_mem_info = 1000000000 + 157000 + 1,
83 vk_struct_type_enum_max = 0x7fffffff
86 struct vk_instance_create_info_t {
87 u32 type;
88 void *next;
89 u32 flags;
90 void *app_info; /* allow easy hidden driver optimizations: no! */
91 u32 enabled_layers_n;
92 u8 **enabled_layer_names;
93 u32 enabled_exts_n;
94 u8 **enabled_ext_names;
97 #define VK_MAX_EXT_NAME_SZ 256
98 struct vk_ext_props_t {
99 u8 name[VK_MAX_EXT_NAME_SZ];
100 u32 spec_version;
103 #define VK_MAX_DESC_SZ 256
104 struct vk_layer_props_t {
105 u8 name[VK_MAX_EXT_NAME_SZ];
106 u32 spec_version;
107 u32 implementation_version;
108 u8 desc[VK_MAX_DESC_SZ];
111 enum {
112 vk_phydev_type_other = 0,
113 vk_phydev_type_integrated_gpu = 1,
114 vk_phydev_type_discrete_gpu = 2,
115 vk_phydev_type_virtual_gpu = 3,
116 vk_phydev_type_cpu = 4,
117 vk_phydev_type_enum_max = 0x7fffffff
120 struct vk_phydev_limits_t {
121 u32 not_used_00[11];
122 u64 not_used_01[2];
123 u32 not_used_02[51];
124 float not_used_03[2];
125 u32 not_used_04[3];
126 float not_used_05[2];
127 u32 not_used_06;
128 size_t not_used_07;
129 u64 not_used_08[3];
130 u32 not_used_09[4];
131 float not_used_10[2];
132 u32 not_used_11[16];
133 float not_used_12;
134 u32 not_used_13[4];
135 float not_used_14[6];
136 u32 not_used_15[2];
137 u64 not_used_16[3];
140 struct vk_phydev_sparse_props_t {
141 u32 not_used[5];
144 /*----------------------------------------------------------------------------*/
145 #define VK_MAX_PHYDEV_NAME_SZ 256
146 #define VK_UUID_SZ 16
147 struct vk_phydev_props_core_t {
148 u32 api_version;
149 u32 driver_version;
150 u32 vendor_id;
151 u32 dev_id;
152 u32 dev_type;
153 u8 name[VK_MAX_PHYDEV_NAME_SZ];
154 u8 pipeline_cache_uuid[VK_UUID_SZ];
155 struct vk_phydev_limits_t limits;
156 struct vk_phydev_sparse_props_t sparse_props;
158 /* the vulkan 1.1 version */
159 struct vk_phydev_props_t {
160 u32 type;
161 void *next;
162 struct vk_phydev_props_core_t core;
164 /*----------------------------------------------------------------------------*/
165 enum {
166 vk_q_gfx_bit = 0x00000001,
167 vk_q_compute_bit = 0x00000002,
168 vk_q_transfer_bit = 0x00000004,
169 vk_q_sparse_binding_bit = 0x00000008,
170 vk_q_protected_bit = 0x00000010,
171 vk_q_flag_bits_enum_max = 0x7fffffff
174 struct vk_extent_3d_t {
175 u32 width;
176 u32 height;
177 u32 depth;
179 /*----------------------------------------------------------------------------*/
180 struct vk_q_fam_props_core_t {
181 u32 flags;
182 u32 qs_n;
183 u32 timestamp_valid_bits;
184 struct vk_extent_3d_t min_img_transfer_granularity;
187 struct vk_q_fam_props_t {
188 u32 type;
189 void *next;
190 struct vk_q_fam_props_core_t core;
192 /*----------------------------------------------------------------------------*/
193 struct vk_phydev_features_t {
194 u32 not_used[55];
197 struct vk_dev_q_create_info_t {
198 u32 type;
199 void *next;
200 u32 flags;
201 u32 q_fam;
202 u32 qs_n;
203 float *q_prios;
206 struct vk_dev_create_info_t {
207 u32 type;
208 void *next;
209 u32 flags;
210 u32 q_create_infos_n;
211 struct vk_dev_q_create_info_t *q_create_infos;
212 u32 do_not_use_0;
213 void *do_not_use_1;
214 u32 enabled_exts_n;
215 u8 **enabled_ext_names;
216 void *do_not_use_2;
219 enum {
220 vk_cmdpool_create_transient_bit = 0x00000001,
221 vk_cmdpool_create_reset_cmdbuf_bit = 0x00000002,
222 vk_cmdpool_create_flag_bits_enum_max = 0x7fffffff
225 struct vk_cmdpool_create_info_t {
226 u32 type;
227 void *next;
228 u32 flags;
229 u32 q_fam;
232 struct vk_xcb_surf_create_info_t {
233 u32 type;
234 void *next;
235 u32 flags;
236 xcb_connection_t *c;
237 xcb_window_t win;
240 struct vk_phydev_surf_info_t {
241 u32 type;
242 void *next;
243 void *surf;
246 enum {
247 vk_texel_mem_blk_fmt_undefined = 0,
248 vk_texel_mem_blk_fmt_b8g8r8a8_unorm = 44,
249 vk_texel_mem_blk_fmt_b8g8r8a8_srgb = 50,
250 vk_texel_mem_blk_fmt_enum_max = 0x7fffffff
253 enum {
254 vk_color_space_srgb_nonlinear = 0,
255 vk_color_space_enum_max = 0x7fffffff
258 struct vk_surf_texel_mem_blk_conf_core_t {
259 u32 fmt;
260 u32 color_space;
263 struct vk_surf_texel_mem_blk_conf_t {
264 u32 type;
265 void *next;
266 struct vk_surf_texel_mem_blk_conf_core_t core;
268 /*----------------------------------------------------------------------------*/
269 enum {
270 vk_mem_prop_dev_local_bit = 0x00000001,
271 vk_mem_prop_host_visible_bit = 0x00000002,
272 vk_mem_prop_host_cached_bit = 0x00000008,
273 vk_mem_prop_flag_bits_enum_max = 0x7fffffff
276 struct vk_mem_type_t {
277 u32 prop_flags;
278 u32 heap;
280 /*----------------------------------------------------------------------------*/
281 enum {
282 vk_mem_heap_dev_local_bit = 0x00000001,
283 vk_mem_heap_multi_instance_bit = 0x00000002,
284 vk_mem_heap_flag_bits_enum_max = 0x7FFFFFFF
287 struct vk_mem_heap_t {
288 u64 sz;
289 u32 flags;
291 /*----------------------------------------------------------------------------*/
292 #define VK_MEM_TYPES_N_MAX 32
293 #define VK_MEM_HEAPS_N_MAX 16
294 struct vk_phydev_mem_props_core_t {
295 u32 mem_types_n;
296 struct vk_mem_type_t mem_types[VK_MEM_TYPES_N_MAX];
297 u32 mem_heaps_n;
298 struct vk_mem_heap_t mem_heaps[VK_MEM_HEAPS_N_MAX];
301 struct vk_phydev_mem_props_t {
302 u32 type;
303 void *next;
304 struct vk_phydev_mem_props_core_t core;
306 /*----------------------------------------------------------------------------*/
307 struct vk_extent_2d_t {
308 u32 width;
309 u32 height;
312 enum {
313 vk_surf_transform_identity_bit = 0x00000001,
314 vk_surf_transform_flag_bits_enum_max = 0x7fffffff
317 enum {
318 vk_composite_alpha_opaque_bit = 0x00000001,
319 vk_composite_alpha_flag_bits_enum_max = 0x7fffffff
322 enum {
323 vk_img_usage_transfer_src_bit = 0x00000001,
324 vk_img_usage_transfer_dst_bit = 0x00000002,
325 vk_img_usage_color_attachment_bit = 0x00000010,
326 vk_img_usage_flag_bits_enum_max = 0x7fffffff
329 struct vk_surf_caps_core_t {
330 u32 imgs_n_min;
331 u32 imgs_n_max;
332 struct vk_extent_2d_t current_extent;
333 struct vk_extent_2d_t img_extent_min;
334 struct vk_extent_2d_t img_extent_max;
335 u32 img_array_layers_n_max;
336 u32 supported_transforms;
337 u32 current_transform;
338 u32 supported_composite_alpha;
339 u32 supported_img_usage_flags;
342 struct vk_surf_caps_t {
343 u32 type;
344 void *next;
345 struct vk_surf_caps_core_t core;
346 u32 flags;
347 void *surf;
348 u32 imgs_n;
351 /*----------------------------------------------------------------------------*/
352 enum {
353 vk_sharing_mode_exclusive = 0,
354 vk_sharing_mode_enum_max = 0x7fffffff
357 enum {
358 vk_present_mode_immediate = 0,
359 vk_present_mode_mailbox = 1,
360 vk_present_mode_fifo = 2,
361 vk_present_mode_fifo_relaxed = 3,
362 vk_present_mode_enum_max = 0x7fffffff
365 struct vk_swpchn_create_info_t {
366 u32 type;
367 void *next;
368 u32 flags;
369 void *surf;
370 u32 imgs_n_min;
371 u32 img_texel_mem_blk_fmt;
372 u32 img_color_space;
373 struct vk_extent_2d_t img_extent;
374 u32 img_layers_n;
375 u32 img_usage;
376 u32 img_sharing_mode;
377 u32 q_fams_n;
378 u32 *q_fams;
379 u32 pre_transform;
380 u32 composite_alpha;
381 u32 present_mode;
382 u32 clipped;
383 void *old_swpchn;
386 enum {
387 vk_img_type_2d = 1,
388 vk_img_type_enum_max = 0x7fffffff
391 enum {
392 vk_samples_n_1_bit = 0x00000001,
393 vk_samples_n_enum_max = 0x7fffffff
396 enum {
397 vk_img_tiling_optimal = 0,
398 vk_img_tiling_linear = 1,
399 vk_img_tiling_enum_max = 0x7fffffff
402 enum {
403 vk_img_create_flag_2d_array_compatible_bit = 0x00000002,
404 vk_img_create_flag_enum_max = 0x7fffffff
407 enum {
408 vk_img_layout_undefined = 0,
409 vk_img_layout_general = 1,
410 /* extension number 2 or index 1, offset 2 */
411 vk_img_layout_present = 1000000000 + 1000 + 2,
412 vk_img_layout_enum_n_max = 0x7fffffff
415 struct vk_img_create_info_t {
416 u32 type;
417 void *next;
418 u32 flags;
419 u32 img_type;
420 u32 texel_mem_blk_fmt;
421 struct vk_extent_3d_t extent;
422 u32 mip_lvls_n;
423 u32 array_layers_n;
424 u32 samples_n; /* flags */
425 u32 img_tiling;
426 u32 usage;
427 u32 sharing_mode;
428 u32 q_fams_n;
429 u32 *q_fams;
430 u32 initial_layout;
433 struct vk_img_mem_rqmts_info_t {
434 u32 type;
435 void *next;
436 void *img;
439 struct vk_mem_rqmts_core_t {
440 u64 sz;
441 u64 alignment;
442 /*idxs of bits are idxs in mem types of vk_phydev_mem_props_core_t */
443 u32 mem_type_bits;
446 struct vk_mem_rqmts_t {
447 u32 type;
448 void *next;
449 struct vk_mem_rqmts_core_t core;
452 struct vk_mem_alloc_info_t {
453 u32 type;
454 void *next;
455 u64 sz;
456 u32 mem_type_idx; /* in the physical device array of memory types */
459 struct vk_bind_img_mem_info_t {
460 u32 type;
461 void *next;
462 void *img;
463 void *mem;
464 u64 offset;
467 enum {
468 vk_pipeline_stage_top_of_pipe_bit = (1 << 0),
469 vk_pipeline_stage_bottom_of_pipe_bit = (1 << 13),
470 vk_pipeline_stage_enum_max = 0x7fffffff
473 enum {
474 vk_img_aspect_color_bit = 1,
475 vk_img_aspect_enum_max = 0x7fffffff
478 struct vk_img_subrsrc_range_t {
479 u32 aspect;
480 u32 base_mip_lvl;
481 u32 lvls_n;
482 u32 base_array_layer;
483 u32 array_layers_n;
486 struct vk_img_mem_barrier_t {
487 u32 type;
488 void *next;
489 u32 src_access;
490 u32 dst_access;
491 u32 old_layout;
492 u32 new_layout;
493 u32 src_q_fam;
494 u32 dst_q_fam;
495 void *img;
496 struct vk_img_subrsrc_range_t subrsrc_range;
499 enum {
500 vk_cmdbuf_lvl_primary = 0,
501 vk_cmdbuf_lvl_enum_max = 0x7fffffff
504 struct vk_cmdbuf_alloc_info_t {
505 u32 type;
506 void *next;
507 void *cmdpool;
508 u32 lvl;
509 u32 cmdbufs_n;
512 enum {
513 vk_cmdbuf_usage_one_time_submit_bit = 0x00000001,
514 vk_cmdbuf_usage_enum_max = 0x7fffffff
517 struct vk_cmdbuf_begin_info_t {
518 u32 type;
519 void *next;
520 u32 flags;
521 void *do_not_use;
524 struct vk_submit_info_t {
525 u32 type;
526 void *next;
527 u32 wait_sems_n;
528 void **wait_sems;
529 u32* wait_dst_stages;
530 u32 cmdbufs_n;
531 void **cmdbufs;
532 u32 signal_sems_n;
533 void **signal_sems;
536 struct vk_img_subrsrc_t {
537 u32 aspect;
538 u32 mip_lvl;
539 u32 array_layer;
542 struct vk_subrsrc_layout_t {
543 u64 offset;
544 u64 sz;
545 u64 row_pitch;
546 u64 array_pitch;
547 u64 depth_pitch;
550 struct vk_acquire_next_img_info_t {
551 u32 type;
552 void *next;
553 void *swpchn;
554 u64 timeout;
555 void *sem;
556 void *fence;
557 u32 devs;
560 struct vk_fence_create_info_t {
561 u32 type;
562 void *next;
563 u32 flags;
566 struct vk_img_subrsrc_layers_t {
567 u32 aspect;
568 u32 mip_lvl;
569 u32 base_array_layer;
570 u32 array_layers_n;
573 struct vk_offset_3d_t {
574 u32 x;
575 u32 y;
576 u32 z;
579 struct vk_img_blit_t {
580 struct vk_img_subrsrc_layers_t src_subrsrc;
581 struct vk_offset_3d_t src_offsets[2];
582 struct vk_img_subrsrc_layers_t dst_subrsrc;
583 struct vk_offset_3d_t dst_offsets[2];
586 struct vk_present_info_t {
587 u32 type;
588 void *next;
589 u32 wait_sems_n;
590 void **wait_sems;
591 u32 swpchns_n;
592 void **swpchns;
593 u32 *idxs;
594 s32 *results;
597 struct vk_sem_create_info_t {
598 u32 type;
599 void *next;
600 u32 flags;
602 /******************************************************************************/
603 /* dev function pointers prototypes with some namespace/local keywords */
604 #define vk_get_dev_q(...) \
605 app_surf.dev.dl_vk_get_dev_q(app_surf.dev.vk,##__VA_ARGS__)
607 #define vk_create_cmdpool(...) \
608 app_surf.dev.dl_vk_create_cmdpool(app_surf.dev.vk,##__VA_ARGS__)
610 #define vk_create_swpchn(...) \
611 app_surf.dev.dl_vk_create_swpchn(app_surf.dev.vk,##__VA_ARGS__)
613 #define vk_get_swpchn_imgs(...) \
614 app_surf.dev.dl_vk_get_swpchn_imgs(app_surf.dev.vk,##__VA_ARGS__)
616 #define vk_create_img(...) \
617 app_surf.dev.dl_vk_create_img(app_surf.dev.vk,##__VA_ARGS__)
619 #define vk_get_img_mem_rqmts(...) \
620 app_surf.dev.dl_vk_get_img_mem_rqmts(app_surf.dev.vk,##__VA_ARGS__)
622 #define vk_alloc_mem(...) \
623 app_surf.dev.dl_vk_alloc_mem(app_surf.dev.vk,##__VA_ARGS__)
625 #define vk_bind_img_mem(...) \
626 app_surf.dev.dl_vk_bind_img_mem(app_surf.dev.vk,##__VA_ARGS__)
628 #define vk_map_mem(...) \
629 app_surf.dev.dl_vk_map_mem(app_surf.dev.vk,##__VA_ARGS__)
631 #define vk_alloc_cmdbufs(...) \
632 app_surf.dev.dl_vk_alloc_cmdbufs(app_surf.dev.vk,##__VA_ARGS__)
634 #define vk_free_cmdbufs(...) \
635 app_surf.dev.dl_vk_free_cmdbufs(app_surf.dev.vk,##__VA_ARGS__)
637 #define vk_begin_cmdbuf(...) \
638 app_surf.dev.dl_vk_begin_cmdbuf(__VA_ARGS__)
640 #define vk_end_cmdbuf(...) \
641 app_surf.dev.dl_vk_end_cmdbuf(__VA_ARGS__)
643 #define vk_cmd_pipeline_barrier(...) \
644 app_surf.dev.dl_vk_cmd_pipeline_barrier(__VA_ARGS__)
646 #define vk_q_submit(...) \
647 app_surf.dev.dl_vk_q_submit(__VA_ARGS__)
649 #define vk_q_wait_idle(...) \
650 app_surf.dev.dl_vk_q_wait_idle(__VA_ARGS__)
652 #define vk_get_img_subrsrc_layout(...) \
653 app_surf.dev.dl_vk_get_img_subrsrc_layout(app_surf.dev.vk,##__VA_ARGS__)
655 #define vk_acquire_next_img(...) \
656 app_surf.dev.dl_vk_acquire_next_img(app_surf.dev.vk,##__VA_ARGS__)
658 #define vk_create_fence(...) \
659 app_surf.dev.dl_create_fence(app_surf.dev.vk,##__VA_ARGS__)
661 #define vk_reset_cmdbuf(...) \
662 app_surf.dev.dl_vk_reset_cmdbuf(__VA_ARGS__)
664 #define vk_cmd_blit_img(...) \
665 app_surf.dev.dl_vk_cmd_blit_img(__VA_ARGS__)
667 #define vk_wait_for_fences(...) \
668 app_surf.dev.dl_vk_wait_for_fences(app_surf.dev.vk,##__VA_ARGS__)
670 #define vk_reset_fences(...) \
671 app_surf.dev.dl_vk_reset_fences(app_surf.dev.vk,##__VA_ARGS__)
673 #define vk_q_present(...) \
674 app_surf.dev.dl_vk_q_present(__VA_ARGS__)
676 #define vk_create_sem(...) \
677 app_surf.dev.dl_vk_create_sem(app_surf.dev.vk,##__VA_ARGS__)
678 /*----------------------------------------------------------------------------*/
679 #define VK_DEV_SYMS \
680 void (*dl_vk_get_dev_q)(void *dev, u32 fam, u32 q_idx, void **q); \
681 s32 (*dl_vk_create_cmdpool)( \
682 void *dev, \
683 struct vk_cmdpool_create_info_t *create_info, \
684 void *allocator, \
685 void **vk_cmdpool); \
686 s32 (*dl_vk_create_swpchn)( \
687 void *dev, \
688 struct vk_swpchn_create_info_t *info, \
689 void *allocator, \
690 void **swpchn); \
691 s32 (*dl_vk_get_swpchn_imgs)( \
692 void *dev, \
693 void *swpchn, \
694 u32 *imgs_n, \
695 void **imgs); \
696 s32 (*dl_vk_create_img)( \
697 void *dev, \
698 struct vk_img_create_info_t *info, \
699 void *allocator, \
700 void **img); \
701 s32 (*dl_vk_get_img_mem_rqmts)( \
702 void *dev, \
703 struct vk_img_mem_rqmts_info_t *info, \
704 struct vk_mem_rqmts_t *mem_rqmts); \
705 s32 (*dl_vk_alloc_mem)( \
706 void *dev, \
707 struct vk_mem_alloc_info_t *info, \
708 void *allocator, \
709 void **mem); \
710 s32 (*dl_vk_bind_img_mem)( \
711 void *dev, \
712 u32 infos_n, \
713 struct vk_bind_img_mem_info_t *infos); \
714 s32 (*dl_vk_map_mem)( \
715 void *dev, \
716 void *mem, \
717 u64 offset, \
718 u64 sz, \
719 u32 flags, \
720 void **data); \
721 s32 (*dl_vk_alloc_cmdbufs)( \
722 void *dev, \
723 struct vk_cmdbuf_alloc_info_t *info, \
724 void **cmdbufs); \
725 void (*dl_vk_free_cmdbufs)( \
726 void *dev, \
727 void *cmdpool, \
728 u32 cmdbufs_n, \
729 void **cmdbufs); \
730 s32 (*dl_vk_begin_cmdbuf)( \
731 void *cmdbuf, \
732 struct vk_cmdbuf_begin_info_t *info); \
733 s32 (*dl_vk_end_cmdbuf)(void *cmdbuf); \
734 void (*dl_vk_cmd_pipeline_barrier)( \
735 void *cmdbuf, \
736 u32 src_stage, \
737 u32 dst_stage, \
738 u32 dependency_flags, \
739 u32 mem_barriers_n, \
740 void *mem_barriers, \
741 u32 buf_mem_barriers_n, \
742 void *buf_mem_barriers, \
743 u32 img_mem_barriers_n, \
744 struct vk_img_mem_barrier_t *img_mem_barriers); \
745 s32 (*dl_vk_q_submit)( \
746 void *q, \
747 u32 submits_n, \
748 struct vk_submit_info_t *submits, \
749 void *fence); \
750 s32 (*dl_vk_q_wait_idle)(void *q); \
751 void (*dl_vk_get_img_subrsrc_layout)( \
752 void *dev, \
753 void *img, \
754 struct vk_img_subrsrc_t *subrsrc, \
755 struct vk_subrsrc_layout_t *layout); \
756 s32 (*dl_vk_acquire_next_img)( \
757 void *dev, \
758 struct vk_acquire_next_img_info_t *info, \
759 u32 *img_idx); \
760 s32 (*dl_vk_create_fence)( \
761 void *dev, \
762 struct vk_fence_create_info_t *info, \
763 void *allocator, \
764 void **fence); \
765 s32 (*dl_vk_reset_cmdbuf)( \
766 void *cmdbuf, \
767 u32 flags); \
768 void (*dl_vk_cmd_blit_img)( \
769 void *cmdbuf, \
770 void *src_img, \
771 u32 src_img_layout, \
772 void *dst_img, \
773 u32 dst_img_layout, \
774 u32 regions_n, \
775 struct vk_img_blit_t *regions, \
776 u32 filter); \
777 s32 (*dl_vk_wait_for_fences)( \
778 void *dev, \
779 u32 fences_n, \
780 void **fences, \
781 u32 wail_all, \
782 u64 timeout); \
783 s32 (*dl_vk_reset_fences)( \
784 void *dev, \
785 u32 fences_n, \
786 void **fences); \
787 s32 (*dl_vk_q_present)( \
788 void *q, \
789 struct vk_present_info_t *info); \
790 s32 (*dl_vk_create_sem)( \
791 void *dev, \
792 struct vk_sem_create_info_t *info, \
793 void *allocator, \
794 void **sem);
795 #endif