forked from vulkan-go/vulkan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vulkan.go
2214 lines (2053 loc) · 138 KB
/
vulkan.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
// WARNING: This file has automatically been generated on Wed, 11 May 2022 13:45:21 CEST.
// Code generated by https://git.io/c-for-go. DO NOT EDIT.
package vulkan
/*
#cgo CFLAGS: -I. -DVK_NO_PROTOTYPES
#include "vulkan/vulkan.h"
#include "vk_wrapper.h"
#include "vk_bridge.h"
#include <stdlib.h>
#include "cgo_helpers.h"
*/
import "C"
import (
"runtime"
"unsafe"
)
// CreateInstance function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateInstance.html
func CreateInstance(pCreateInfo *InstanceCreateInfo, pAllocator *AllocationCallbacks, pInstance *Instance) Result {
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpInstance, cpInstanceAllocMap := (*C.VkInstance)(unsafe.Pointer(pInstance)), cgoAllocsUnknown
__ret := C.callVkCreateInstance(cpCreateInfo, cpAllocator, cpInstance)
runtime.KeepAlive(cpInstanceAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyInstance function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyInstance.html
func DestroyInstance(instance Instance, pAllocator *AllocationCallbacks) {
cinstance, cinstanceAllocMap := *(*C.VkInstance)(unsafe.Pointer(&instance)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyInstance(cinstance, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cinstanceAllocMap)
}
// EnumeratePhysicalDevices function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEnumeratePhysicalDevices.html
func EnumeratePhysicalDevices(instance Instance, pPhysicalDeviceCount *uint32, pPhysicalDevices []PhysicalDevice) Result {
cinstance, cinstanceAllocMap := *(*C.VkInstance)(unsafe.Pointer(&instance)), cgoAllocsUnknown
cpPhysicalDeviceCount, cpPhysicalDeviceCountAllocMap := (*C.uint32_t)(unsafe.Pointer(pPhysicalDeviceCount)), cgoAllocsUnknown
cpPhysicalDevices, cpPhysicalDevicesAllocMap := copyPPhysicalDeviceBytes((*sliceHeader)(unsafe.Pointer(&pPhysicalDevices)))
__ret := C.callVkEnumeratePhysicalDevices(cinstance, cpPhysicalDeviceCount, cpPhysicalDevices)
runtime.KeepAlive(cpPhysicalDevicesAllocMap)
runtime.KeepAlive(cpPhysicalDeviceCountAllocMap)
runtime.KeepAlive(cinstanceAllocMap)
__v := (Result)(__ret)
return __v
}
// GetPhysicalDeviceFeatures function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPhysicalDeviceFeatures.html
func GetPhysicalDeviceFeatures(physicalDevice PhysicalDevice, pFeatures *PhysicalDeviceFeatures) {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpFeatures, cpFeaturesAllocMap := pFeatures.PassRef()
C.callVkGetPhysicalDeviceFeatures(cphysicalDevice, cpFeatures)
runtime.KeepAlive(cpFeaturesAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
}
// GetPhysicalDeviceFormatProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPhysicalDeviceFormatProperties.html
func GetPhysicalDeviceFormatProperties(physicalDevice PhysicalDevice, format Format, pFormatProperties *FormatProperties) {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cformat, cformatAllocMap := (C.VkFormat)(format), cgoAllocsUnknown
cpFormatProperties, cpFormatPropertiesAllocMap := pFormatProperties.PassRef()
C.callVkGetPhysicalDeviceFormatProperties(cphysicalDevice, cformat, cpFormatProperties)
runtime.KeepAlive(cpFormatPropertiesAllocMap)
runtime.KeepAlive(cformatAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
}
// GetPhysicalDeviceImageFormatProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPhysicalDeviceImageFormatProperties.html
func GetPhysicalDeviceImageFormatProperties(physicalDevice PhysicalDevice, format Format, kind ImageType, tiling ImageTiling, usage ImageUsageFlags, flags ImageCreateFlags, pImageFormatProperties *ImageFormatProperties) Result {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cformat, cformatAllocMap := (C.VkFormat)(format), cgoAllocsUnknown
ckind, ckindAllocMap := (C.VkImageType)(kind), cgoAllocsUnknown
ctiling, ctilingAllocMap := (C.VkImageTiling)(tiling), cgoAllocsUnknown
cusage, cusageAllocMap := (C.VkImageUsageFlags)(usage), cgoAllocsUnknown
cflags, cflagsAllocMap := (C.VkImageCreateFlags)(flags), cgoAllocsUnknown
cpImageFormatProperties, cpImageFormatPropertiesAllocMap := pImageFormatProperties.PassRef()
__ret := C.callVkGetPhysicalDeviceImageFormatProperties(cphysicalDevice, cformat, ckind, ctiling, cusage, cflags, cpImageFormatProperties)
runtime.KeepAlive(cpImageFormatPropertiesAllocMap)
runtime.KeepAlive(cflagsAllocMap)
runtime.KeepAlive(cusageAllocMap)
runtime.KeepAlive(ctilingAllocMap)
runtime.KeepAlive(ckindAllocMap)
runtime.KeepAlive(cformatAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// GetPhysicalDeviceProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPhysicalDeviceProperties.html
func GetPhysicalDeviceProperties(physicalDevice PhysicalDevice, pProperties *PhysicalDeviceProperties) {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpProperties, cpPropertiesAllocMap := pProperties.PassRef()
C.callVkGetPhysicalDeviceProperties(cphysicalDevice, cpProperties)
runtime.KeepAlive(cpPropertiesAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
}
// GetPhysicalDeviceQueueFamilyProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPhysicalDeviceQueueFamilyProperties.html
func GetPhysicalDeviceQueueFamilyProperties(physicalDevice PhysicalDevice, pQueueFamilyPropertyCount *uint32, pQueueFamilyProperties []QueueFamilyProperties) {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpQueueFamilyPropertyCount, cpQueueFamilyPropertyCountAllocMap := (*C.uint32_t)(unsafe.Pointer(pQueueFamilyPropertyCount)), cgoAllocsUnknown
cpQueueFamilyProperties, cpQueueFamilyPropertiesAllocMap := unpackArgSQueueFamilyProperties(pQueueFamilyProperties)
C.callVkGetPhysicalDeviceQueueFamilyProperties(cphysicalDevice, cpQueueFamilyPropertyCount, cpQueueFamilyProperties)
packSQueueFamilyProperties(pQueueFamilyProperties, cpQueueFamilyProperties)
runtime.KeepAlive(cpQueueFamilyPropertiesAllocMap)
runtime.KeepAlive(cpQueueFamilyPropertyCountAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
}
// GetPhysicalDeviceMemoryProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPhysicalDeviceMemoryProperties.html
func GetPhysicalDeviceMemoryProperties(physicalDevice PhysicalDevice, pMemoryProperties *PhysicalDeviceMemoryProperties) {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpMemoryProperties, cpMemoryPropertiesAllocMap := pMemoryProperties.PassRef()
C.callVkGetPhysicalDeviceMemoryProperties(cphysicalDevice, cpMemoryProperties)
runtime.KeepAlive(cpMemoryPropertiesAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
}
// CreateDevice function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateDevice.html
func CreateDevice(physicalDevice PhysicalDevice, pCreateInfo *DeviceCreateInfo, pAllocator *AllocationCallbacks, pDevice *Device) Result {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpDevice, cpDeviceAllocMap := (*C.VkDevice)(unsafe.Pointer(pDevice)), cgoAllocsUnknown
__ret := C.callVkCreateDevice(cphysicalDevice, cpCreateInfo, cpAllocator, cpDevice)
runtime.KeepAlive(cpDeviceAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyDevice function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyDevice.html
func DestroyDevice(device Device, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyDevice(cdevice, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// EnumerateInstanceExtensionProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEnumerateInstanceExtensionProperties.html
func EnumerateInstanceExtensionProperties(pLayerName string, pPropertyCount *uint32, pProperties []ExtensionProperties) Result {
cpLayerName, cpLayerNameAllocMap := unpackPCharString(pLayerName)
cpPropertyCount, cpPropertyCountAllocMap := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, cpPropertiesAllocMap := unpackArgSExtensionProperties(pProperties)
__ret := C.callVkEnumerateInstanceExtensionProperties(cpLayerName, cpPropertyCount, cpProperties)
packSExtensionProperties(pProperties, cpProperties)
runtime.KeepAlive(cpPropertiesAllocMap)
runtime.KeepAlive(cpPropertyCountAllocMap)
runtime.KeepAlive(cpLayerNameAllocMap)
__v := (Result)(__ret)
return __v
}
// EnumerateDeviceExtensionProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEnumerateDeviceExtensionProperties.html
func EnumerateDeviceExtensionProperties(physicalDevice PhysicalDevice, pLayerName string, pPropertyCount *uint32, pProperties []ExtensionProperties) Result {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpLayerName, cpLayerNameAllocMap := unpackPCharString(pLayerName)
cpPropertyCount, cpPropertyCountAllocMap := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, cpPropertiesAllocMap := unpackArgSExtensionProperties(pProperties)
__ret := C.callVkEnumerateDeviceExtensionProperties(cphysicalDevice, cpLayerName, cpPropertyCount, cpProperties)
packSExtensionProperties(pProperties, cpProperties)
runtime.KeepAlive(cpPropertiesAllocMap)
runtime.KeepAlive(cpPropertyCountAllocMap)
runtime.KeepAlive(cpLayerNameAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// EnumerateInstanceLayerProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEnumerateInstanceLayerProperties.html
func EnumerateInstanceLayerProperties(pPropertyCount *uint32, pProperties []LayerProperties) Result {
cpPropertyCount, cpPropertyCountAllocMap := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, cpPropertiesAllocMap := unpackArgSLayerProperties(pProperties)
__ret := C.callVkEnumerateInstanceLayerProperties(cpPropertyCount, cpProperties)
packSLayerProperties(pProperties, cpProperties)
runtime.KeepAlive(cpPropertiesAllocMap)
runtime.KeepAlive(cpPropertyCountAllocMap)
__v := (Result)(__ret)
return __v
}
// EnumerateDeviceLayerProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEnumerateDeviceLayerProperties.html
func EnumerateDeviceLayerProperties(physicalDevice PhysicalDevice, pPropertyCount *uint32, pProperties []LayerProperties) Result {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpPropertyCount, cpPropertyCountAllocMap := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, cpPropertiesAllocMap := unpackArgSLayerProperties(pProperties)
__ret := C.callVkEnumerateDeviceLayerProperties(cphysicalDevice, cpPropertyCount, cpProperties)
packSLayerProperties(pProperties, cpProperties)
runtime.KeepAlive(cpPropertiesAllocMap)
runtime.KeepAlive(cpPropertyCountAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// GetDeviceQueue function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceQueue.html
func GetDeviceQueue(device Device, queueFamilyIndex uint32, queueIndex uint32, pQueue *Queue) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cqueueFamilyIndex, cqueueFamilyIndexAllocMap := (C.uint32_t)(queueFamilyIndex), cgoAllocsUnknown
cqueueIndex, cqueueIndexAllocMap := (C.uint32_t)(queueIndex), cgoAllocsUnknown
cpQueue, cpQueueAllocMap := (*C.VkQueue)(unsafe.Pointer(pQueue)), cgoAllocsUnknown
C.callVkGetDeviceQueue(cdevice, cqueueFamilyIndex, cqueueIndex, cpQueue)
runtime.KeepAlive(cpQueueAllocMap)
runtime.KeepAlive(cqueueIndexAllocMap)
runtime.KeepAlive(cqueueFamilyIndexAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// QueueSubmit function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueSubmit.html
func QueueSubmit(queue Queue, submitCount uint32, pSubmits []SubmitInfo, fence Fence) Result {
cqueue, cqueueAllocMap := *(*C.VkQueue)(unsafe.Pointer(&queue)), cgoAllocsUnknown
csubmitCount, csubmitCountAllocMap := (C.uint32_t)(submitCount), cgoAllocsUnknown
cpSubmits, cpSubmitsAllocMap := unpackArgSSubmitInfo(pSubmits)
cfence, cfenceAllocMap := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
__ret := C.callVkQueueSubmit(cqueue, csubmitCount, cpSubmits, cfence)
runtime.KeepAlive(cfenceAllocMap)
packSSubmitInfo(pSubmits, cpSubmits)
runtime.KeepAlive(cpSubmitsAllocMap)
runtime.KeepAlive(csubmitCountAllocMap)
runtime.KeepAlive(cqueueAllocMap)
__v := (Result)(__ret)
return __v
}
// QueueWaitIdle function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueWaitIdle.html
func QueueWaitIdle(queue Queue) Result {
cqueue, cqueueAllocMap := *(*C.VkQueue)(unsafe.Pointer(&queue)), cgoAllocsUnknown
__ret := C.callVkQueueWaitIdle(cqueue)
runtime.KeepAlive(cqueueAllocMap)
__v := (Result)(__ret)
return __v
}
// DeviceWaitIdle function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDeviceWaitIdle.html
func DeviceWaitIdle(device Device) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
__ret := C.callVkDeviceWaitIdle(cdevice)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// AllocateMemory function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateMemory.html
func AllocateMemory(device Device, pAllocateInfo *MemoryAllocateInfo, pAllocator *AllocationCallbacks, pMemory *DeviceMemory) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpAllocateInfo, cpAllocateInfoAllocMap := pAllocateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpMemory, cpMemoryAllocMap := (*C.VkDeviceMemory)(unsafe.Pointer(pMemory)), cgoAllocsUnknown
__ret := C.callVkAllocateMemory(cdevice, cpAllocateInfo, cpAllocator, cpMemory)
runtime.KeepAlive(cpMemoryAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpAllocateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// FreeMemory function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeMemory.html
func FreeMemory(device Device, memory DeviceMemory, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, cmemoryAllocMap := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkFreeMemory(cdevice, cmemory, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cmemoryAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// MapMemory function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkMapMemory.html
func MapMemory(device Device, memory DeviceMemory, offset DeviceSize, size DeviceSize, flags MemoryMapFlags, ppData *unsafe.Pointer) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, cmemoryAllocMap := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
coffset, coffsetAllocMap := (C.VkDeviceSize)(offset), cgoAllocsUnknown
csize, csizeAllocMap := (C.VkDeviceSize)(size), cgoAllocsUnknown
cflags, cflagsAllocMap := (C.VkMemoryMapFlags)(flags), cgoAllocsUnknown
cppData, cppDataAllocMap := ppData, cgoAllocsUnknown
__ret := C.callVkMapMemory(cdevice, cmemory, coffset, csize, cflags, cppData)
runtime.KeepAlive(cppDataAllocMap)
runtime.KeepAlive(cflagsAllocMap)
runtime.KeepAlive(csizeAllocMap)
runtime.KeepAlive(coffsetAllocMap)
runtime.KeepAlive(cmemoryAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// UnmapMemory function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkUnmapMemory.html
func UnmapMemory(device Device, memory DeviceMemory) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, cmemoryAllocMap := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
C.callVkUnmapMemory(cdevice, cmemory)
runtime.KeepAlive(cmemoryAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// FlushMappedMemoryRanges function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFlushMappedMemoryRanges.html
func FlushMappedMemoryRanges(device Device, memoryRangeCount uint32, pMemoryRanges []MappedMemoryRange) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemoryRangeCount, cmemoryRangeCountAllocMap := (C.uint32_t)(memoryRangeCount), cgoAllocsUnknown
cpMemoryRanges, cpMemoryRangesAllocMap := unpackArgSMappedMemoryRange(pMemoryRanges)
__ret := C.callVkFlushMappedMemoryRanges(cdevice, cmemoryRangeCount, cpMemoryRanges)
packSMappedMemoryRange(pMemoryRanges, cpMemoryRanges)
runtime.KeepAlive(cpMemoryRangesAllocMap)
runtime.KeepAlive(cmemoryRangeCountAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// InvalidateMappedMemoryRanges function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkInvalidateMappedMemoryRanges.html
func InvalidateMappedMemoryRanges(device Device, memoryRangeCount uint32, pMemoryRanges []MappedMemoryRange) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemoryRangeCount, cmemoryRangeCountAllocMap := (C.uint32_t)(memoryRangeCount), cgoAllocsUnknown
cpMemoryRanges, cpMemoryRangesAllocMap := unpackArgSMappedMemoryRange(pMemoryRanges)
__ret := C.callVkInvalidateMappedMemoryRanges(cdevice, cmemoryRangeCount, cpMemoryRanges)
packSMappedMemoryRange(pMemoryRanges, cpMemoryRanges)
runtime.KeepAlive(cpMemoryRangesAllocMap)
runtime.KeepAlive(cmemoryRangeCountAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// GetDeviceMemoryCommitment function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceMemoryCommitment.html
func GetDeviceMemoryCommitment(device Device, memory DeviceMemory, pCommittedMemoryInBytes *DeviceSize) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, cmemoryAllocMap := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cpCommittedMemoryInBytes, cpCommittedMemoryInBytesAllocMap := (*C.VkDeviceSize)(unsafe.Pointer(pCommittedMemoryInBytes)), cgoAllocsUnknown
C.callVkGetDeviceMemoryCommitment(cdevice, cmemory, cpCommittedMemoryInBytes)
runtime.KeepAlive(cpCommittedMemoryInBytesAllocMap)
runtime.KeepAlive(cmemoryAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// BindBufferMemory function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBindBufferMemory.html
func BindBufferMemory(device Device, buffer Buffer, memory DeviceMemory, memoryOffset DeviceSize) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbuffer, cbufferAllocMap := *(*C.VkBuffer)(unsafe.Pointer(&buffer)), cgoAllocsUnknown
cmemory, cmemoryAllocMap := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cmemoryOffset, cmemoryOffsetAllocMap := (C.VkDeviceSize)(memoryOffset), cgoAllocsUnknown
__ret := C.callVkBindBufferMemory(cdevice, cbuffer, cmemory, cmemoryOffset)
runtime.KeepAlive(cmemoryOffsetAllocMap)
runtime.KeepAlive(cmemoryAllocMap)
runtime.KeepAlive(cbufferAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// BindImageMemory function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBindImageMemory.html
func BindImageMemory(device Device, image Image, memory DeviceMemory, memoryOffset DeviceSize) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, cimageAllocMap := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cmemory, cmemoryAllocMap := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cmemoryOffset, cmemoryOffsetAllocMap := (C.VkDeviceSize)(memoryOffset), cgoAllocsUnknown
__ret := C.callVkBindImageMemory(cdevice, cimage, cmemory, cmemoryOffset)
runtime.KeepAlive(cmemoryOffsetAllocMap)
runtime.KeepAlive(cmemoryAllocMap)
runtime.KeepAlive(cimageAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// GetBufferMemoryRequirements function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetBufferMemoryRequirements.html
func GetBufferMemoryRequirements(device Device, buffer Buffer, pMemoryRequirements *MemoryRequirements) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbuffer, cbufferAllocMap := *(*C.VkBuffer)(unsafe.Pointer(&buffer)), cgoAllocsUnknown
cpMemoryRequirements, cpMemoryRequirementsAllocMap := pMemoryRequirements.PassRef()
C.callVkGetBufferMemoryRequirements(cdevice, cbuffer, cpMemoryRequirements)
runtime.KeepAlive(cpMemoryRequirementsAllocMap)
runtime.KeepAlive(cbufferAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// GetImageMemoryRequirements function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageMemoryRequirements.html
func GetImageMemoryRequirements(device Device, image Image, pMemoryRequirements *MemoryRequirements) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, cimageAllocMap := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpMemoryRequirements, cpMemoryRequirementsAllocMap := pMemoryRequirements.PassRef()
C.callVkGetImageMemoryRequirements(cdevice, cimage, cpMemoryRequirements)
runtime.KeepAlive(cpMemoryRequirementsAllocMap)
runtime.KeepAlive(cimageAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// GetImageSparseMemoryRequirements function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageSparseMemoryRequirements.html
func GetImageSparseMemoryRequirements(device Device, image Image, pSparseMemoryRequirementCount []uint32, pSparseMemoryRequirements []SparseImageMemoryRequirements) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, cimageAllocMap := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpSparseMemoryRequirementCount, cpSparseMemoryRequirementCountAllocMap := copyPUint32_tBytes((*sliceHeader)(unsafe.Pointer(&pSparseMemoryRequirementCount)))
cpSparseMemoryRequirements, cpSparseMemoryRequirementsAllocMap := unpackArgSSparseImageMemoryRequirements(pSparseMemoryRequirements)
C.callVkGetImageSparseMemoryRequirements(cdevice, cimage, cpSparseMemoryRequirementCount, cpSparseMemoryRequirements)
packSSparseImageMemoryRequirements(pSparseMemoryRequirements, cpSparseMemoryRequirements)
runtime.KeepAlive(cpSparseMemoryRequirementsAllocMap)
runtime.KeepAlive(cpSparseMemoryRequirementCountAllocMap)
runtime.KeepAlive(cimageAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// GetPhysicalDeviceSparseImageFormatProperties function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPhysicalDeviceSparseImageFormatProperties.html
func GetPhysicalDeviceSparseImageFormatProperties(physicalDevice PhysicalDevice, format Format, kind ImageType, samples SampleCountFlagBits, usage ImageUsageFlags, tiling ImageTiling, pPropertyCount []uint32, pProperties []SparseImageFormatProperties) {
cphysicalDevice, cphysicalDeviceAllocMap := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cformat, cformatAllocMap := (C.VkFormat)(format), cgoAllocsUnknown
ckind, ckindAllocMap := (C.VkImageType)(kind), cgoAllocsUnknown
csamples, csamplesAllocMap := (C.VkSampleCountFlagBits)(samples), cgoAllocsUnknown
cusage, cusageAllocMap := (C.VkImageUsageFlags)(usage), cgoAllocsUnknown
ctiling, ctilingAllocMap := (C.VkImageTiling)(tiling), cgoAllocsUnknown
cpPropertyCount, cpPropertyCountAllocMap := copyPUint32_tBytes((*sliceHeader)(unsafe.Pointer(&pPropertyCount)))
cpProperties, cpPropertiesAllocMap := unpackArgSSparseImageFormatProperties(pProperties)
C.callVkGetPhysicalDeviceSparseImageFormatProperties(cphysicalDevice, cformat, ckind, csamples, cusage, ctiling, cpPropertyCount, cpProperties)
packSSparseImageFormatProperties(pProperties, cpProperties)
runtime.KeepAlive(cpPropertiesAllocMap)
runtime.KeepAlive(cpPropertyCountAllocMap)
runtime.KeepAlive(ctilingAllocMap)
runtime.KeepAlive(cusageAllocMap)
runtime.KeepAlive(csamplesAllocMap)
runtime.KeepAlive(ckindAllocMap)
runtime.KeepAlive(cformatAllocMap)
runtime.KeepAlive(cphysicalDeviceAllocMap)
}
// QueueBindSparse function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueBindSparse.html
func QueueBindSparse(queue Queue, bindInfoCount uint32, pBindInfo []BindSparseInfo, fence Fence) Result {
cqueue, cqueueAllocMap := *(*C.VkQueue)(unsafe.Pointer(&queue)), cgoAllocsUnknown
cbindInfoCount, cbindInfoCountAllocMap := (C.uint32_t)(bindInfoCount), cgoAllocsUnknown
cpBindInfo, cpBindInfoAllocMap := unpackArgSBindSparseInfo(pBindInfo)
cfence, cfenceAllocMap := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
__ret := C.callVkQueueBindSparse(cqueue, cbindInfoCount, cpBindInfo, cfence)
runtime.KeepAlive(cfenceAllocMap)
packSBindSparseInfo(pBindInfo, cpBindInfo)
runtime.KeepAlive(cpBindInfoAllocMap)
runtime.KeepAlive(cbindInfoCountAllocMap)
runtime.KeepAlive(cqueueAllocMap)
__v := (Result)(__ret)
return __v
}
// CreateFence function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateFence.html
func CreateFence(device Device, pCreateInfo *FenceCreateInfo, pAllocator *AllocationCallbacks, pFence *Fence) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpFence, cpFenceAllocMap := (*C.VkFence)(unsafe.Pointer(pFence)), cgoAllocsUnknown
__ret := C.callVkCreateFence(cdevice, cpCreateInfo, cpAllocator, cpFence)
runtime.KeepAlive(cpFenceAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyFence function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyFence.html
func DestroyFence(device Device, fence Fence, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfence, cfenceAllocMap := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyFence(cdevice, cfence, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cfenceAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// ResetFences function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetFences.html
func ResetFences(device Device, fenceCount uint32, pFences []Fence) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfenceCount, cfenceCountAllocMap := (C.uint32_t)(fenceCount), cgoAllocsUnknown
cpFences, cpFencesAllocMap := copyPFenceBytes((*sliceHeader)(unsafe.Pointer(&pFences)))
__ret := C.callVkResetFences(cdevice, cfenceCount, cpFences)
runtime.KeepAlive(cpFencesAllocMap)
runtime.KeepAlive(cfenceCountAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// GetFenceStatus function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetFenceStatus.html
func GetFenceStatus(device Device, fence Fence) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfence, cfenceAllocMap := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
__ret := C.callVkGetFenceStatus(cdevice, cfence)
runtime.KeepAlive(cfenceAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// WaitForFences function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkWaitForFences.html
func WaitForFences(device Device, fenceCount uint32, pFences []Fence, waitAll Bool32, timeout uint32) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfenceCount, cfenceCountAllocMap := (C.uint32_t)(fenceCount), cgoAllocsUnknown
cpFences, cpFencesAllocMap := copyPFenceBytes((*sliceHeader)(unsafe.Pointer(&pFences)))
cwaitAll, cwaitAllAllocMap := (C.VkBool32)(waitAll), cgoAllocsUnknown
ctimeout, ctimeoutAllocMap := (C.uint64_t)(timeout), cgoAllocsUnknown
__ret := C.callVkWaitForFences(cdevice, cfenceCount, cpFences, cwaitAll, ctimeout)
runtime.KeepAlive(ctimeoutAllocMap)
runtime.KeepAlive(cwaitAllAllocMap)
runtime.KeepAlive(cpFencesAllocMap)
runtime.KeepAlive(cfenceCountAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// CreateSemaphore function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateSemaphore.html
func CreateSemaphore(device Device, pCreateInfo *SemaphoreCreateInfo, pAllocator *AllocationCallbacks, pSemaphore *Semaphore) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpSemaphore, cpSemaphoreAllocMap := (*C.VkSemaphore)(unsafe.Pointer(pSemaphore)), cgoAllocsUnknown
__ret := C.callVkCreateSemaphore(cdevice, cpCreateInfo, cpAllocator, cpSemaphore)
runtime.KeepAlive(cpSemaphoreAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroySemaphore function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroySemaphore.html
func DestroySemaphore(device Device, semaphore Semaphore, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
csemaphore, csemaphoreAllocMap := *(*C.VkSemaphore)(unsafe.Pointer(&semaphore)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroySemaphore(cdevice, csemaphore, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(csemaphoreAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateEvent function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateEvent.html
func CreateEvent(device Device, pCreateInfo *EventCreateInfo, pAllocator *AllocationCallbacks, pEvent *Event) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpEvent, cpEventAllocMap := (*C.VkEvent)(unsafe.Pointer(pEvent)), cgoAllocsUnknown
__ret := C.callVkCreateEvent(cdevice, cpCreateInfo, cpAllocator, cpEvent)
runtime.KeepAlive(cpEventAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyEvent function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyEvent.html
func DestroyEvent(device Device, event Event, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, ceventAllocMap := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyEvent(cdevice, cevent, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(ceventAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// GetEventStatus function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetEventStatus.html
func GetEventStatus(device Device, event Event) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, ceventAllocMap := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
__ret := C.callVkGetEventStatus(cdevice, cevent)
runtime.KeepAlive(ceventAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// SetEvent function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkSetEvent.html
func SetEvent(device Device, event Event) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, ceventAllocMap := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
__ret := C.callVkSetEvent(cdevice, cevent)
runtime.KeepAlive(ceventAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// ResetEvent function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetEvent.html
func ResetEvent(device Device, event Event) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, ceventAllocMap := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
__ret := C.callVkResetEvent(cdevice, cevent)
runtime.KeepAlive(ceventAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// CreateQueryPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateQueryPool.html
func CreateQueryPool(device Device, pCreateInfo *QueryPoolCreateInfo, pAllocator *AllocationCallbacks, pQueryPool *QueryPool) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpQueryPool, cpQueryPoolAllocMap := (*C.VkQueryPool)(unsafe.Pointer(pQueryPool)), cgoAllocsUnknown
__ret := C.callVkCreateQueryPool(cdevice, cpCreateInfo, cpAllocator, cpQueryPool)
runtime.KeepAlive(cpQueryPoolAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyQueryPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyQueryPool.html
func DestroyQueryPool(device Device, queryPool QueryPool, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cqueryPool, cqueryPoolAllocMap := *(*C.VkQueryPool)(unsafe.Pointer(&queryPool)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyQueryPool(cdevice, cqueryPool, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cqueryPoolAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// GetQueryPoolResults function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetQueryPoolResults.html
func GetQueryPoolResults(device Device, queryPool QueryPool, firstQuery uint32, queryCount uint32, dataSize uint32, pData unsafe.Pointer, stride DeviceSize, flags QueryResultFlags) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cqueryPool, cqueryPoolAllocMap := *(*C.VkQueryPool)(unsafe.Pointer(&queryPool)), cgoAllocsUnknown
cfirstQuery, cfirstQueryAllocMap := (C.uint32_t)(firstQuery), cgoAllocsUnknown
cqueryCount, cqueryCountAllocMap := (C.uint32_t)(queryCount), cgoAllocsUnknown
cdataSize, cdataSizeAllocMap := (C.size_t)(dataSize), cgoAllocsUnknown
cpData, cpDataAllocMap := pData, cgoAllocsUnknown
cstride, cstrideAllocMap := (C.VkDeviceSize)(stride), cgoAllocsUnknown
cflags, cflagsAllocMap := (C.VkQueryResultFlags)(flags), cgoAllocsUnknown
__ret := C.callVkGetQueryPoolResults(cdevice, cqueryPool, cfirstQuery, cqueryCount, cdataSize, cpData, cstride, cflags)
runtime.KeepAlive(cflagsAllocMap)
runtime.KeepAlive(cstrideAllocMap)
runtime.KeepAlive(cpDataAllocMap)
runtime.KeepAlive(cdataSizeAllocMap)
runtime.KeepAlive(cqueryCountAllocMap)
runtime.KeepAlive(cfirstQueryAllocMap)
runtime.KeepAlive(cqueryPoolAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// CreateBuffer function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateBuffer.html
func CreateBuffer(device Device, pCreateInfo *BufferCreateInfo, pAllocator *AllocationCallbacks, pBuffer *Buffer) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpBuffer, cpBufferAllocMap := (*C.VkBuffer)(unsafe.Pointer(pBuffer)), cgoAllocsUnknown
__ret := C.callVkCreateBuffer(cdevice, cpCreateInfo, cpAllocator, cpBuffer)
runtime.KeepAlive(cpBufferAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyBuffer function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyBuffer.html
func DestroyBuffer(device Device, buffer Buffer, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbuffer, cbufferAllocMap := *(*C.VkBuffer)(unsafe.Pointer(&buffer)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyBuffer(cdevice, cbuffer, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cbufferAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateBufferView function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateBufferView.html
func CreateBufferView(device Device, pCreateInfo *BufferViewCreateInfo, pAllocator *AllocationCallbacks, pView *BufferView) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpView, cpViewAllocMap := (*C.VkBufferView)(unsafe.Pointer(pView)), cgoAllocsUnknown
__ret := C.callVkCreateBufferView(cdevice, cpCreateInfo, cpAllocator, cpView)
runtime.KeepAlive(cpViewAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyBufferView function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyBufferView.html
func DestroyBufferView(device Device, bufferView BufferView, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbufferView, cbufferViewAllocMap := *(*C.VkBufferView)(unsafe.Pointer(&bufferView)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyBufferView(cdevice, cbufferView, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cbufferViewAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateImage function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateImage.html
func CreateImage(device Device, pCreateInfo *ImageCreateInfo, pAllocator *AllocationCallbacks, pImage *Image) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpImage, cpImageAllocMap := (*C.VkImage)(unsafe.Pointer(pImage)), cgoAllocsUnknown
__ret := C.callVkCreateImage(cdevice, cpCreateInfo, cpAllocator, cpImage)
runtime.KeepAlive(cpImageAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyImage function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyImage.html
func DestroyImage(device Device, image Image, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, cimageAllocMap := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyImage(cdevice, cimage, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cimageAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// GetImageSubresourceLayout function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageSubresourceLayout.html
func GetImageSubresourceLayout(device Device, image Image, pSubresource *ImageSubresource, pLayout *SubresourceLayout) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, cimageAllocMap := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpSubresource, cpSubresourceAllocMap := pSubresource.PassRef()
cpLayout, cpLayoutAllocMap := pLayout.PassRef()
C.callVkGetImageSubresourceLayout(cdevice, cimage, cpSubresource, cpLayout)
runtime.KeepAlive(cpLayoutAllocMap)
runtime.KeepAlive(cpSubresourceAllocMap)
runtime.KeepAlive(cimageAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateImageView function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateImageView.html
func CreateImageView(device Device, pCreateInfo *ImageViewCreateInfo, pAllocator *AllocationCallbacks, pView *ImageView) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpView, cpViewAllocMap := (*C.VkImageView)(unsafe.Pointer(pView)), cgoAllocsUnknown
__ret := C.callVkCreateImageView(cdevice, cpCreateInfo, cpAllocator, cpView)
runtime.KeepAlive(cpViewAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyImageView function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyImageView.html
func DestroyImageView(device Device, imageView ImageView, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimageView, cimageViewAllocMap := *(*C.VkImageView)(unsafe.Pointer(&imageView)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyImageView(cdevice, cimageView, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cimageViewAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateShaderModule function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateShaderModule.html
func CreateShaderModule(device Device, pCreateInfo *ShaderModuleCreateInfo, pAllocator *AllocationCallbacks, pShaderModule *ShaderModule) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpShaderModule, cpShaderModuleAllocMap := (*C.VkShaderModule)(unsafe.Pointer(pShaderModule)), cgoAllocsUnknown
__ret := C.callVkCreateShaderModule(cdevice, cpCreateInfo, cpAllocator, cpShaderModule)
runtime.KeepAlive(cpShaderModuleAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyShaderModule function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyShaderModule.html
func DestroyShaderModule(device Device, shaderModule ShaderModule, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cshaderModule, cshaderModuleAllocMap := *(*C.VkShaderModule)(unsafe.Pointer(&shaderModule)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyShaderModule(cdevice, cshaderModule, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cshaderModuleAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreatePipelineCache function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreatePipelineCache.html
func CreatePipelineCache(device Device, pCreateInfo *PipelineCacheCreateInfo, pAllocator *AllocationCallbacks, pPipelineCache *PipelineCache) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelineCache, cpPipelineCacheAllocMap := (*C.VkPipelineCache)(unsafe.Pointer(pPipelineCache)), cgoAllocsUnknown
__ret := C.callVkCreatePipelineCache(cdevice, cpCreateInfo, cpAllocator, cpPipelineCache)
runtime.KeepAlive(cpPipelineCacheAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyPipelineCache function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipelineCache.html
func DestroyPipelineCache(device Device, pipelineCache PipelineCache, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, cpipelineCacheAllocMap := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyPipelineCache(cdevice, cpipelineCache, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpipelineCacheAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// GetPipelineCacheData function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPipelineCacheData.html
func GetPipelineCacheData(device Device, pipelineCache PipelineCache, pDataSize *uint32, pData unsafe.Pointer) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, cpipelineCacheAllocMap := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
cpDataSize, cpDataSizeAllocMap := (*C.size_t)(unsafe.Pointer(pDataSize)), cgoAllocsUnknown
cpData, cpDataAllocMap := pData, cgoAllocsUnknown
__ret := C.callVkGetPipelineCacheData(cdevice, cpipelineCache, cpDataSize, cpData)
runtime.KeepAlive(cpDataAllocMap)
runtime.KeepAlive(cpDataSizeAllocMap)
runtime.KeepAlive(cpipelineCacheAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// MergePipelineCaches function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkMergePipelineCaches.html
func MergePipelineCaches(device Device, dstCache PipelineCache, srcCacheCount uint32, pSrcCaches []PipelineCache) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdstCache, cdstCacheAllocMap := *(*C.VkPipelineCache)(unsafe.Pointer(&dstCache)), cgoAllocsUnknown
csrcCacheCount, csrcCacheCountAllocMap := (C.uint32_t)(srcCacheCount), cgoAllocsUnknown
cpSrcCaches, cpSrcCachesAllocMap := copyPPipelineCacheBytes((*sliceHeader)(unsafe.Pointer(&pSrcCaches)))
__ret := C.callVkMergePipelineCaches(cdevice, cdstCache, csrcCacheCount, cpSrcCaches)
runtime.KeepAlive(cpSrcCachesAllocMap)
runtime.KeepAlive(csrcCacheCountAllocMap)
runtime.KeepAlive(cdstCacheAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// CreateGraphicsPipelines function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateGraphicsPipelines.html
func CreateGraphicsPipelines(device Device, pipelineCache PipelineCache, createInfoCount uint32, pCreateInfos []GraphicsPipelineCreateInfo, pAllocator *AllocationCallbacks, pPipelines []Pipeline) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, cpipelineCacheAllocMap := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
ccreateInfoCount, ccreateInfoCountAllocMap := (C.uint32_t)(createInfoCount), cgoAllocsUnknown
cpCreateInfos, cpCreateInfosAllocMap := unpackArgSGraphicsPipelineCreateInfo(pCreateInfos)
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelines, cpPipelinesAllocMap := copyPPipelineBytes((*sliceHeader)(unsafe.Pointer(&pPipelines)))
__ret := C.callVkCreateGraphicsPipelines(cdevice, cpipelineCache, ccreateInfoCount, cpCreateInfos, cpAllocator, cpPipelines)
runtime.KeepAlive(cpPipelinesAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
packSGraphicsPipelineCreateInfo(pCreateInfos, cpCreateInfos)
runtime.KeepAlive(cpCreateInfosAllocMap)
runtime.KeepAlive(ccreateInfoCountAllocMap)
runtime.KeepAlive(cpipelineCacheAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// CreateComputePipelines function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateComputePipelines.html
func CreateComputePipelines(device Device, pipelineCache PipelineCache, createInfoCount uint32, pCreateInfos []ComputePipelineCreateInfo, pAllocator *AllocationCallbacks, pPipelines []Pipeline) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, cpipelineCacheAllocMap := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
ccreateInfoCount, ccreateInfoCountAllocMap := (C.uint32_t)(createInfoCount), cgoAllocsUnknown
cpCreateInfos, cpCreateInfosAllocMap := unpackArgSComputePipelineCreateInfo(pCreateInfos)
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelines, cpPipelinesAllocMap := copyPPipelineBytes((*sliceHeader)(unsafe.Pointer(&pPipelines)))
__ret := C.callVkCreateComputePipelines(cdevice, cpipelineCache, ccreateInfoCount, cpCreateInfos, cpAllocator, cpPipelines)
runtime.KeepAlive(cpPipelinesAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
packSComputePipelineCreateInfo(pCreateInfos, cpCreateInfos)
runtime.KeepAlive(cpCreateInfosAllocMap)
runtime.KeepAlive(ccreateInfoCountAllocMap)
runtime.KeepAlive(cpipelineCacheAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyPipeline function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipeline.html
func DestroyPipeline(device Device, pipeline Pipeline, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipeline, cpipelineAllocMap := *(*C.VkPipeline)(unsafe.Pointer(&pipeline)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyPipeline(cdevice, cpipeline, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpipelineAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreatePipelineLayout function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreatePipelineLayout.html
func CreatePipelineLayout(device Device, pCreateInfo *PipelineLayoutCreateInfo, pAllocator *AllocationCallbacks, pPipelineLayout *PipelineLayout) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelineLayout, cpPipelineLayoutAllocMap := (*C.VkPipelineLayout)(unsafe.Pointer(pPipelineLayout)), cgoAllocsUnknown
__ret := C.callVkCreatePipelineLayout(cdevice, cpCreateInfo, cpAllocator, cpPipelineLayout)
runtime.KeepAlive(cpPipelineLayoutAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyPipelineLayout function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipelineLayout.html
func DestroyPipelineLayout(device Device, pipelineLayout PipelineLayout, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineLayout, cpipelineLayoutAllocMap := *(*C.VkPipelineLayout)(unsafe.Pointer(&pipelineLayout)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyPipelineLayout(cdevice, cpipelineLayout, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpipelineLayoutAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateSampler function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateSampler.html
func CreateSampler(device Device, pCreateInfo *SamplerCreateInfo, pAllocator *AllocationCallbacks, pSampler *Sampler) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpSampler, cpSamplerAllocMap := (*C.VkSampler)(unsafe.Pointer(pSampler)), cgoAllocsUnknown
__ret := C.callVkCreateSampler(cdevice, cpCreateInfo, cpAllocator, cpSampler)
runtime.KeepAlive(cpSamplerAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroySampler function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroySampler.html
func DestroySampler(device Device, sampler Sampler, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
csampler, csamplerAllocMap := *(*C.VkSampler)(unsafe.Pointer(&sampler)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroySampler(cdevice, csampler, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(csamplerAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateDescriptorSetLayout function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateDescriptorSetLayout.html
func CreateDescriptorSetLayout(device Device, pCreateInfo *DescriptorSetLayoutCreateInfo, pAllocator *AllocationCallbacks, pSetLayout *DescriptorSetLayout) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpSetLayout, cpSetLayoutAllocMap := (*C.VkDescriptorSetLayout)(unsafe.Pointer(pSetLayout)), cgoAllocsUnknown
__ret := C.callVkCreateDescriptorSetLayout(cdevice, cpCreateInfo, cpAllocator, cpSetLayout)
runtime.KeepAlive(cpSetLayoutAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyDescriptorSetLayout function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyDescriptorSetLayout.html
func DestroyDescriptorSetLayout(device Device, descriptorSetLayout DescriptorSetLayout, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdescriptorSetLayout, cdescriptorSetLayoutAllocMap := *(*C.VkDescriptorSetLayout)(unsafe.Pointer(&descriptorSetLayout)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyDescriptorSetLayout(cdevice, cdescriptorSetLayout, cpAllocator)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cdescriptorSetLayoutAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
}
// CreateDescriptorPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateDescriptorPool.html
func CreateDescriptorPool(device Device, pCreateInfo *DescriptorPoolCreateInfo, pAllocator *AllocationCallbacks, pDescriptorPool *DescriptorPool) Result {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, cpCreateInfoAllocMap := pCreateInfo.PassRef()
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpDescriptorPool, cpDescriptorPoolAllocMap := (*C.VkDescriptorPool)(unsafe.Pointer(pDescriptorPool)), cgoAllocsUnknown
__ret := C.callVkCreateDescriptorPool(cdevice, cpCreateInfo, cpAllocator, cpDescriptorPool)
runtime.KeepAlive(cpDescriptorPoolAllocMap)
runtime.KeepAlive(cpAllocatorAllocMap)
runtime.KeepAlive(cpCreateInfoAllocMap)
runtime.KeepAlive(cdeviceAllocMap)
__v := (Result)(__ret)
return __v
}
// DestroyDescriptorPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyDescriptorPool.html
func DestroyDescriptorPool(device Device, descriptorPool DescriptorPool, pAllocator *AllocationCallbacks) {
cdevice, cdeviceAllocMap := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdescriptorPool, cdescriptorPoolAllocMap := *(*C.VkDescriptorPool)(unsafe.Pointer(&descriptorPool)), cgoAllocsUnknown
cpAllocator, cpAllocatorAllocMap := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown