-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvk.go
More file actions
4566 lines (4152 loc) · 189 KB
/
vk.go
File metadata and controls
4566 lines (4152 loc) · 189 KB
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
// Copyright (c) 2015-2018 Khronos Group
// Copyright (c) 2018 Dominik Honnef
package vk
// #cgo pkg-config: vulkan
//
// #cgo noescape domVkAllocateCommandBuffers
// #cgo noescape domVkAllocateDescriptorSets
// #cgo noescape domVkAllocateMemory
// #cgo noescape domVkBeginCommandBuffer
// #cgo noescape domVkCmdBeginRenderPass
// #cgo noescape domVkCmdClearColorImage
// #cgo noescape domVkCreateBuffer
// #cgo noescape domVkCreateBufferView
// #cgo noescape domVkCreateCommandPool
// #cgo noescape domVkCreateDescriptorPool
// #cgo noescape domVkCreateDevice
// #cgo noescape domVkCreateEvent
// #cgo noescape domVkCreateFence
// #cgo noescape domVkCreateFramebuffer
// #cgo noescape domVkCreateImage
// #cgo noescape domVkCreateImageView
// #cgo noescape domVkCreateInstance
// #cgo noescape domVkCreatePipelineCache
// #cgo noescape domVkCreatePipelineLayout
// #cgo noescape domVkCreateQueryPool
// #cgo noescape domVkCreateSampler
// #cgo noescape domVkCreateSemaphore
// #cgo noescape domVkCreateShaderModule
// #cgo noescape domVkCreateSwapchainKHR
// #cgo noescape domVkEnumeratePhysicalDevices
// #cgo noescape domVkGetBufferMemoryRequirements2
// #cgo noescape domVkGetDeviceQueue2
// #cgo noescape domVkGetImageMemoryRequirements2
// #cgo noescape domVkGetPhysicalDeviceFeatures
// #cgo noescape domVkGetPhysicalDeviceFormatProperties2
// #cgo noescape domVkGetPhysicalDeviceImageFormatProperties2
// #cgo noescape domVkGetPhysicalDeviceMemoryProperties2
// #cgo noescape domVkGetPhysicalDeviceProperties2
//
// #cgo nocallback domVkAllocateCommandBuffers
// #cgo nocallback domVkAllocateDescriptorSets
// #cgo nocallback domVkAllocateMemory
// #cgo nocallback domVkBeginCommandBuffer
// #cgo nocallback domVkCmdBeginRenderPass
// #cgo nocallback domVkCmdClearColorImage
// #cgo nocallback domVkCreateBuffer
// #cgo nocallback domVkCreateBufferView
// #cgo nocallback domVkCreateCommandPool
// #cgo nocallback domVkCreateDescriptorPool
// #cgo nocallback domVkCreateDevice
// #cgo nocallback domVkCreateEvent
// #cgo nocallback domVkCreateFence
// #cgo nocallback domVkCreateFramebuffer
// #cgo nocallback domVkCreateImage
// #cgo nocallback domVkCreateImageView
// #cgo nocallback domVkCreateInstance
// #cgo nocallback domVkCreatePipelineCache
// #cgo nocallback domVkCreatePipelineLayout
// #cgo nocallback domVkCreateQueryPool
// #cgo nocallback domVkCreateSampler
// #cgo nocallback domVkCreateSemaphore
// #cgo nocallback domVkCreateShaderModule
// #cgo nocallback domVkCreateSwapchainKHR
// #cgo nocallback domVkEnumeratePhysicalDevices
// #cgo nocallback domVkGetBufferMemoryRequirements2
// #cgo nocallback domVkGetDeviceQueue2
// #cgo nocallback domVkGetImageMemoryRequirements2
// #cgo nocallback domVkGetPhysicalDeviceFeatures
// #cgo nocallback domVkGetPhysicalDeviceFormatProperties2
// #cgo nocallback domVkGetPhysicalDeviceImageFormatProperties2
// #cgo nocallback domVkGetPhysicalDeviceMemoryProperties2
// #cgo nocallback domVkGetPhysicalDeviceProperties2
//
// #include <stdlib.h>
// #include "vk.h"
import "C"
import (
"bytes"
"fmt"
"math"
"os"
"structs"
"time"
"unsafe"
"honnef.co/go/safeish"
)
// OPT(dh): if we wrote our own memory allocator, we could avoid the
// significant overhead of calling malloc and free.
// OPT(dh): we could replace large chunks of C info struct
// initializers with memcpys of our Go info structs. A lot of the
// time, they're mostly identical, aside from pNext and slices. This
// would replace a whole lot of MOV instructions with single
// runtime.memmove calls.
//
// We can create special structs with copy-range markers as [0]byte
// fields, cast our Go structs to these, and use them for
// straightforward copying. We should be able to code-generate these.
const debug = true
type (
DeviceSize = uint64
)
const (
// Vulkan 1.0 version number
APIVersion10 = Version(C.VK_API_VERSION_1_0)
// Vulkan 1.1 version number
APIVersion11 = Version(C.VK_API_VERSION_1_1)
)
var vkEnumerateInstanceVersion C.PFN_vkEnumerateInstanceVersion
var vkEnumerateInstanceExtensionProperties C.PFN_vkEnumerateInstanceExtensionProperties
var vkEnumerateInstanceLayerProperties C.PFN_vkEnumerateInstanceLayerProperties
var vkCreateInstance C.PFN_vkCreateInstance
var _ = "_"[unsafe.Sizeof(AttachmentDescription{})-C.sizeof_VkAttachmentDescription]
var _ = "_"[unsafe.Sizeof(AttachmentReference{})-C.sizeof_VkAttachmentReference]
var _ = "_"[unsafe.Sizeof(DescriptorSetLayout{})-C.sizeof_VkDescriptorSetLayout]
var _ = "_"[unsafe.Sizeof(Fence{})-C.sizeof_VkFence]
var _ = "_"[unsafe.Sizeof(ImageView{})-C.sizeof_VkImageView]
var _ = "_"[unsafe.Sizeof(MemoryHeap{})-C.sizeof_VkMemoryHeap]
var _ = "_"[unsafe.Sizeof(MemoryRequirements{})-C.sizeof_VkMemoryRequirements]
var _ = "_"[unsafe.Sizeof(MemoryType{})-C.sizeof_VkMemoryType]
var _ = "_"[unsafe.Sizeof(PushConstantRange{})-C.sizeof_VkPushConstantRange]
var _ = "_"[unsafe.Sizeof(Rect2D{})-C.sizeof_VkRect2D]
var _ = "_"[unsafe.Sizeof(Semaphore{})-C.sizeof_VkSemaphore]
var _ = "_"[unsafe.Sizeof(SubpassDependency{})-C.sizeof_VkSubpassDependency]
var _ = "_"[unsafe.Sizeof(VertexInputAttributeDescription{})-C.sizeof_VkVertexInputAttributeDescription]
var _ = "_"[unsafe.Sizeof(VertexInputBindingDescription{})-C.sizeof_VkVertexInputBindingDescription]
var _ = "_"[unsafe.Sizeof(Viewport{})-C.sizeof_VkViewport]
var _ = "_"[unsafe.Sizeof(ComponentMapping{})-C.sizeof_VkComponentMapping]
var _ = "_"[unsafe.Sizeof(ImageSubresourceRange{})-C.sizeof_VkImageSubresourceRange]
var _ = "_"[unsafe.Sizeof(ClearDepthStencilValue{})-C.sizeof_VkClearDepthStencilValue]
var _ = "_"[unsafe.Sizeof(BufferCopy{})-C.sizeof_VkBufferCopy]
var _ = "_"[unsafe.Sizeof(BufferImageCopy{})-C.sizeof_VkBufferImageCopy]
var _ = "_"[unsafe.Sizeof(ImageSubresourceLayers{})-C.sizeof_VkImageSubresourceLayers]
var _ = "_"[unsafe.Sizeof(ImageCopy{})-C.sizeof_VkImageCopy]
var _ = "_"[unsafe.Sizeof(ImageBlit{})-C.sizeof_VkImageBlit]
var _ = "_"[unsafe.Sizeof(Event{})-C.sizeof_VkEvent]
var _ = "_"[unsafe.Sizeof(ImageResolve{})-C.sizeof_VkImageResolve]
var _ = "_"[unsafe.Sizeof(DescriptorPoolSize{})-C.sizeof_VkDescriptorPoolSize]
var _ = "_"[unsafe.Sizeof(DescriptorSet{})-C.sizeof_VkDescriptorSet]
var _ = "_"[unsafe.Sizeof(DescriptorBufferInfo{})-C.sizeof_VkDescriptorBufferInfo]
var _ = "_"[unsafe.Sizeof(DescriptorImageInfo{})-C.sizeof_VkDescriptorImageInfo]
var _ = "_"[unsafe.Sizeof(FormatProperties{})-C.sizeof_VkFormatProperties]
func init() {
vkEnumerateInstanceVersion =
C.PFN_vkEnumerateInstanceVersion(mustVkGetInstanceProcAddr(nil, "vkEnumerateInstanceVersion"))
vkEnumerateInstanceExtensionProperties =
C.PFN_vkEnumerateInstanceExtensionProperties(mustVkGetInstanceProcAddr(nil, "vkEnumerateInstanceExtensionProperties"))
vkEnumerateInstanceLayerProperties =
C.PFN_vkEnumerateInstanceLayerProperties(mustVkGetInstanceProcAddr(nil, "vkEnumerateInstanceLayerProperties"))
vkCreateInstance =
C.PFN_vkCreateInstance(mustVkGetInstanceProcAddr(nil, "vkCreateInstance"))
}
// MakeVersion constructs an API version number.
func MakeVersion(major, minor, patch uint32) Version {
return Version(major<<22 | minor<<12 | patch)
}
type Version uint32
func (v Version) String() string {
// return major<<22 | minor<<12 | patch
major := (v >> 22)
minor := (v >> 12) & 0x3FF
patch := v & 0xFFF
return fmt.Sprintf("%d.%d.%d", major, minor, patch)
}
func InstanceVersion() Version {
var v Version
C.domVkEnumerateInstanceVersion(vkEnumerateInstanceVersion, (*C.uint32_t)(unsafe.Pointer(&v)))
return v
}
type LayerProperties struct {
LayerName string
SpecVersion Version
ImplementationVersion uint32
Description string
}
func InstanceLayerProperties() ([]LayerProperties, error) {
for {
var count C.uint32_t
res := Result(C.domVkEnumerateInstanceLayerProperties(vkEnumerateInstanceLayerProperties, &count, nil))
if res != Success {
return nil, res
}
cprops := make([]C.VkLayerProperties, count)
res = Result(C.domVkEnumerateInstanceLayerProperties(vkEnumerateInstanceLayerProperties, &count, unsafe.SliceData(cprops)))
if res == Success {
out := make([]LayerProperties, count)
cprops = cprops[:count]
for i := range cprops {
out[i] = LayerProperties{
LayerName: str(cprops[i].layerName[:]),
SpecVersion: Version(cprops[i].specVersion),
ImplementationVersion: uint32(cprops[i].implementationVersion),
Description: str(cprops[i].description[:]),
}
}
return out, nil
}
if res == Incomplete {
continue
}
return nil, res
}
}
func InstanceExtensionProperties(layerName string) ([]ExtensionProperties, error) {
var cname *C.char
if layerName != "" {
cname = C.CString(layerName)
defer C.free(unsafe.Pointer(cname))
}
for {
var count C.uint32_t
res := Result(C.domVkEnumerateInstanceExtensionProperties(vkEnumerateInstanceExtensionProperties, cname, &count, nil))
if res != Success {
return nil, res
}
cprops := make([]C.VkExtensionProperties, count)
res = Result(C.domVkEnumerateInstanceExtensionProperties(vkEnumerateInstanceExtensionProperties, cname, &count, unsafe.SliceData(cprops)))
if res == Success {
out := make([]ExtensionProperties, count)
cprops = cprops[:count]
for i := range cprops {
out[i] = ExtensionProperties{
Name: str(cprops[i].extensionName[:]),
SpecVersion: uint32(cprops[i].specVersion),
}
}
return out, nil
}
if res == Incomplete {
continue
}
return nil, res
}
}
type InstanceCreateInfo struct {
Extensions []Extension
// If not nil, this information helps implementations recognize behavior inherent to classes of applications
ApplicationInfo *ApplicationInfo
// Names of layers to enable for the created instance
EnabledLayerNames []string
// Names of extensions to enable
EnabledExtensionNames []string
}
type ApplicationInfo struct {
Extensions []Extension
// The name of the application
ApplicationName string
// The developer-supplied version number of the application
ApplicationVersion Version
// The name of the engine (if any) used to create the application
EngineName string
// The developer-supplied version number of the engine used to create the application
EngineVersion Version
// The highest version of Vulkan that the application is designed to use
APIVersion Version
}
// There is no global state in Vulkan and all per-application state is stored in an Instance object.
// Creating an Instance object initializes the Vulkan library
// and allows the application to pass information about itself to the implementation.
type Instance struct {
// VK_DEFINE_HANDLE(VkInstance)
hnd C.VkInstance
fps [instanceMaxPFN]C.PFN_vkVoidFunction
}
func CreateInstance(info *InstanceCreateInfo) (*Instance, error) {
a := new(allocator)
defer a.free()
var ptr C.VkInstanceCreateInfo
ptr.sType = C.VkStructureType(StructureTypeInstanceCreateInfo)
ptr.pNext = buildChain(a, info.Extensions)
defer internalizeChain(info.Extensions, ptr.pNext)
ptr.enabledLayerCount = C.uint32_t(len(info.EnabledLayerNames))
ptr.enabledExtensionCount = C.uint32_t(len(info.EnabledExtensionNames))
ptr.ppEnabledLayerNames = externStrings(a, info.EnabledLayerNames)
ptr.ppEnabledExtensionNames = externStrings(a, info.EnabledExtensionNames)
if info.ApplicationInfo != nil {
ptr.pApplicationInfo = alloc[C.VkApplicationInfo](a)
ptr.pApplicationInfo.sType = C.VkStructureType(StructureTypeApplicationInfo)
ptr.pApplicationInfo.pNext = buildChain(a, info.ApplicationInfo.Extensions)
ptr.pApplicationInfo.pApplicationName = externString(a, info.ApplicationInfo.ApplicationName)
ptr.pApplicationInfo.applicationVersion = C.uint32_t(info.ApplicationInfo.ApplicationVersion)
ptr.pApplicationInfo.pEngineName = externString(a, info.ApplicationInfo.EngineName)
ptr.pApplicationInfo.engineVersion = C.uint32_t(info.ApplicationInfo.EngineVersion)
ptr.pApplicationInfo.apiVersion = C.uint32_t(info.ApplicationInfo.APIVersion)
defer internalizeChain(info.ApplicationInfo.Extensions, ptr.pApplicationInfo.pNext)
}
var instance C.VkInstance
res := Result(C.domVkCreateInstance(vkCreateInstance, &ptr, nil, &instance))
if res != Success {
return nil, res
}
out := &Instance{hnd: instance}
out.init()
return out, nil
}
func (ins *Instance) Destroy() {
// TODO(dh): support a custom allocator
C.domVkDestroyInstance(ins.fps[vkDestroyInstance], ins.hnd, nil)
}
func (ins *Instance) init() {
for i, name := range instanceFpNames {
ins.fps[i] = vkGetInstanceProcAddr(ins.hnd, name)
}
}
func (ins *Instance) PhysicalDevices() ([]*PhysicalDevice, error) {
count := C.uint32_t(1)
var devs []C.VkPhysicalDevice
for {
devs = make([]C.VkPhysicalDevice, count)
res := Result(C.domVkEnumeratePhysicalDevices(ins.fps[vkEnumeratePhysicalDevices], ins.hnd, &count, unsafe.SliceData(devs)))
if res != Success && res != Incomplete {
return nil, res
}
if res == Success {
break
}
if res == Incomplete {
continue
}
panic(fmt.Sprintf("unexpected result %s", res))
}
var out []*PhysicalDevice
for _, dev := range devs {
out = append(out, &PhysicalDevice{dev, ins})
}
return out, nil
}
// Vulkan separates the concept of physical and logical devices.
// A physical device usually represents a single complete implementation of Vulkan
// (excluding instance-level functionality)
// available to the host, of which there are a finite number.
// A logical device represents an instance of that implementation
// with its own state and resources independent of other logical devices.
type PhysicalDevice struct {
// VK_DEFINE_HANDLE(VkPhysicalDevice)
hnd C.VkPhysicalDevice
instance *Instance
}
type PhysicalDeviceLimits struct {
// MaxImageDimension1D is the maximum dimension (width) supported
// for all images created with an imageType of ImageType1D.
MaxImageDimension1D uint32
// MaxImageDimension2D is the maximum dimension (width or height)
// supported for all images created with an imageType of
// ImageType2D and without ImageCreateCubeCompatibleBit set in
// flags.
MaxImageDimension2D uint32
// MaxImageDimension3D is the maximum dimension (width, height, or
// depth) supported for all images created with an imageType of
// ImageType3D.
MaxImageDimension3D uint32
// MaxImageDimensionCube is the maximum dimension (width or
// height) supported for all images created with an imageType of
// ImageType2D and with ImageCreateCubeCompatibleBit set in flags.
MaxImageDimensionCube uint32
// MaxImageArrayLayers is the maximum number of layers
// (arrayLayers) for an image.
MaxImageArrayLayers uint32
// MaxTexelBufferElements is the maximum number of addressable
// texels for a buffer view created on a buffer which was created
// with the BufferUsageUniformTexelBufferBit or
// BufferUsageStorageTexelBufferBit set in the Usage field of the
// BufferCreateInfo structure.
MaxTexelBufferElements uint32
// MaxUniformBufferRange is the maximum value that can be
// specified in the Range field of any DescriptorBufferInfo
// structures passed to a call to UpdateDescriptorSets for
// descriptors of type DescriptorTypeUniformBuffer or
// DescriptorTypeUniformBufferDynamic.
MaxUniformBufferRange uint32
// MaxStorageBufferRange is the maximum value that can be
// specified in the Range field of any DescriptorBufferInfo
// structures passed to a call to UpdateDescriptorSets for
// descriptors of type DescriptorTypeStorageBuffer or
// DescriptorTypeStorageBufferDynamic.
MaxStorageBufferRange uint32
// MaxPushConstantsSize is the maximum size, in bytes, of the pool
// of push constant memory. For each of the push constant ranges
// indicated by the PushConstantRanges field of the
// PipelineLayoutCreateInfo structure, (offset + size) must be
// less than or equal to this limit.
MaxPushConstantsSize uint32
// MaxMemoryAllocationCount is the maximum number of device memory
// allocations, as created by AllocateMemory, which can
// simultaneously exist.
MaxMemoryAllocationCount uint32
// MaxSamplerAllocationCount is the maximum number of sampler
// objects, as created by CreateSampler, which can
// simultaneously exist on a device.
MaxSamplerAllocationCount uint32
// BufferImageGranularity is the granularity, in bytes, at which
// buffer or linear image resources, and optimal image resources
// can be bound to adjacent offsets in the same DeviceMemory
// object without aliasing. See Buffer-Image Granularity for more
// details.
BufferImageGranularity DeviceSize
// SparseAddressSpaceSize is the total amount of address space
// available, in bytes, for sparse memory resources. This is an
// upper bound on the sum of the size of all sparse resources,
// regardless of whether any memory is bound to them.
SparseAddressSpaceSize DeviceSize
// MaxBoundDescriptorSets is the maximum number of descriptor sets
// that can be simultaneously used by a pipeline. All
// DescriptorSet decorations in shader modules must have a value
// less than maxBoundDescriptorSets.
MaxBoundDescriptorSets uint32
// MaxPerStageDescriptorSamplers is the maximum number of samplers
// that can be accessible to a single shader stage in a pipeline
// layout. Descriptors with a type of DescriptorTypeSampler or
// DescriptorTypeCombinedImageSampler count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit. A descriptor is accessible to a
// shader stage when the StageFlags field of the
// DescriptorSetLayoutBinding structure has the bit for that
// shader stage set.
MaxPerStageDescriptorSamplers uint32
// MaxPerStageDescriptorUniformBuffers is the maximum number of
// uniform buffers that can be accessible to a single shader stage
// in a pipeline layout. Descriptors with a type of
// DescriptorTypeUniformBuffer or
// DescriptorTypeUniformBufferDynamic count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit. A descriptor is accessible to a
// shader stage when the StageFlags field of the
// DescriptorSetLayoutBinding structure has the bit for that
// shader stage set.
MaxPerStageDescriptorUniformBuffers uint32
// MaxPerStageDescriptorStorageBuffers is the maximum number of
// storage buffers that can be accessible to a single shader stage
// in a pipeline layout. Descriptors with a type of
// DescriptorTypeStorageBuffer or
// DescriptorTypeStorageBufferDynamic count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit. A descriptor is accessible to a
// pipeline shader stage when the StageFlags field of the
// DescriptorSetLayoutBinding structure has the bit for that
// shader stage set.
MaxPerStageDescriptorStorageBuffers uint32
// MaxPerStageDescriptorSampledImages is the maximum number of
// sampled images that can be accessible to a single shader stage
// in a pipeline layout. Descriptors with a type of
// DescriptorTypeCombinedImageSampler, DescriptorTypeSampledImage,
// or DescriptorTypeUniformTexelBuffer count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit. A descriptor is accessible to a
// pipeline shader stage when the StageFlags field of the
// DescriptorSetLayoutBinding structure has the bit for that
// shader stage set.
MaxPerStageDescriptorSampledImages uint32
// MaxPerStageDescriptorStorageImages is the maximum number of
// storage images that can be accessible to a single shader stage
// in a pipeline layout. Descriptors with a type of
// DescriptorTypeStorageImage, or DescriptorTypeStorageTexelBuffer
// count against this limit. Only descriptors in descriptor set
// layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit. A descriptor is accessible to a
// pipeline shader stage when the StageFlags field of the
// DescriptorSetLayoutBinding structure has the bit for that
// shader stage set.
MaxPerStageDescriptorStorageImages uint32
// MaxPerStageDescriptorInputAttachments is the maximum number of
// input attachments that can be accessible to a single shader
// stage in a pipeline layout. Descriptors with a type of
// DescriptorTypeInputAttachment count against this limit. Only
// descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit. A descriptor is accessible to a
// pipeline shader stage when the StageFlags field of the
// DescriptorSetLayoutBinding structure has the bit for that
// shader stage set. These are only supported for the fragment
// stage.
MaxPerStageDescriptorInputAttachments uint32
// MaxPerStageResources is the maximum number of resources that
// can be accessible to a single shader stage in a pipeline
// layout. Descriptors with a type of
// DescriptorTypeCombinedImageSampler, DescriptorTypeSampledImage,
// DescriptorTypeStorageImage, DescriptorTypeUniformTexelBuffer,
// DescriptorTypeStorageTexelBuffer, DescriptorTypeUniformBuffer,
// DescriptorTypeStorageBuffer,
// DescriptorTypeUniformBufferDynamic,
// DescriptorTypeStorageBufferDynamic, or
// DescriptorTypeInputAttachment count against this limit. Only
// descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit. For the fragment shader stage the
// framebuffer color attachments also count against this limit.
MaxPerStageResources uint32
// MaxDescriptorSetSamplers is the maximum number of samplers that
// can be included in descriptor bindings in a pipeline layout
// across all pipeline shader stages and descriptor set numbers.
// Descriptors with a type of DescriptorTypeSampler or
// DescriptorTypeCombinedImageSampler count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetSamplers uint32
// MaxDescriptorSetUniformBuffers is the maximum number of uniform
// buffers that can be included in descriptor bindings in a
// pipeline layout across all pipeline shader stages and
// descriptor set numbers. Descriptors with a type of
// DescriptorTypeUniformBuffer or
// DescriptorTypeUniformBufferDynamic count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetUniformBuffers uint32
// MaxDescriptorSetUniformBuffersDynamic is the maximum number of
// dynamic uniform buffers that can be included in descriptor
// bindings in a pipeline layout across all pipeline shader stages
// and descriptor set numbers. Descriptors with a type of
// DescriptorTypeUniformBufferDynamic count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetUniformBuffersDynamic uint32
// MaxDescriptorSetStorageBuffers is the maximum number of storage
// buffers that can be included in descriptor bindings in a
// pipeline layout across all pipeline shader stages and
// descriptor set numbers. Descriptors with a type of
// DescriptorTypeStorageBuffer or
// DescriptorTypeStorageBufferDynamic count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetStorageBuffers uint32
// MaxDescriptorSetStorageBuffersDynamic is the maximum number of
// dynamic storage buffers that can be included in descriptor
// bindings in a pipeline layout across all pipeline shader stages
// and descriptor set numbers. Descriptors with a type of
// DescriptorTypeStorageBufferDynamic count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetStorageBuffersDynamic uint32
// MaxDescriptorSetSampledImages is the maximum number of sampled
// images that can be included in descriptor bindings in a
// pipeline layout across all pipeline shader stages and
// descriptor set numbers. Descriptors with a type of
// DescriptorTypeCombinedImageSampler, DescriptorTypeSampledImage,
// or DescriptorTypeUniformTexelBuffer count against this limit.
// Only descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetSampledImages uint32
// MaxDescriptorSetStorageImages is the maximum number of storage
// images that can be included in descriptor bindings in a
// pipeline layout across all pipeline shader stages and
// descriptor set numbers. Descriptors with a type of
// DescriptorTypeStorageImage, or DescriptorTypeStorageTexelBuffer
// count against this limit. Only descriptors in descriptor set
// layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetStorageImages uint32
// MaxDescriptorSetInputAttachments is the maximum number of input
// attachments that can be included in descriptor bindings in a
// pipeline layout across all pipeline shader stages and
// descriptor set numbers. Descriptors with a type of
// DescriptorTypeInputAttachment count against this limit. Only
// descriptors in descriptor set layouts created without the
// DescriptorSetLayoutCreateUpdateAfterBindPoolBitEXT bit set
// count against this limit.
MaxDescriptorSetInputAttachments uint32
// MaxVertexInputAttributes is the maximum number of vertex input
// attributes that can be specified for a graphics pipeline. These
// are described in the array of VertexInputAttributeDescription
// structures that are provided at graphics pipeline creation time
// via the VertexAttributeDescriptions field of the
// PipelineVertexInputStateCreateInfo structure.
MaxVertexInputAttributes uint32
// MaxVertexInputBindings is the maximum number of vertex buffers
// that can be specified for providing vertex attributes to a
// graphics pipeline. These are described in the array of
// VertexInputBindingDescription structures that are provided at
// graphics pipeline creation time via the
// VertexBindingDescriptions field of the
// PipelineVertexInputStateCreateInfo structure. The Binding field
// of VertexInputBindingDescription must be less than this limit.
MaxVertexInputBindings uint32
// MaxVertexInputAttributeOffset is the maximum vertex input
// attribute offset that can be added to the vertex input binding
// stride. The Offset field of the VertexInputAttributeDescription
// structure must be less than or equal to this limit.
MaxVertexInputAttributeOffset uint32
// MaxVertexInputBindingStride is the maximum vertex input binding
// stride that can be specified in a vertex input binding. The
// Stride field of the VertexInputBindingDescription structure
// must be less than or equal to this limit.
MaxVertexInputBindingStride uint32
// MaxVertexOutputComponents is the maximum number of components
// of output variables which can be output by a vertex shader.
MaxVertexOutputComponents uint32
// MaxTessellationGenerationLevel is the maximum tessellation
// generation level supported by the fixed-function tessellation
// primitive generator.
MaxTessellationGenerationLevel uint32
// MaxTessellationPatchSize is the maximum patch size, in
// vertices, of patches that can be processed by the tessellation
// control shader and tessellation primitive generator. The
// PatchControlPoints field of the
// PipelineTessellationStateCreateInfo structure specified at
// pipeline creation time and the value provided in the
// OutputVertices execution mode of shader modules must be less
// than or equal to this limit.
MaxTessellationPatchSize uint32
// MaxTessellationControlPerVertexInputComponents is the maximum
// number of components of input variables which can be provided
// as per-vertex inputs to the tessellation control shader stage.
MaxTessellationControlPerVertexInputComponents uint32
// MaxTessellationControlPerVertexOutputComponents is the maximum
// number of components of per-vertex output variables which can
// be output from the tessellation control shader stage.
MaxTessellationControlPerVertexOutputComponents uint32
// MaxTessellationControlPerPatchOutputComponents is the maximum
// number of components of per-patch output variables which can be
// output from the tessellation control shader stage.
MaxTessellationControlPerPatchOutputComponents uint32
// MaxTessellationControlTotalOutputComponents is the maximum
// total number of components of per-vertex and per-patch output
// variables which can be output from the tessellation control
// shader stage.
MaxTessellationControlTotalOutputComponents uint32
// MaxTessellationEvaluationInputComponents is the maximum number
// of components of input variables which can be provided as
// per-vertex inputs to the tessellation evaluation shader stage.
MaxTessellationEvaluationInputComponents uint32
// MaxTessellationEvaluationOutputComponents is the maximum number
// of components of per-vertex output variables which can be
// output from the tessellation evaluation shader stage.
MaxTessellationEvaluationOutputComponents uint32
// MaxGeometryShaderInvocations is the maximum invocation count
// supported for instanced geometry shaders. The value provided in
// the Invocations execution mode of shader modules must be less
// than or equal to this limit.
MaxGeometryShaderInvocations uint32
// MaxGeometryInputComponents is the maximum number of components
// of input variables which can be provided as inputs to the
// geometry shader stage.
MaxGeometryInputComponents uint32
// MaxGeometryOutputComponents is the maximum number of components
// of output variables which can be output from the geometry
// shader stage.
MaxGeometryOutputComponents uint32
// MaxGeometryOutputVertices is the maximum number of vertices
// which can be emitted by any geometry shader.
MaxGeometryOutputVertices uint32
// MaxGeometryTotalOutputComponents is the maximum total number of
// components of output, across all emitted vertices, which can be
// output from the geometry shader stage.
MaxGeometryTotalOutputComponents uint32
// MaxFragmentInputComponents is the maximum number of components
// of input variables which can be provided as inputs to the
// fragment shader stage.
MaxFragmentInputComponents uint32
// MaxFragmentOutputAttachments is the maximum number of output
// attachments which can be written to by the fragment shader
// stage.
MaxFragmentOutputAttachments uint32
// MaxFragmentDualSrcAttachments is the maximum number of output
// attachments which can be written to by the fragment shader
// stage when blending is enabled and one of the dual source blend
// modes is in use.
MaxFragmentDualSrcAttachments uint32
// MaxFragmentCombinedOutputResources is the total number of
// storage buffers, storage images, and output buffers which can
// be used in the fragment shader stage.
MaxFragmentCombinedOutputResources uint32
// MaxComputeSharedMemorySize is the maximum total storage size,
// in bytes, of all variables declared with the WorkgroupLocal
// storage class in shader modules (or with the shared storage
// qualifier in GLSL) in the compute shader stage.
MaxComputeSharedMemorySize uint32
// MaxComputeWorkGroupCount is the maximum number of local
// workgroups that can be dispatched by a single dispatch command.
// These three values represent the maximum number of local
// workgroups for the X, Y, and Z dimensions, respectively. The
// workgroup count parameters to the dispatch commands must be
// less than or equal to the corresponding limit.
MaxComputeWorkGroupCount [3]uint32
// MaxComputeWorkGroupInvocations is the maximum total number of
// compute shader invocations in a single local workgroup. The
// product of the X, Y, and Z sizes as specified by the LocalSize
// execution mode in shader modules and by the object decorated by
// the WorkgroupSize decoration must be less than or equal to this
// limit.
MaxComputeWorkGroupInvocations uint32
// MaxComputeWorkGroupSize is the maximum size of a local compute
// workgroup, per dimension. These three values represent the
// maximum local workgroup size in the X, Y, and Z dimensions,
// respectively. The x, y, and z sizes specified by the LocalSize
// execution mode and by the object decorated by the WorkgroupSize
// decoration in shader modules must be less than or equal to the
// corresponding limit.
MaxComputeWorkGroupSize [3]uint32
// SubPixelPrecisionBits is the number of bits of subpixel
// precision in framebuffer coordinates xf and yf.
SubPixelPrecisionBits uint32
// SubTexelPrecisionBits is the number of bits of precision in the
// division along an axis of an image used for minification and
// magnification filters. 2subTexelPrecisionBits is the actual
// number of divisions along each axis of the image represented.
// Sub-texel values calculated during image sampling will snap to
// these locations when generating the filtered results.
SubTexelPrecisionBits uint32
// MipmapPrecisionBits is the number of bits of division that the
// LOD calculation for mipmap fetching get snapped to when
// determining the contribution from each mip level to the mip
// filtered results. 2mipmapPrecisionBits is the actual number of
// divisions.
MipmapPrecisionBits uint32
// MaxDrawIndexedIndexValue is the maximum index value that can be
// used for indexed draw calls when using 32-bit indices. This
// excludes the primitive restart index value of 0xFFFFFFFF.
MaxDrawIndexedIndexValue uint32
// MaxDrawIndirectCount is the maximum draw count that is
// supported for indirect draw calls.
MaxDrawIndirectCount uint32
// MaxSamplerLodBias is the maximum absolute sampler LOD bias. The
// sum of the MipLodBias field of the SamplerCreateInfo structure
// and the Bias operand of image sampling operations in shader
// modules (or 0 if no Bias operand is provided to an image
// sampling operation) are clamped to the range
// [-maxSamplerLodBias,+maxSamplerLodBias].
MaxSamplerLodBias float32
// MaxSamplerAnisotropy is the maximum degree of sampler
// anisotropy. The maximum degree of anisotropic filtering used
// for an image sampling operation is the minimum of the
// MaxAnisotropy field of the SamplerCreateInfo structure and this
// limit.
MaxSamplerAnisotropy float32
// MaxViewports is the maximum number of active viewports. The
// ViewportCount field of the PipelineViewportStateCreateInfo
// structure that is provided at pipeline creation must be less
// than or equal to this limit.
MaxViewports uint32
// MaxViewportDimensions are the maximum viewport dimensions in
// the X (width) and Y (height) dimensions, respectively. The
// maximum viewport dimensions must be greater than or equal to
// the largest image which can be created and used as a
// framebuffer attachment.
MaxViewportDimensions [2]uint32
// ViewportBoundsRange is the [minimum, maximum] range that the
// corners of a viewport must be contained in. This range must be
// at least [-2 × size, 2 × size - 1], where size =
// max(maxViewportDimensions[0], maxViewportDimensions[1]).
ViewportBoundsRange [2]float32
// ViewportSubPixelBits is the number of bits of subpixel
// precision for viewport bounds. The subpixel precision that
// floating-point viewport bounds are interpreted at is given by
// this limit.
ViewportSubPixelBits uint32
// MinMemoryMapAlignment is the minimum required alignment, in
// bytes, of host visible memory allocations within the host
// address space. When mapping a memory allocation with
// MapMemory, subtracting offset bytes from the returned pointer
// will always produce an integer multiple of this limit.
MinMemoryMapAlignment uintptr
// MinTexelBufferOffsetAlignment is the minimum required
// alignment, in bytes, for the Offset field of the
// BufferViewCreateInfo structure for texel buffers. When a buffer
// view is created for a buffer which was created with
// BufferUsageUniformTexelBufferBit or
// BufferUsageStorageTexelBufferBit set in the Usage field of the
// BufferCreateInfo structure, the offset must be an integer
// multiple of this limit.
MinTexelBufferOffsetAlignment DeviceSize
// MinUniformBufferOffsetAlignment is the minimum required
// alignment, in bytes, for the Offset field of the
// DescriptorBufferInfo structure for uniform buffers. When a
// descriptor of type DescriptorTypeUniformBuffer or
// DescriptorTypeUniformBufferDynamic is updated, the offset must
// be an integer multiple of this limit. Similarly, dynamic
// offsets for uniform buffers must be multiples of this limit.
MinUniformBufferOffsetAlignment DeviceSize
// MinStorageBufferOffsetAlignment is the minimum required
// alignment, in bytes, for the Offset field of the
// DescriptorBufferInfo structure for storage buffers. When a
// descriptor of type DescriptorTypeStorageBuffer or
// DescriptorTypeStorageBufferDynamic is updated, the offset must
// be an integer multiple of this limit. Similarly, dynamic
// offsets for storage buffers must be multiples of this limit.
MinStorageBufferOffsetAlignment DeviceSize
// MinTexelOffset is the minimum offset value for the ConstOffset
// image operand of any of the OpImageSample* or OpImageFetch*
// image instructions.
MinTexelOffset int32
// MaxTexelOffset is the maximum offset value for the ConstOffset
// image operand of any of the OpImageSample* or OpImageFetch*
// image instructions.
MaxTexelOffset uint32
// MinTexelGatherOffset is the minimum offset value for the Offset
// or ConstOffsets image operands of any of the OpImage*Gather
// image instructions.
MinTexelGatherOffset int32
// MaxTexelGatherOffset is the maximum offset value for the Offset
// or ConstOffsets image operands of any of the OpImage*Gather
// image instructions.
MaxTexelGatherOffset uint32
// MinInterpolationOffset is the minimum negative offset value for
// the offset operand of the InterpolateAtOffset extended
// instruction.
MinInterpolationOffset float32
// MaxInterpolationOffset is the maximum positive offset value for
// the offset operand of the InterpolateAtOffset extended
// instruction.
MaxInterpolationOffset float32
// SubPixelInterpolationOffsetBits is the number of subpixel
// fractional bits that the x and y offsets to the
// InterpolateAtOffset extended instruction may be rounded to as
// fixed-point values.
SubPixelInterpolationOffsetBits uint32
// MaxFramebufferWidth is the maximum width for a framebuffer. The
// Width field of the FramebufferCreateInfo structure must be less
// than or equal to this limit.
MaxFramebufferWidth uint32
// MaxFramebufferHeight is the maximum height for a framebuffer.
// The Height field of the FramebufferCreateInfo structure must be
// less than or equal to this limit.
MaxFramebufferHeight uint32
// MaxFramebufferLayers is the maximum layer count for a layered
// framebuffer. The Layers field of the FramebufferCreateInfo
// structure must be less than or equal to this limit.
MaxFramebufferLayers uint32
// FramebufferColorSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the color sample counts that are
// supported for all framebuffer color attachments with floating-
// or fixed-point formats. There is no limit that specifies the
// color sample counts that are supported for all color
// attachments with integer formats.
FramebufferColorSampleCounts SampleCountFlags
// FramebufferDepthSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the supported depth sample
// counts for all framebuffer depth/stencil attachments, when the
// format includes a depth component.
FramebufferDepthSampleCounts SampleCountFlags
// FramebufferStencilSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the supported stencil sample
// counts for all framebuffer depth/stencil attachments, when the
// format includes a stencil component.
FramebufferStencilSampleCounts SampleCountFlags
// FramebufferNoAttachmentsSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the supported sample counts for
// a framebuffer with no attachments.
FramebufferNoAttachmentsSampleCounts SampleCountFlags
// MaxColorAttachments is the maximum number of color attachments
// that can be used by a subpass in a render pass. The
// ColorAttachmentCount field of the SubpassDescription structure
// must be less than or equal to this limit.
MaxColorAttachments uint32
// SampledImageColorSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the sample counts supported for
// all 2D images created with ImageTilingOptimal, usage containing
// ImageUsageSampledBit, and a non-integer color format.
SampledImageColorSampleCounts SampleCountFlags
// SampledImageIntegerSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the sample counts supported for
// all 2D images created with ImageTilingOptimal, usage containing
// ImageUsageSampledBit, and an integer color format.
SampledImageIntegerSampleCounts SampleCountFlags
// SampledImageDepthSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the sample counts supported for
// all 2D images created with ImageTilingOptimal, usage containing
// ImageUsageSampledBit, and a depth format.
SampledImageDepthSampleCounts SampleCountFlags
// SampledImageStencilSampleCounts is a bitmask1 of
// SampleCountFlagBits indicating the sample supported for all 2D
// images created with ImageTilingOptimal, usage containing
// ImageUsageSampledBit, and a stencil format.
SampledImageStencilSampleCounts SampleCountFlags
// StorageImageSampleCounts is a bitmask1 of SampleCountFlagBits
// indicating the sample counts supported for all 2D images
// created with ImageTilingOptimal, and usage containing
// ImageUsageStorageBit.
StorageImageSampleCounts SampleCountFlags
// MaxSampleMaskWords is the maximum number of array elements of a
// variable decorated with the SampleMask built-in decoration.
MaxSampleMaskWords uint32
// TimestampComputeAndGraphics specifies support for timestamps on
// all graphics and compute queues. If this limit is set to true,
// all queues that advertise the QueueGraphicsBit or
// QueueComputeBit in the QueueFamilyProperties::queueFlags
// support QueueFamilyProperties::timestampValidBits of at least
// 36.
TimestampComputeAndGraphics bool
// TimestampPeriod is the number of nanoseconds required for a
// timestamp query to be incremented by 1.
TimestampPeriod float32
// MaxClipDistances is the maximum number of clip distances that
// can be used in a single shader stage. The size of any array
// declared with the ClipDistance built-in decoration in a shader
// module must be less than or equal to this limit.
MaxClipDistances uint32
// MaxCullDistances is the maximum number of cull distances that
// can be used in a single shader stage. The size of any array
// declared with the CullDistance built-in decoration in a shader
// module must be less than or equal to this limit.
MaxCullDistances uint32
// MaxCombinedClipAndCullDistances is the maximum combined number
// of clip and cull distances that can be used in a single shader
// stage. The sum of the sizes of any pair of arrays declared with
// the ClipDistance and CullDistance built-in decoration used by a
// single shader stage in a shader module must be less than or
// equal to this limit.
MaxCombinedClipAndCullDistances uint32
// DiscreteQueuePriorities is the number of discrete priorities
// that can be assigned to a queue based on the value of each
// field of DeviceQueueCreateInfo.QueuePriorities. This must be at
// least 2, and levels must be spread evenly over the range, with
// at least one level at 1.0, and another at 0.0.
DiscreteQueuePriorities uint32
// PointSizeRange is the range [minimum,maximum] of supported
// sizes for points. Values written to variables decorated with
// the PointSize built-in decoration are clamped to this range.
PointSizeRange [2]float32
// LineWidthRange is the range [minimum,maximum] of supported
// widths for lines. Values specified by the LineWidth field of
// the PipelineRasterizationStateCreateInfo or the lineWidth
// parameter to SetLineWidth are clamped to this range.
LineWidthRange [2]float32
// PointSizeGranularity is the granularity of supported point
// sizes. Not all point sizes in the range defined by
// pointSizeRange are supported. This limit specifies the
// granularity (or increment) between successive supported point
// sizes.
PointSizeGranularity float32
// LineWidthGranularity is the granularity of supported line
// widths. Not all line widths in the range defined by
// lineWidthRange are supported. This limit specifies the
// granularity (or increment) between successive supported line
// widths.
LineWidthGranularity float32
// StrictLines specifies whether lines are rasterized according to
// the preferred method of rasterization. If set to false, lines
// may be rasterized under a relaxed set of rules. If set to true,
// lines are rasterized as per the strict definition.
StrictLines bool
// StandardSampleLocations specifies whether rasterization uses
// the standard sample locations as documented in Multisampling.
// If set to true, the implementation uses the documented sample
// locations. If set to false, the implementation may use
// different sample locations.
StandardSampleLocations bool
// OptimalBufferCopyOffsetAlignment is the optimal buffer offset
// alignment in bytes for CopyBufferToImage and
// CopyImageToBuffer. The per texel alignment requirements
// are enforced, but applications should use the optimal alignment
// for optimal performance and power use.
OptimalBufferCopyOffsetAlignment DeviceSize
// OptimalBufferCopyRowPitchAlignment is the optimal buffer row
// pitch alignment in bytes for CopyBufferToImage and
// CopyImageToBuffer. Row pitch is the number of bytes
// between texels with the same X coordinate in adjacent rows (Y
// coordinates differ by one). The per texel alignment
// requirements are enforced, but applications should use the
// optimal alignment for optimal performance and power use.
OptimalBufferCopyRowPitchAlignment DeviceSize
// NonCoherentAtomSize is the size and alignment in bytes that
// bounds concurrent access to host-mapped device memory.
NonCoherentAtomSize DeviceSize
}
type PhysicalDeviceSparseProperties struct {
ResidencyStandard2DBlockShape bool
ResidencyStandard2DMultisampleBlockShape bool