-
Notifications
You must be signed in to change notification settings - Fork 55
/
vulkan.go
1601 lines (1440 loc) · 104 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 Mon, 15 Oct 2018 01:04:16 +07.
// 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 "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, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpInstance, _ := (*C.VkInstance)(unsafe.Pointer(pInstance)), cgoAllocsUnknown
__ret := C.callVkCreateInstance(cpCreateInfo, cpAllocator, cpInstance)
__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, _ := *(*C.VkInstance)(unsafe.Pointer(&instance)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyInstance(cinstance, cpAllocator)
}
// 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, _ := *(*C.VkInstance)(unsafe.Pointer(&instance)), cgoAllocsUnknown
cpPhysicalDeviceCount, _ := (*C.uint32_t)(unsafe.Pointer(pPhysicalDeviceCount)), cgoAllocsUnknown
cpPhysicalDevices, _ := (*C.VkPhysicalDevice)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pPhysicalDevices)).Data)), cgoAllocsUnknown
__ret := C.callVkEnumeratePhysicalDevices(cinstance, cpPhysicalDeviceCount, cpPhysicalDevices)
__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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpFeatures, _ := pFeatures.PassRef()
C.callVkGetPhysicalDeviceFeatures(cphysicalDevice, cpFeatures)
}
// 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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cformat, _ := (C.VkFormat)(format), cgoAllocsUnknown
cpFormatProperties, _ := pFormatProperties.PassRef()
C.callVkGetPhysicalDeviceFormatProperties(cphysicalDevice, cformat, cpFormatProperties)
}
// 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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cformat, _ := (C.VkFormat)(format), cgoAllocsUnknown
ckind, _ := (C.VkImageType)(kind), cgoAllocsUnknown
ctiling, _ := (C.VkImageTiling)(tiling), cgoAllocsUnknown
cusage, _ := (C.VkImageUsageFlags)(usage), cgoAllocsUnknown
cflags, _ := (C.VkImageCreateFlags)(flags), cgoAllocsUnknown
cpImageFormatProperties, _ := pImageFormatProperties.PassRef()
__ret := C.callVkGetPhysicalDeviceImageFormatProperties(cphysicalDevice, cformat, ckind, ctiling, cusage, cflags, cpImageFormatProperties)
__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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpProperties, _ := pProperties.PassRef()
C.callVkGetPhysicalDeviceProperties(cphysicalDevice, cpProperties)
}
// 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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpQueueFamilyPropertyCount, _ := (*C.uint32_t)(unsafe.Pointer(pQueueFamilyPropertyCount)), cgoAllocsUnknown
cpQueueFamilyProperties, _ := unpackArgSQueueFamilyProperties(pQueueFamilyProperties)
C.callVkGetPhysicalDeviceQueueFamilyProperties(cphysicalDevice, cpQueueFamilyPropertyCount, cpQueueFamilyProperties)
packSQueueFamilyProperties(pQueueFamilyProperties, cpQueueFamilyProperties)
}
// 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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpMemoryProperties, _ := pMemoryProperties.PassRef()
C.callVkGetPhysicalDeviceMemoryProperties(cphysicalDevice, cpMemoryProperties)
}
// 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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpDevice, _ := (*C.VkDevice)(unsafe.Pointer(pDevice)), cgoAllocsUnknown
__ret := C.callVkCreateDevice(cphysicalDevice, cpCreateInfo, cpAllocator, cpDevice)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyDevice(cdevice, cpAllocator)
}
// 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, _ := unpackPCharString(pLayerName)
cpPropertyCount, _ := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, _ := unpackArgSExtensionProperties(pProperties)
__ret := C.callVkEnumerateInstanceExtensionProperties(cpLayerName, cpPropertyCount, cpProperties)
packSExtensionProperties(pProperties, cpProperties)
__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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpLayerName, _ := unpackPCharString(pLayerName)
cpPropertyCount, _ := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, _ := unpackArgSExtensionProperties(pProperties)
__ret := C.callVkEnumerateDeviceExtensionProperties(cphysicalDevice, cpLayerName, cpPropertyCount, cpProperties)
packSExtensionProperties(pProperties, cpProperties)
__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, _ := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, _ := unpackArgSLayerProperties(pProperties)
__ret := C.callVkEnumerateInstanceLayerProperties(cpPropertyCount, cpProperties)
packSLayerProperties(pProperties, cpProperties)
__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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cpPropertyCount, _ := (*C.uint32_t)(unsafe.Pointer(pPropertyCount)), cgoAllocsUnknown
cpProperties, _ := unpackArgSLayerProperties(pProperties)
__ret := C.callVkEnumerateDeviceLayerProperties(cphysicalDevice, cpPropertyCount, cpProperties)
packSLayerProperties(pProperties, cpProperties)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cqueueFamilyIndex, _ := (C.uint32_t)(queueFamilyIndex), cgoAllocsUnknown
cqueueIndex, _ := (C.uint32_t)(queueIndex), cgoAllocsUnknown
cpQueue, _ := (*C.VkQueue)(unsafe.Pointer(pQueue)), cgoAllocsUnknown
C.callVkGetDeviceQueue(cdevice, cqueueFamilyIndex, cqueueIndex, cpQueue)
}
// 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, _ := *(*C.VkQueue)(unsafe.Pointer(&queue)), cgoAllocsUnknown
csubmitCount, _ := (C.uint32_t)(submitCount), cgoAllocsUnknown
cpSubmits, _ := unpackArgSSubmitInfo(pSubmits)
cfence, _ := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
__ret := C.callVkQueueSubmit(cqueue, csubmitCount, cpSubmits, cfence)
packSSubmitInfo(pSubmits, cpSubmits)
__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, _ := *(*C.VkQueue)(unsafe.Pointer(&queue)), cgoAllocsUnknown
__ret := C.callVkQueueWaitIdle(cqueue)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
__ret := C.callVkDeviceWaitIdle(cdevice)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpAllocateInfo, _ := pAllocateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpMemory, _ := (*C.VkDeviceMemory)(unsafe.Pointer(pMemory)), cgoAllocsUnknown
__ret := C.callVkAllocateMemory(cdevice, cpAllocateInfo, cpAllocator, cpMemory)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, _ := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkFreeMemory(cdevice, cmemory, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, _ := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
coffset, _ := (C.VkDeviceSize)(offset), cgoAllocsUnknown
csize, _ := (C.VkDeviceSize)(size), cgoAllocsUnknown
cflags, _ := (C.VkMemoryMapFlags)(flags), cgoAllocsUnknown
cppData, _ := ppData, cgoAllocsUnknown
__ret := C.callVkMapMemory(cdevice, cmemory, coffset, csize, cflags, cppData)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, _ := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
C.callVkUnmapMemory(cdevice, cmemory)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemoryRangeCount, _ := (C.uint32_t)(memoryRangeCount), cgoAllocsUnknown
cpMemoryRanges, _ := unpackArgSMappedMemoryRange(pMemoryRanges)
__ret := C.callVkFlushMappedMemoryRanges(cdevice, cmemoryRangeCount, cpMemoryRanges)
packSMappedMemoryRange(pMemoryRanges, cpMemoryRanges)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemoryRangeCount, _ := (C.uint32_t)(memoryRangeCount), cgoAllocsUnknown
cpMemoryRanges, _ := unpackArgSMappedMemoryRange(pMemoryRanges)
__ret := C.callVkInvalidateMappedMemoryRanges(cdevice, cmemoryRangeCount, cpMemoryRanges)
packSMappedMemoryRange(pMemoryRanges, cpMemoryRanges)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cmemory, _ := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cpCommittedMemoryInBytes, _ := (*C.VkDeviceSize)(unsafe.Pointer(pCommittedMemoryInBytes)), cgoAllocsUnknown
C.callVkGetDeviceMemoryCommitment(cdevice, cmemory, cpCommittedMemoryInBytes)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbuffer, _ := *(*C.VkBuffer)(unsafe.Pointer(&buffer)), cgoAllocsUnknown
cmemory, _ := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cmemoryOffset, _ := (C.VkDeviceSize)(memoryOffset), cgoAllocsUnknown
__ret := C.callVkBindBufferMemory(cdevice, cbuffer, cmemory, cmemoryOffset)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, _ := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cmemory, _ := *(*C.VkDeviceMemory)(unsafe.Pointer(&memory)), cgoAllocsUnknown
cmemoryOffset, _ := (C.VkDeviceSize)(memoryOffset), cgoAllocsUnknown
__ret := C.callVkBindImageMemory(cdevice, cimage, cmemory, cmemoryOffset)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbuffer, _ := *(*C.VkBuffer)(unsafe.Pointer(&buffer)), cgoAllocsUnknown
cpMemoryRequirements, _ := pMemoryRequirements.PassRef()
C.callVkGetBufferMemoryRequirements(cdevice, cbuffer, cpMemoryRequirements)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, _ := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpMemoryRequirements, _ := pMemoryRequirements.PassRef()
C.callVkGetImageMemoryRequirements(cdevice, cimage, cpMemoryRequirements)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, _ := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpSparseMemoryRequirementCount, _ := (*C.uint32_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pSparseMemoryRequirementCount)).Data)), cgoAllocsUnknown
cpSparseMemoryRequirements, _ := unpackArgSSparseImageMemoryRequirements(pSparseMemoryRequirements)
C.callVkGetImageSparseMemoryRequirements(cdevice, cimage, cpSparseMemoryRequirementCount, cpSparseMemoryRequirements)
packSSparseImageMemoryRequirements(pSparseMemoryRequirements, cpSparseMemoryRequirements)
}
// 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, _ := *(*C.VkPhysicalDevice)(unsafe.Pointer(&physicalDevice)), cgoAllocsUnknown
cformat, _ := (C.VkFormat)(format), cgoAllocsUnknown
ckind, _ := (C.VkImageType)(kind), cgoAllocsUnknown
csamples, _ := (C.VkSampleCountFlagBits)(samples), cgoAllocsUnknown
cusage, _ := (C.VkImageUsageFlags)(usage), cgoAllocsUnknown
ctiling, _ := (C.VkImageTiling)(tiling), cgoAllocsUnknown
cpPropertyCount, _ := (*C.uint32_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pPropertyCount)).Data)), cgoAllocsUnknown
cpProperties, _ := unpackArgSSparseImageFormatProperties(pProperties)
C.callVkGetPhysicalDeviceSparseImageFormatProperties(cphysicalDevice, cformat, ckind, csamples, cusage, ctiling, cpPropertyCount, cpProperties)
packSSparseImageFormatProperties(pProperties, cpProperties)
}
// 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, _ := *(*C.VkQueue)(unsafe.Pointer(&queue)), cgoAllocsUnknown
cbindInfoCount, _ := (C.uint32_t)(bindInfoCount), cgoAllocsUnknown
cpBindInfo, _ := unpackArgSBindSparseInfo(pBindInfo)
cfence, _ := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
__ret := C.callVkQueueBindSparse(cqueue, cbindInfoCount, cpBindInfo, cfence)
packSBindSparseInfo(pBindInfo, cpBindInfo)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpFence, _ := (*C.VkFence)(unsafe.Pointer(pFence)), cgoAllocsUnknown
__ret := C.callVkCreateFence(cdevice, cpCreateInfo, cpAllocator, cpFence)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfence, _ := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyFence(cdevice, cfence, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfenceCount, _ := (C.uint32_t)(fenceCount), cgoAllocsUnknown
cpFences, _ := (*C.VkFence)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pFences)).Data)), cgoAllocsUnknown
__ret := C.callVkResetFences(cdevice, cfenceCount, cpFences)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfence, _ := *(*C.VkFence)(unsafe.Pointer(&fence)), cgoAllocsUnknown
__ret := C.callVkGetFenceStatus(cdevice, cfence)
__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 uint64) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cfenceCount, _ := (C.uint32_t)(fenceCount), cgoAllocsUnknown
cpFences, _ := (*C.VkFence)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pFences)).Data)), cgoAllocsUnknown
cwaitAll, _ := (C.VkBool32)(waitAll), cgoAllocsUnknown
ctimeout, _ := (C.uint64_t)(timeout), cgoAllocsUnknown
__ret := C.callVkWaitForFences(cdevice, cfenceCount, cpFences, cwaitAll, ctimeout)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpSemaphore, _ := (*C.VkSemaphore)(unsafe.Pointer(pSemaphore)), cgoAllocsUnknown
__ret := C.callVkCreateSemaphore(cdevice, cpCreateInfo, cpAllocator, cpSemaphore)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
csemaphore, _ := *(*C.VkSemaphore)(unsafe.Pointer(&semaphore)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroySemaphore(cdevice, csemaphore, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpEvent, _ := (*C.VkEvent)(unsafe.Pointer(pEvent)), cgoAllocsUnknown
__ret := C.callVkCreateEvent(cdevice, cpCreateInfo, cpAllocator, cpEvent)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, _ := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyEvent(cdevice, cevent, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, _ := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
__ret := C.callVkGetEventStatus(cdevice, cevent)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, _ := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
__ret := C.callVkSetEvent(cdevice, cevent)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cevent, _ := *(*C.VkEvent)(unsafe.Pointer(&event)), cgoAllocsUnknown
__ret := C.callVkResetEvent(cdevice, cevent)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpQueryPool, _ := (*C.VkQueryPool)(unsafe.Pointer(pQueryPool)), cgoAllocsUnknown
__ret := C.callVkCreateQueryPool(cdevice, cpCreateInfo, cpAllocator, cpQueryPool)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cqueryPool, _ := *(*C.VkQueryPool)(unsafe.Pointer(&queryPool)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyQueryPool(cdevice, cqueryPool, cpAllocator)
}
// 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 uint, pData unsafe.Pointer, stride DeviceSize, flags QueryResultFlags) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cqueryPool, _ := *(*C.VkQueryPool)(unsafe.Pointer(&queryPool)), cgoAllocsUnknown
cfirstQuery, _ := (C.uint32_t)(firstQuery), cgoAllocsUnknown
cqueryCount, _ := (C.uint32_t)(queryCount), cgoAllocsUnknown
cdataSize, _ := (C.size_t)(dataSize), cgoAllocsUnknown
cpData, _ := pData, cgoAllocsUnknown
cstride, _ := (C.VkDeviceSize)(stride), cgoAllocsUnknown
cflags, _ := (C.VkQueryResultFlags)(flags), cgoAllocsUnknown
__ret := C.callVkGetQueryPoolResults(cdevice, cqueryPool, cfirstQuery, cqueryCount, cdataSize, cpData, cstride, cflags)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpBuffer, _ := (*C.VkBuffer)(unsafe.Pointer(pBuffer)), cgoAllocsUnknown
__ret := C.callVkCreateBuffer(cdevice, cpCreateInfo, cpAllocator, cpBuffer)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbuffer, _ := *(*C.VkBuffer)(unsafe.Pointer(&buffer)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyBuffer(cdevice, cbuffer, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpView, _ := (*C.VkBufferView)(unsafe.Pointer(pView)), cgoAllocsUnknown
__ret := C.callVkCreateBufferView(cdevice, cpCreateInfo, cpAllocator, cpView)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cbufferView, _ := *(*C.VkBufferView)(unsafe.Pointer(&bufferView)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyBufferView(cdevice, cbufferView, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpImage, _ := (*C.VkImage)(unsafe.Pointer(pImage)), cgoAllocsUnknown
__ret := C.callVkCreateImage(cdevice, cpCreateInfo, cpAllocator, cpImage)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, _ := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyImage(cdevice, cimage, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimage, _ := *(*C.VkImage)(unsafe.Pointer(&image)), cgoAllocsUnknown
cpSubresource, _ := pSubresource.PassRef()
cpLayout, _ := pLayout.PassRef()
C.callVkGetImageSubresourceLayout(cdevice, cimage, cpSubresource, cpLayout)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpView, _ := (*C.VkImageView)(unsafe.Pointer(pView)), cgoAllocsUnknown
__ret := C.callVkCreateImageView(cdevice, cpCreateInfo, cpAllocator, cpView)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cimageView, _ := *(*C.VkImageView)(unsafe.Pointer(&imageView)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyImageView(cdevice, cimageView, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpShaderModule, _ := (*C.VkShaderModule)(unsafe.Pointer(pShaderModule)), cgoAllocsUnknown
__ret := C.callVkCreateShaderModule(cdevice, cpCreateInfo, cpAllocator, cpShaderModule)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cshaderModule, _ := *(*C.VkShaderModule)(unsafe.Pointer(&shaderModule)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyShaderModule(cdevice, cshaderModule, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelineCache, _ := (*C.VkPipelineCache)(unsafe.Pointer(pPipelineCache)), cgoAllocsUnknown
__ret := C.callVkCreatePipelineCache(cdevice, cpCreateInfo, cpAllocator, cpPipelineCache)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, _ := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyPipelineCache(cdevice, cpipelineCache, cpAllocator)
}
// 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 *uint, pData unsafe.Pointer) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, _ := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
cpDataSize, _ := (*C.size_t)(unsafe.Pointer(pDataSize)), cgoAllocsUnknown
cpData, _ := pData, cgoAllocsUnknown
__ret := C.callVkGetPipelineCacheData(cdevice, cpipelineCache, cpDataSize, cpData)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdstCache, _ := *(*C.VkPipelineCache)(unsafe.Pointer(&dstCache)), cgoAllocsUnknown
csrcCacheCount, _ := (C.uint32_t)(srcCacheCount), cgoAllocsUnknown
cpSrcCaches, _ := (*C.VkPipelineCache)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pSrcCaches)).Data)), cgoAllocsUnknown
__ret := C.callVkMergePipelineCaches(cdevice, cdstCache, csrcCacheCount, cpSrcCaches)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, _ := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
ccreateInfoCount, _ := (C.uint32_t)(createInfoCount), cgoAllocsUnknown
cpCreateInfos, _ := unpackArgSGraphicsPipelineCreateInfo(pCreateInfos)
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelines, _ := (*C.VkPipeline)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pPipelines)).Data)), cgoAllocsUnknown
__ret := C.callVkCreateGraphicsPipelines(cdevice, cpipelineCache, ccreateInfoCount, cpCreateInfos, cpAllocator, cpPipelines)
packSGraphicsPipelineCreateInfo(pCreateInfos, cpCreateInfos)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineCache, _ := *(*C.VkPipelineCache)(unsafe.Pointer(&pipelineCache)), cgoAllocsUnknown
ccreateInfoCount, _ := (C.uint32_t)(createInfoCount), cgoAllocsUnknown
cpCreateInfos, _ := unpackArgSComputePipelineCreateInfo(pCreateInfos)
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelines, _ := (*C.VkPipeline)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pPipelines)).Data)), cgoAllocsUnknown
__ret := C.callVkCreateComputePipelines(cdevice, cpipelineCache, ccreateInfoCount, cpCreateInfos, cpAllocator, cpPipelines)
packSComputePipelineCreateInfo(pCreateInfos, cpCreateInfos)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipeline, _ := *(*C.VkPipeline)(unsafe.Pointer(&pipeline)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyPipeline(cdevice, cpipeline, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpPipelineLayout, _ := (*C.VkPipelineLayout)(unsafe.Pointer(pPipelineLayout)), cgoAllocsUnknown
__ret := C.callVkCreatePipelineLayout(cdevice, cpCreateInfo, cpAllocator, cpPipelineLayout)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpipelineLayout, _ := *(*C.VkPipelineLayout)(unsafe.Pointer(&pipelineLayout)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyPipelineLayout(cdevice, cpipelineLayout, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpSampler, _ := (*C.VkSampler)(unsafe.Pointer(pSampler)), cgoAllocsUnknown
__ret := C.callVkCreateSampler(cdevice, cpCreateInfo, cpAllocator, cpSampler)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
csampler, _ := *(*C.VkSampler)(unsafe.Pointer(&sampler)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroySampler(cdevice, csampler, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpSetLayout, _ := (*C.VkDescriptorSetLayout)(unsafe.Pointer(pSetLayout)), cgoAllocsUnknown
__ret := C.callVkCreateDescriptorSetLayout(cdevice, cpCreateInfo, cpAllocator, cpSetLayout)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdescriptorSetLayout, _ := *(*C.VkDescriptorSetLayout)(unsafe.Pointer(&descriptorSetLayout)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyDescriptorSetLayout(cdevice, cdescriptorSetLayout, cpAllocator)
}
// 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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpDescriptorPool, _ := (*C.VkDescriptorPool)(unsafe.Pointer(pDescriptorPool)), cgoAllocsUnknown
__ret := C.callVkCreateDescriptorPool(cdevice, cpCreateInfo, cpAllocator, cpDescriptorPool)
__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, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdescriptorPool, _ := *(*C.VkDescriptorPool)(unsafe.Pointer(&descriptorPool)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyDescriptorPool(cdevice, cdescriptorPool, cpAllocator)
}
// ResetDescriptorPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetDescriptorPool.html
func ResetDescriptorPool(device Device, descriptorPool DescriptorPool, flags DescriptorPoolResetFlags) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdescriptorPool, _ := *(*C.VkDescriptorPool)(unsafe.Pointer(&descriptorPool)), cgoAllocsUnknown
cflags, _ := (C.VkDescriptorPoolResetFlags)(flags), cgoAllocsUnknown
__ret := C.callVkResetDescriptorPool(cdevice, cdescriptorPool, cflags)
__v := (Result)(__ret)
return __v
}
// AllocateDescriptorSets function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateDescriptorSets.html
func AllocateDescriptorSets(device Device, pAllocateInfo *DescriptorSetAllocateInfo, pDescriptorSets *DescriptorSet) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpAllocateInfo, _ := pAllocateInfo.PassRef()
cpDescriptorSets, _ := (*C.VkDescriptorSet)(unsafe.Pointer(pDescriptorSets)), cgoAllocsUnknown
__ret := C.callVkAllocateDescriptorSets(cdevice, cpAllocateInfo, cpDescriptorSets)
__v := (Result)(__ret)
return __v
}
// FreeDescriptorSets function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeDescriptorSets.html
func FreeDescriptorSets(device Device, descriptorPool DescriptorPool, descriptorSetCount uint32, pDescriptorSets *DescriptorSet) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdescriptorPool, _ := *(*C.VkDescriptorPool)(unsafe.Pointer(&descriptorPool)), cgoAllocsUnknown
cdescriptorSetCount, _ := (C.uint32_t)(descriptorSetCount), cgoAllocsUnknown
cpDescriptorSets, _ := (*C.VkDescriptorSet)(unsafe.Pointer(pDescriptorSets)), cgoAllocsUnknown
__ret := C.callVkFreeDescriptorSets(cdevice, cdescriptorPool, cdescriptorSetCount, cpDescriptorSets)
__v := (Result)(__ret)
return __v
}
// UpdateDescriptorSets function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkUpdateDescriptorSets.html
func UpdateDescriptorSets(device Device, descriptorWriteCount uint32, pDescriptorWrites []WriteDescriptorSet, descriptorCopyCount uint32, pDescriptorCopies []CopyDescriptorSet) {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cdescriptorWriteCount, _ := (C.uint32_t)(descriptorWriteCount), cgoAllocsUnknown
cpDescriptorWrites, _ := unpackArgSWriteDescriptorSet(pDescriptorWrites)
cdescriptorCopyCount, _ := (C.uint32_t)(descriptorCopyCount), cgoAllocsUnknown
cpDescriptorCopies, _ := unpackArgSCopyDescriptorSet(pDescriptorCopies)
C.callVkUpdateDescriptorSets(cdevice, cdescriptorWriteCount, cpDescriptorWrites, cdescriptorCopyCount, cpDescriptorCopies)
packSCopyDescriptorSet(pDescriptorCopies, cpDescriptorCopies)
packSWriteDescriptorSet(pDescriptorWrites, cpDescriptorWrites)
}
// CreateFramebuffer function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateFramebuffer.html
func CreateFramebuffer(device Device, pCreateInfo *FramebufferCreateInfo, pAllocator *AllocationCallbacks, pFramebuffer *Framebuffer) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpFramebuffer, _ := (*C.VkFramebuffer)(unsafe.Pointer(pFramebuffer)), cgoAllocsUnknown
__ret := C.callVkCreateFramebuffer(cdevice, cpCreateInfo, cpAllocator, cpFramebuffer)
__v := (Result)(__ret)
return __v
}
// DestroyFramebuffer function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyFramebuffer.html
func DestroyFramebuffer(device Device, framebuffer Framebuffer, pAllocator *AllocationCallbacks) {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cframebuffer, _ := *(*C.VkFramebuffer)(unsafe.Pointer(&framebuffer)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyFramebuffer(cdevice, cframebuffer, cpAllocator)
}
// CreateRenderPass function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateRenderPass.html
func CreateRenderPass(device Device, pCreateInfo *RenderPassCreateInfo, pAllocator *AllocationCallbacks, pRenderPass *RenderPass) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpRenderPass, _ := (*C.VkRenderPass)(unsafe.Pointer(pRenderPass)), cgoAllocsUnknown
__ret := C.callVkCreateRenderPass(cdevice, cpCreateInfo, cpAllocator, cpRenderPass)
__v := (Result)(__ret)
return __v
}
// DestroyRenderPass function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyRenderPass.html
func DestroyRenderPass(device Device, renderPass RenderPass, pAllocator *AllocationCallbacks) {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
crenderPass, _ := *(*C.VkRenderPass)(unsafe.Pointer(&renderPass)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyRenderPass(cdevice, crenderPass, cpAllocator)
}
// GetRenderAreaGranularity function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetRenderAreaGranularity.html
func GetRenderAreaGranularity(device Device, renderPass RenderPass, pGranularity *Extent2D) {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
crenderPass, _ := *(*C.VkRenderPass)(unsafe.Pointer(&renderPass)), cgoAllocsUnknown
cpGranularity, _ := pGranularity.PassRef()
C.callVkGetRenderAreaGranularity(cdevice, crenderPass, cpGranularity)
}
// CreateCommandPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateCommandPool.html
func CreateCommandPool(device Device, pCreateInfo *CommandPoolCreateInfo, pAllocator *AllocationCallbacks, pCommandPool *CommandPool) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpCreateInfo, _ := pCreateInfo.PassRef()
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
cpCommandPool, _ := (*C.VkCommandPool)(unsafe.Pointer(pCommandPool)), cgoAllocsUnknown
__ret := C.callVkCreateCommandPool(cdevice, cpCreateInfo, cpAllocator, cpCommandPool)
__v := (Result)(__ret)
return __v
}
// DestroyCommandPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyCommandPool.html
func DestroyCommandPool(device Device, commandPool CommandPool, pAllocator *AllocationCallbacks) {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
ccommandPool, _ := *(*C.VkCommandPool)(unsafe.Pointer(&commandPool)), cgoAllocsUnknown
cpAllocator, _ := (*C.VkAllocationCallbacks)(unsafe.Pointer(pAllocator)), cgoAllocsUnknown
C.callVkDestroyCommandPool(cdevice, ccommandPool, cpAllocator)
}
// ResetCommandPool function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetCommandPool.html
func ResetCommandPool(device Device, commandPool CommandPool, flags CommandPoolResetFlags) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
ccommandPool, _ := *(*C.VkCommandPool)(unsafe.Pointer(&commandPool)), cgoAllocsUnknown
cflags, _ := (C.VkCommandPoolResetFlags)(flags), cgoAllocsUnknown
__ret := C.callVkResetCommandPool(cdevice, ccommandPool, cflags)
__v := (Result)(__ret)
return __v
}
// AllocateCommandBuffers function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateCommandBuffers.html
func AllocateCommandBuffers(device Device, pAllocateInfo *CommandBufferAllocateInfo, pCommandBuffers []CommandBuffer) Result {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
cpAllocateInfo, _ := pAllocateInfo.PassRef()
cpCommandBuffers, _ := (*C.VkCommandBuffer)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pCommandBuffers)).Data)), cgoAllocsUnknown
__ret := C.callVkAllocateCommandBuffers(cdevice, cpAllocateInfo, cpCommandBuffers)
__v := (Result)(__ret)
return __v
}
// FreeCommandBuffers function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeCommandBuffers.html
func FreeCommandBuffers(device Device, commandPool CommandPool, commandBufferCount uint32, pCommandBuffers []CommandBuffer) {
cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
ccommandPool, _ := *(*C.VkCommandPool)(unsafe.Pointer(&commandPool)), cgoAllocsUnknown
ccommandBufferCount, _ := (C.uint32_t)(commandBufferCount), cgoAllocsUnknown
cpCommandBuffers, _ := (*C.VkCommandBuffer)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pCommandBuffers)).Data)), cgoAllocsUnknown
C.callVkFreeCommandBuffers(cdevice, ccommandPool, ccommandBufferCount, cpCommandBuffers)
}
// BeginCommandBuffer function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBeginCommandBuffer.html
func BeginCommandBuffer(commandBuffer CommandBuffer, pBeginInfo *CommandBufferBeginInfo) Result {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cpBeginInfo, _ := pBeginInfo.PassRef()
__ret := C.callVkBeginCommandBuffer(ccommandBuffer, cpBeginInfo)
__v := (Result)(__ret)
return __v
}
// EndCommandBuffer function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEndCommandBuffer.html
func EndCommandBuffer(commandBuffer CommandBuffer) Result {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
__ret := C.callVkEndCommandBuffer(ccommandBuffer)
__v := (Result)(__ret)
return __v
}
// ResetCommandBuffer function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetCommandBuffer.html
func ResetCommandBuffer(commandBuffer CommandBuffer, flags CommandBufferResetFlags) Result {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cflags, _ := (C.VkCommandBufferResetFlags)(flags), cgoAllocsUnknown
__ret := C.callVkResetCommandBuffer(ccommandBuffer, cflags)
__v := (Result)(__ret)
return __v
}
// CmdBindPipeline function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindPipeline.html
func CmdBindPipeline(commandBuffer CommandBuffer, pipelineBindPoint PipelineBindPoint, pipeline Pipeline) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cpipelineBindPoint, _ := (C.VkPipelineBindPoint)(pipelineBindPoint), cgoAllocsUnknown
cpipeline, _ := *(*C.VkPipeline)(unsafe.Pointer(&pipeline)), cgoAllocsUnknown
C.callVkCmdBindPipeline(ccommandBuffer, cpipelineBindPoint, cpipeline)
}
// CmdSetViewport function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetViewport.html
func CmdSetViewport(commandBuffer CommandBuffer, firstViewport uint32, viewportCount uint32, pViewports []Viewport) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cfirstViewport, _ := (C.uint32_t)(firstViewport), cgoAllocsUnknown
cviewportCount, _ := (C.uint32_t)(viewportCount), cgoAllocsUnknown
cpViewports, _ := unpackArgSViewport(pViewports)
C.callVkCmdSetViewport(ccommandBuffer, cfirstViewport, cviewportCount, cpViewports)
packSViewport(pViewports, cpViewports)
}
// CmdSetScissor function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetScissor.html
func CmdSetScissor(commandBuffer CommandBuffer, firstScissor uint32, scissorCount uint32, pScissors []Rect2D) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cfirstScissor, _ := (C.uint32_t)(firstScissor), cgoAllocsUnknown
cscissorCount, _ := (C.uint32_t)(scissorCount), cgoAllocsUnknown
cpScissors, _ := unpackArgSRect2D(pScissors)
C.callVkCmdSetScissor(ccommandBuffer, cfirstScissor, cscissorCount, cpScissors)
packSRect2D(pScissors, cpScissors)
}
// CmdSetLineWidth function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetLineWidth.html
func CmdSetLineWidth(commandBuffer CommandBuffer, lineWidth float32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
clineWidth, _ := (C.float)(lineWidth), cgoAllocsUnknown
C.callVkCmdSetLineWidth(ccommandBuffer, clineWidth)
}
// CmdSetDepthBias function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetDepthBias.html
func CmdSetDepthBias(commandBuffer CommandBuffer, depthBiasConstantFactor float32, depthBiasClamp float32, depthBiasSlopeFactor float32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cdepthBiasConstantFactor, _ := (C.float)(depthBiasConstantFactor), cgoAllocsUnknown
cdepthBiasClamp, _ := (C.float)(depthBiasClamp), cgoAllocsUnknown
cdepthBiasSlopeFactor, _ := (C.float)(depthBiasSlopeFactor), cgoAllocsUnknown
C.callVkCmdSetDepthBias(ccommandBuffer, cdepthBiasConstantFactor, cdepthBiasClamp, cdepthBiasSlopeFactor)
}
// CmdSetBlendConstants function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetBlendConstants.html
func CmdSetBlendConstants(commandBuffer CommandBuffer, blendConstants *[4]float32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cblendConstants, _ := *(**C.float)(unsafe.Pointer(&blendConstants)), cgoAllocsUnknown
C.callVkCmdSetBlendConstants(ccommandBuffer, cblendConstants)
}
// CmdSetDepthBounds function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetDepthBounds.html
func CmdSetDepthBounds(commandBuffer CommandBuffer, minDepthBounds float32, maxDepthBounds float32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cminDepthBounds, _ := (C.float)(minDepthBounds), cgoAllocsUnknown
cmaxDepthBounds, _ := (C.float)(maxDepthBounds), cgoAllocsUnknown
C.callVkCmdSetDepthBounds(ccommandBuffer, cminDepthBounds, cmaxDepthBounds)
}
// CmdSetStencilCompareMask function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilCompareMask.html
func CmdSetStencilCompareMask(commandBuffer CommandBuffer, faceMask StencilFaceFlags, compareMask uint32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cfaceMask, _ := (C.VkStencilFaceFlags)(faceMask), cgoAllocsUnknown
ccompareMask, _ := (C.uint32_t)(compareMask), cgoAllocsUnknown
C.callVkCmdSetStencilCompareMask(ccommandBuffer, cfaceMask, ccompareMask)
}
// CmdSetStencilWriteMask function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilWriteMask.html
func CmdSetStencilWriteMask(commandBuffer CommandBuffer, faceMask StencilFaceFlags, writeMask uint32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cfaceMask, _ := (C.VkStencilFaceFlags)(faceMask), cgoAllocsUnknown
cwriteMask, _ := (C.uint32_t)(writeMask), cgoAllocsUnknown
C.callVkCmdSetStencilWriteMask(ccommandBuffer, cfaceMask, cwriteMask)
}
// CmdSetStencilReference function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilReference.html
func CmdSetStencilReference(commandBuffer CommandBuffer, faceMask StencilFaceFlags, reference uint32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cfaceMask, _ := (C.VkStencilFaceFlags)(faceMask), cgoAllocsUnknown
creference, _ := (C.uint32_t)(reference), cgoAllocsUnknown
C.callVkCmdSetStencilReference(ccommandBuffer, cfaceMask, creference)
}
// CmdBindDescriptorSets function as declared in https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindDescriptorSets.html
func CmdBindDescriptorSets(commandBuffer CommandBuffer, pipelineBindPoint PipelineBindPoint, layout PipelineLayout, firstSet uint32, descriptorSetCount uint32, pDescriptorSets []DescriptorSet, dynamicOffsetCount uint32, pDynamicOffsets []uint32) {
ccommandBuffer, _ := *(*C.VkCommandBuffer)(unsafe.Pointer(&commandBuffer)), cgoAllocsUnknown
cpipelineBindPoint, _ := (C.VkPipelineBindPoint)(pipelineBindPoint), cgoAllocsUnknown
clayout, _ := *(*C.VkPipelineLayout)(unsafe.Pointer(&layout)), cgoAllocsUnknown
cfirstSet, _ := (C.uint32_t)(firstSet), cgoAllocsUnknown
cdescriptorSetCount, _ := (C.uint32_t)(descriptorSetCount), cgoAllocsUnknown
cpDescriptorSets, _ := (*C.VkDescriptorSet)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&pDescriptorSets)).Data)), cgoAllocsUnknown
cdynamicOffsetCount, _ := (C.uint32_t)(dynamicOffsetCount), cgoAllocsUnknown