1 # -*- Mode:text; tab-width:4; electric-indent-mode: nil; indent-line-function:insert-tab; -*-
3 # types for structs and unions
5 # ###################################################################### #
7 #accessor=code template
19 public {type} get{Name}() {
25 public void set{Name}({type} {name}) {
30 public {type} get{Name}AtIndex(long i$) {
35 public void set{Name}AtIndex(long i$, {type} {name}) {
40 # Initialise the sType field if it has one, also include sub-
42 if ($tempname =~ m/write/) {
43 my $init = "{name}\$VH.set(self\$.segment, Vulkan.{values});\n";
44 foreach my $x (@{$s->{items}}) {
45 if ($x->{deref} eq 'struct') {
46 my $y = $api->{types}->{$x->{baseType}};
47 if ($#{$y->{items}} >= 0 && $y->{items}->[0]->{values}) {
48 my $z = $y->{items}->[0];
49 $init .= "self\$.get$x->{Name}().set$z->{Name}(Vulkan.$z->{values});\n";
60 if ($tempname =~ m/write.*array/n) {
61 my $init = "{name}\$AH.set(self\$.segment, i, Vulkan.{values});\n";
62 foreach my $x (@{$s->{items}}) {
63 if ($x->{deref} eq 'struct') {
64 my $y = $api->{types}->{$x->{baseType}};
65 if ($#{$y->{items}} >= 0 && $y->{items}->[0]->{values}) {
66 my $z = $y->{items}->[0];
67 $init .= "self\$.get$x->{Name}AtIndex(i).set$z->{Name}(Vulkan.$z->{values});\n";
72 "for (long i=0; i<length; i++) {\n\t$init\n\t}\n";
78 # for complex constructors
79 #setall-arg {{ {type} {name} }}
80 setall-arg {{ {type} {name} }}
81 setall {{ self$.set{Name}({name}); }}
82 setallat {{ self$.set{Name}AtIndex(index$, {name}); }}
87 /* value-array {deref} */
88 public {type} get{Name}() {
91 } catch (Throwable t) {
92 throw new RuntimeException(t);
95 public {typei} get{Name}Element(int i$) {
98 public void set{Name}Element(int i$, {typei} {name}) {
104 if ($m->{len1} <= 4) {
105 join ", ", map { '{typei} {name}$'.$_ } (0 .. $m->{len1}-1);
107 "{typei}[] {name} /* $m->{deref} $m->{len1} */";
111 if ($m->{len1} <= 4) {
112 join "\n\t", map { "self\$.set{Name}Element($_, {name}\$$_);" } (0 .. $m->{len1}-1);
115 if ({name} != null) {
117 ((MemorySegment){name}\$SH.invokeExact(self\$.segment)).copyFrom(MemorySegment.ofArray({name}));
118 } catch (Throwable t) {
119 System.err.println("Copy error: " + t.getLocalizedMessage());
127 # don't like having to pass scope here, not sure what else to do though
130 /* value-array {deref} */
131 public {type} get{Name}(VkInstance instance$, ResourceScope scope$) {
134 } catch (Throwable t) {
135 throw new RuntimeException(t);
138 public {typei} get{Name}Element(int i$, VkInstance instance$, ResourceScope scope$) {
141 public void set{Name}Element(int i$, {typei} {name}) {
149 /* value-array2d {deref} */
150 public {type} get{Name}() {
153 } catch (Throwable t) {
154 throw new RuntimeException(t);
157 public {typei} get{Name}Element(int i$, int j$) {
160 public void set{Name}Element(int i$, int j$, {typei} {name}) {
169 public {type} get{Name}() {
172 } catch (Throwable t) {
173 throw new RuntimeException(t);
179 public {type} get{Name}AtIndex(long i$) {
182 } catch (Throwable t) {
183 throw new RuntimeException(t);
189 # inline type that we also want to include expanded in initialiser
193 public {type} get{Name}() {
196 } catch (Throwable t) {
197 throw new RuntimeException(t);
203 public {type} get{Name}AtIndex(long i$) {
206 } catch (Throwable t) {
207 throw new RuntimeException(t);
213 return 0 if $m->{len1};
214 foreach my $a (@{$api->{data}->{$m->{baseType}}->{items}}) {
215 my $name = "$m->{name}\$$a->{name}";
216 if ($primitiveMap{$a->{baseType}}) {
217 push @list, "$primitiveMap{$a->{baseType}} $name";
219 my $as = $api->{data}->{$a->{baseType}};
220 foreach my $aa (@{$as->{items}}) {
221 push @list, "$primitiveMap{$aa->{baseType}} $name\$$aa->{name}";
229 return 0 if $m->{len1};
230 foreach my $a (@{$api->{data}->{$m->{baseType}}->{items}}) {
231 my $pt = $primitiveMap{$a->{baseType}};
233 push @list, 'self$.segment.set(Memory.'.uc($pt).', '
234 .(($m->{bitOffset} + $a->{bitOffset})/8).", $m->{name}\$$a->{name}".');';
236 my $as = $api->{data}->{$a->{baseType}};
237 foreach my $aa (@{$as->{items}}) {
238 $pt = $primitiveMap{$aa->{baseType}};
239 push @list, 'self$.segment.set(Memory.'.uc($pt).', '
240 .(($m->{bitOffset} + $aa->{bitOffset} + $a->{bitOffset})/8).", $m->{name}\$$a->{name}\$$aa->{name}".');';
248 return 0 if $m->{len1};
249 foreach my $a (@{$api->{data}->{$m->{baseType}}->{items}}) {
250 my $pt = $primitiveMap{$a->{baseType}};
252 push @list, 'self$.segment.set(Memory.'.uc($pt).', index$ * '.($s->{bitSize} / 8).' + '
253 .(($m->{bitOffset} + $a->{bitOffset})/8).", $m->{name}\$$a->{name}".');';
255 my $as = $api->{data}->{$a->{baseType}};
256 foreach my $aa (@{$as->{items}}) {
257 $pt = $primitiveMap{$aa->{baseType}};
258 push @list, 'self$.segment.set(Memory.'.uc($pt).', index$ * '.($s->{bitSize} / 8).' + '
259 .(($m->{bitOffset} + $aa->{bitOffset} + $a->{bitOffset})/8).", $m->{name}\$$a->{name}\$$aa->{name}".');';
267 # value with a SegmentAllocator passed to set()
268 code value-alloc value {
271 public void set{Name}({type} {name}, SegmentAllocator alloc$) {
277 public void set{Name}AtIndex(long i$, {type} {name}, SegmentAllocator alloc$) {
282 setall {{ self$.set{Name}({name}, alloc$); }}
285 # implied accessors are ignored in constructors
286 code value-implied value {
288 setall {{ self$.set{Name}(({type})Memory.length({lengthfor})); }}
291 # ###################################################################### #
296 public class Vulkan {
298 public static int VK_MAKE_API_VERSION(int variant, int major, int minor, int patch) {
299 return (variant << 29) | (major << 22) | (minor << 12) | patch;
307 VK_API_VERSION_1_0 {{ public final static int VK_API_VERSION_1_0 = VK_MAKE_API_VERSION(0, 1, 0, 0); }}
308 VK_API_VERSION_1_1 {{ public final static int VK_API_VERSION_1_1 = VK_MAKE_API_VERSION(0, 1, 1, 0); }}
309 VK_API_VERSION_1_2 {{ public final static int VK_API_VERSION_1_2 = VK_MAKE_API_VERSION(0, 1, 2, 0); }}
310 VK_API_VERSION_1_3 {{ public final static int VK_API_VERSION_1_3 = VK_MAKE_API_VERSION(0, 1, 3, 0); }}
315 // template: dispatch:class
317 import jdk.incubator.foreign.*;
318 import java.lang.invoke.*;
319 import au.notzed.nativez.*;
324 {Name}(VkInstance instance$, ResourceScope scope$) {
329 field-init {{ final NativeSymbol {name}$NS; }}
330 init {{ {name}$NS = instance$.vkGetInstanceProcAddr("{name}", scope$); }}
334 # non-dispatchable handle
337 // template: handle:class
339 import jdk.incubator.foreign.*;
340 import java.lang.invoke.*;
341 import au.notzed.nativez.*;
343 public class {name} implements Pointer {
344 final NativeSymbol self;
346 private {name}(MemoryAddress address, ResourceScope scope) {
347 this.self = NativeSymbol.ofAddress("{name}", address, scope);
351 public static {name} create(MemoryAddress address, ResourceScope scope) {
352 return new {name}(address, scope);
355 public static HandleArray<{name}> createArray(long length, SegmentAllocator alloc) {
356 return HandleArray.createArray(length, alloc, {name}::create);
359 public MemoryAddress address() {
360 return self.address();
363 public ResourceScope scope() {
371 code handle-instance {
373 // template: handle-instance:class
375 import jdk.incubator.foreign.*;
376 import java.lang.invoke.*;
377 import au.notzed.nativez.*;
379 public class {name} implements Pointer {
380 final NativeSymbol self;
381 final DispatchInstance dispatch;
383 private {name}(MemoryAddress address, ResourceScope scope) {
384 this.self = NativeSymbol.ofAddress("{name}", address, scope);
385 this.dispatch = new DispatchInstance(this, scope);
389 public static {name} create(MemoryAddress address, ResourceScope scope) {
390 return new {name}(address, scope);
393 public MemoryAddress address() {
394 return self.address();
397 public ResourceScope scope() {
406 # dispatchable handle
407 code handle-dispatch {
409 // template: handle-dispatch:class
411 import jdk.incubator.foreign.*;
412 import java.lang.invoke.*;
413 import au.notzed.nativez.*;
415 public class {name} implements Pointer {
416 final NativeSymbol self;
417 final DispatchInstance dispatch;
419 private {name}(MemoryAddress address, DispatchInstance dispatch, ResourceScope scope) {
420 this.self = NativeSymbol.ofAddress("{name}", address, scope);
421 this.dispatch = dispatch;
425 public static {name} create(MemoryAddress address, DispatchInstance dispatch, ResourceScope scope) {
426 return new {name}(address, dispatch, scope);
429 // TODO: evaluate how scope fits here
430 public static HandleArray<{name}> createArray(long length, SegmentAllocator alloc, DispatchInstance dispatch, ResourceScope scope) {
431 return HandleArray.createArray(length, alloc, (a, s) -> create(a, dispatch, s), scope);
434 public static HandleArray<{name}> createArray(long length, SegmentAllocator alloc, VkInstance instance, ResourceScope scope) {
435 return HandleArray.createArray(length, alloc, (a, s) -> create(a, instance.dispatch, s), scope);
438 public MemoryAddress address() {
439 return self.address();
442 public ResourceScope scope() {
451 # ###################################################################### #
453 # shared struct components
456 public MemorySegment segment;
458 public static final GroupLayout LAYOUT = {layout};
460 private {Name}(MemorySegment segment) {
461 this.segment = segment;
464 public static {Name} create(MemorySegment segment) {
465 return new {Name}(segment);
468 public static {Name} create(MemoryAddress address, ResourceScope scope) {
469 return create(MemorySegment.ofAddress(address, LAYOUT.byteSize(), scope));
472 public static {Name} create(SegmentAllocator alloc) {
473 var self$ = create(alloc.allocate(LAYOUT));
480 public MemoryAddress address() {
481 return segment.address();
486 public ResourceScope scope() {
487 return segment.scope();
491 public String toString() {
492 return Memory.toString(segment, LAYOUT);
496 public static {Name} {create}({java-setall-arguments}, SegmentAllocator alloc$) {
497 {Name} self$ = create(alloc$);
505 public void {set}({java-setall-arguments}) {
512 public void {set}AtIndex(long index$, {java-setall-arguments}) {
519 static {Name} createArray(MemoryAddress addr, long length, ResourceScope scope) {
520 return create(MemorySegment.ofAddress(addr, length * LAYOUT.byteSize(), scope));
523 public static {Name} createArray(long length, SegmentAllocator alloc) {
524 var self$ = create(alloc.allocateArray(LAYOUT, length));
529 public final static MethodHandle LAYOUT$SH = MemoryLayout.sequenceLayout(LAYOUT).sliceHandle(MemoryLayout.PathElement.sequenceElement());
533 public long length() {
534 return segment.byteSize() / LAYOUT.byteSize();
539 public {Name} getAtIndex(long index$) {
541 return create((MemorySegment)LAYOUT$SH.invokeExact(this.segment, index$));
542 } catch (Throwable t) {
543 throw new RuntimeException(t);
549 # default - writeonly struct
550 code struct-writeonly insert=struct:header,struct:create-all
551 fields=init,set,getorset,handle,java-setall {
553 // template: struct-writeonly:class
555 import jdk.incubator.foreign.*;
556 import java.lang.invoke.*;
557 import au.notzed.nativez.*;
559 public class {Name} implements Pointer {
572 code struct-writeonly-array insert=struct:header,struct:create-all,struct:array
573 fields=init,init-array,set,getorset,setat,getorsetat,handle,handleat,java-setall {
575 // template: struct-writeonly-array:class
577 import jdk.incubator.foreign.*;
578 import java.lang.invoke.*;
579 import au.notzed.nativez.*;
581 public class {Name} implements Pointer, Array<{Name}> {
599 code struct-readonly insert=struct:header
600 fields=init,get,getorset,handle {
602 // template: struct-readonly:class
604 import jdk.incubator.foreign.*;
605 import java.lang.invoke.*;
606 import au.notzed.nativez.*;
608 public class {Name} implements Pointer {
619 code struct-readonly-array insert=struct:header,struct:array
620 fields=init,init-array,get,getorset,getat,getorsetat,handle,handleat {
622 // template: struct-readonly-array:class
624 import jdk.incubator.foreign.*;
625 import java.lang.invoke.*;
626 import au.notzed.nativez.*;
628 public class {Name} implements Pointer, Array<{Name}> {
644 code struct-readwrite insert=struct:header,struct:create-all
645 fields=init,get,set,getorset,handle,java-setall {
647 // template: struct-readwrite:class
649 import jdk.incubator.foreign.*;
650 import java.lang.invoke.*;
651 import au.notzed.nativez.*;
653 public class {Name} implements Pointer {
667 code struct-readwrite-array insert=struct:header,struct:create-all,struct:array
668 fields=init,init-array,get,getat,set,setat,getorset,getorsetat,handle,handleat,java-setall {
670 // template: struct-readwrite-array:class
672 import jdk.incubator.foreign.*;
673 import java.lang.invoke.*;
674 import au.notzed.nativez.*;
676 public class {Name} implements Pointer,Array<{Name}> {
696 # read-write with a 'set' method for all members
697 code struct-readwrite-all insert=struct:header,struct:create-all,struct:set-all
698 fields=init,get,set,getorset,handle,java-setall {
700 // template: struct-readwrite-all:class
702 import jdk.incubator.foreign.*;
703 import java.lang.invoke.*;
704 import au.notzed.nativez.*;
706 public class {Name} implements Pointer {
720 code struct-readwrite-array-all insert=struct:header,struct:create-all,struct:array,struct:set-all,struct:setat-all
721 fields=init,init-array,get,getat,set,setat,setallat,getorset,getorsetat,handle,handleat,java-setall,java-setallat {
723 // template: struct-readwrite-array-all:class
725 import jdk.incubator.foreign.*;
726 import java.lang.invoke.*;
727 import au.notzed.nativez.*;
729 public class {Name} implements Pointer,Array<{Name}> {
749 # ###################################################################### #
751 # Basic value-based accessor
752 type value accessor=value {
753 native-value {{ {name} }}
755 native-get {{ ({type}){name}$VH.get(this.segment) }}
756 handle {{ final static VarHandle {name}$VH = LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("{name}")); }}
758 java-get {{ {native-get} }}
759 java-set {{ {name}$VH.set(this.segment, {native-value}) }}
761 native-getat {{ ({type}){name}$AH.get(this.segment, i$) }}
762 native-setat {{ {name}$AH.set(this.segment, i$, {native-value}) }}
763 handleat {{ final static VarHandle {name}$AH = MemoryLayout.sequenceLayout(LAYOUT).varHandle(MemoryLayout.PathElement.sequenceElement(), MemoryLayout.PathElement.groupElement("{name}")); }}
765 java-getat {{ {native-getat} }}
766 java-setat {{ {native-setat} }}
769 type value-array accessor=value-array {
770 native-get {{ (MemorySegment){name}$SH.invokeExact(this.segment) }}
771 java-get {{ {type}.create({native-get}) }}
773 native-geti {{ {name}$EH.get(this.segment, i$) }}
775 java-geti {{ ({typei}){native-geti} }}
776 java-seti {{ {name}$EH.set(this.segment, i$, {name}) }}
778 final static MethodHandle {name}$SH = LAYOUT.sliceHandle(MemoryLayout.PathElement.groupElement("{name}"));
779 final static VarHandle {name}$EH = LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("{name}"), MemoryLayout.PathElement.sequenceElement());
783 type value-array2d accessor=value-array2d {
784 native-get {{ (MemorySegment){name}$SH.invokeExact(this.segment) }}
785 java-get {{ {type}.create({native-get}) }}
786 java-geti {{ ({typei}){name}$EH.get(this.segment, i$, j$) }}
787 java-seti {{ {name}$EH.set(this.segment, i$, j$, {name}) }}
789 final static MethodHandle {name}$SH = LAYOUT.sliceHandle(MemoryLayout.PathElement.groupElement("{name}"));
790 final static VarHandle {name}$EH = LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("{name}"), MemoryLayout.PathElement.sequenceElement(), MemoryLayout.PathElement.sequenceElement());
794 type inline accessor=inline {
795 native-get {{ (MemorySegment){name}$SH.invokeExact(this.segment) }}
796 java-get {{ {type}.create({native-get}) }}
797 handle {{ final static MethodHandle {name}$SH = LAYOUT.sliceHandle(MemoryLayout.PathElement.groupElement("{name}")); }}
799 native-getat {{ (MemorySegment){name}$SA.invokeExact(this.segment, i$) }}
800 java-getat {{ {type}.create({native-getat}) }}
801 handleat {{ final static MethodHandle {name}$SA = MemoryLayout.sequenceLayout(LAYOUT).sliceHandle(MemoryLayout.PathElement.sequenceElement(), MemoryLayout.PathElement.groupElement("{name}")); }}
804 type inline-array accessor=inline {
805 native-get {{ (MemorySegment){name}$SH.invokeExact(this.segment) }}
806 java-get {{ {type}.create({native-get}) }}
807 handle {{ final static MethodHandle {name}$SH = LAYOUT.sliceHandle(MemoryLayout.PathElement.groupElement("{name}")); }}
809 native-getat {{ (MemorySegment){name}$SA.invokeExact(this.segment, i$) }}
810 java-getat {{ {type}.create({native-getat}) }}
811 handleat {{ final static MethodHandle {name}$SA = MemoryLayout.sequenceLayout(LAYOUT).sliceHandle(MemoryLayout.PathElement.sequenceElement(), MemoryLayout.PathElement.groupElement("{name}")); }}
814 type uint8_t,char value {
816 layout {{ Memory.BYTE }}
819 type uint16_t value {
821 layout {{ Memory.SHORT }}
824 type uint32_t,int,int32_t value {
826 layout {{ Memory.INT }}
829 type uint64_t,int64_t,size_t value {
831 layout {{ Memory.LONG }}
836 layout {{ Memory.FLOAT }}
841 layout {{ Memory.DOUBLE }}
844 # ###################################################################### #
845 # implied length types
846 type uint64_t-implied,size_t-implied uint64_t accessor=value-implied {
849 type uint32_t-implied uint32_t accessor=value-implied {
852 # ###################################################################### #
854 type uint8_t[],char[] value-array {
856 layout {{ MemoryLayout.sequenceLayout({len1}, Memory.BYTE) }}
860 type uint32_t[],int32_t[] value-array {
862 layout {{ MemoryLayout.sequenceLayout({len1}, Memory.INT) }}
866 type uint64_t[] value-array {
868 layout {{ MemoryLayout.sequenceLayout({len1}, Memory.LONG) }}
872 type float[] value-array {
873 type {{ FloatArray }}
874 layout {{ MemoryLayout.sequenceLayout({len1}, Memory.FLOAT) }}
878 type struct[] inline-array {
879 type {{ {baseType} }}
880 layout {{ MemoryLayout.sequenceLayout({len1}, {baseType}.LAYOUT) }}
883 type struct-expand[] struct[] accessor=inline-expand;
885 type float[][] value-array2d {
886 type {{ FloatArray }}
888 layout {{ MemoryLayout.sequenceLayout({len1}, MemoryLayout.sequenceLayout({len2}, Memory.FLOAT)) }}
891 # select=len? or what?
894 layout {{ Memory.POINTER }}
895 type {{ MemoryAddress }}
897 native-value {{ Memory.address({name}) }}
898 native-get {{ (MemoryAddress){name}$VH.get(this.segment) }}
900 # java-get {{ {native-get} }}
901 # java-set {{ {name}$VH.set(this.segment, Memory.address({name})) }}
906 type value-pointer pointer {
907 java-get {{ {type}.create((MemoryAddress){name}$VH.get(this.segment), segment.scope()) }}
910 type uint8_t* value-pointer {
914 type uint32_t*,int32_t*,int* value-pointer {
918 type uint64_t* value-pointer {
922 type float* value-pointer {
926 type size_t* value-pointer {
930 type pointer-length pointer {
931 java-get {{ {type}.createArray({native-get}, {length}, this.segment.scope()) }}
934 type void*-length pointer-length {
936 java-get {{ MemorySegment.ofAddress({native-get}, {length}, this.segment.scope()) }}
939 type uint8_t*-length pointer-length {
943 type uint32_t*-length,int32_t*-length pointer-length {
947 type uint64_t*-length pointer-length {
951 type float*-length pointer-length {
955 # special handling for strings, will fail if it isn't
956 type char* pointer accessor=value-alloc {
959 java-get {{ ({native-get}).getUtf8String(0) }}
960 native-value {{ alloc$.allocateUtf8String({name}).address() }}
962 # this just verifies it's a string type
964 if ($v->{len} =~ m/null-terminated/) {
973 type char**-length pointer-length accessor=value-alloc {
976 java-set {{ {name}$VH.set(this.segment, Memory.copyStringArray({name}, alloc$).address()); }}
977 java-get {{ Memory.copyStringArray((MemoryAddress){name}$VH.get(this.segment), {length}) }}
980 type funcpointer pointer {
981 type {{ FunctionPointer<{baseType}> }}
982 typei {{ {baseType} }}
983 java-get {{ {baseType}.downcall({native-get}, this.segment.scope()) }}
986 type void** pointer {
989 type void**-length pointer-length {
993 type handle pointer {
994 type {{ {baseType} }}
995 java-get {{ {type}.create({native-get}, this.segment.scope()) }}
998 type handle[] value-array accessor=handle-array {
999 type {{ HandleArray<{typei}> }}
1000 typei {{ {baseType} }}
1001 layout {{ MemoryLayout.sequenceLayout({len1}, Memory.POINTER) }}
1002 java-get {{ HandleArray.create({native-get}, (a, s) -> {typei}.create(a, instance$.dispatch, s), scope$) }}
1004 java-geti {{ {typei}.create((MemoryAddress){native-geti}, instance$.dispatch, scope$) }}
1007 type handle* pointer {
1008 type {{ HandleArray<{typei}> }}
1009 typei {{ {baseType} }}
1010 java-get {{ HandleArray.create({native-get}, {typei}::create) }}
1013 type handle*-length pointer-length {
1014 type {{ HandleArray<{baseType}> }}
1015 typei {{ {baseType} }}
1016 java-get {{ HandleArray.createArray({native-get}, {length}, {typei}::create, this.segment.scope()) }}
1017 java-set {{ {name}$VH.set(this.segment, Memory.address({name})); }}
1020 type struct inline {
1021 type {{ {baseType} }}
1022 layout {{ {baseType}.LAYOUT }}
1025 type struct-expand inline accessor=inline-expand {
1026 type {{ {baseType} }}
1027 layout {{ {baseType}.LAYOUT }}
1030 type struct* pointer {
1031 type {{ {baseType} }}
1032 java-get {{ {baseType}.create({native-get}, this.segment.scope()) }}
1035 type struct*-length pointer-length {
1036 type {{ {baseType} }}
1037 typei {{ {baseType} }}
1040 type struct** pointer {
1044 type XID,Window,VisualID uint64_t;
1046 type Display* handle {
1051 type xcb_window_t uint32_t;
1052 type xcb_visualid_t uint32_t;
1053 type xcb_connection_t* handle {
1054 type xcb.Connection;
1058 VkInstance template=handle-instance;
1059 VkPhysicalDevice template=handle-dispatch;
1060 VkDevice template=handle-dispatch;
1061 VkCommandBuffer template=handle-dispatch;
1062 VkQueue template=handle-dispatch;
1064 VkAllocationCallbacks ignore;
1066 # We want 'set(all fields) for these types and to include them expanded if inline
1067 VkOffset2D expand template=struct-readwrite-array-all;
1068 VkOffset3D expand template=struct-readwrite-array-all;
1069 VkExtent2D expand template=struct-readwrite-all;
1070 VkExtent3D expand template=struct-readwrite-all;
1071 VkRect2D expand template=struct-readwrite-array-all;
1073 VkStencilOpState template=struct-readwrite-all;
1074 VkComponentMapping template=struct-readwrite-all;
1075 VkImageSubresourceRange template=struct-readwrite-all;
1077 VkClearColorValue expand template=struct-readwrite-all;
1078 VkClearDepthStencilValue expand template=struct-readwrite-all;
1080 # Override default read/write
1081 VkDebugUtilsMessengerCallbackDataEXT template=struct-readonly;
1082 VkDebugUtilsLabelEXT template=struct-readonly-array;
1083 VkDebugUtilsObjectNameInfoEXT template=struct-readonly-array;
1085 # override default array-length behaviours, some of these are independent of the array pointer
1086 VkAccelerationStructureBuildGeometryInfoKHR geometryCount=type:uint32_t;
1087 VkDescriptorSetLayoutBinding pImmutableSamplers=type:handle* descriptorCount=type:uint32_t;
1088 VkPipelineViewportStateCreateInfo scissorCount=type:uint32_t viewportCount=type:uint32_t;
1090 # can't really work out what this is it's a void ** but it stays it's a pointer to uint8_t * in the spec
1091 VkCuLaunchInfoNVX pParams=type:pointer pExtras=type:pointer;