forked from vulkan-go/vulkan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vulkan-linux.yml
133 lines (131 loc) · 6.45 KB
/
vulkan-linux.yml
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
---
GENERATOR:
PackageName: vulkan
PackageDescription: "Package vulkan provides Go bindings for vulkan.h"
PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
Includes:
- vulkan/vulkan.h
- vk_wrapper.h
- vk_bridge.h
FlagGroups:
- {name: "CFLAGS", flags: [
"-I.",
"-DVK_NO_PROTOTYPES",
]}
PARSER:
IncludePaths: [/usr/include]
# IncludePaths: [windows/, /usr/include]
SourcesPaths:
- vulkan/vulkan.h
- vk_wrapper.h
- vk_bridge.h
# - moltenVK/vk_mvk_moltenvk.h
Defines:
VK_NO_PROTOTYPES: 1
VK_USE_PLATFORM_ANDROID_KHR: null
VK_USE_PLATFORM_WIN32_KHR: null
VK_USE_PLATFORM_IOS_MVK: null
TRANSLATOR:
ConstRules:
defines: expand
Rules:
global:
- {action: accept, from: "^Vk"}
- {action: replace, from: "^Vk"}
- {action: accept, from: "^MVK"}
# callbacks (no allocation callbacks cos it's dumb)
- {action: accept, from: PFN_vkDebugReportCallback}
- {action: replace, from: PFN_vkDebugReportCallback, to: DebugReportCallbackFunc}
- {action: ignore, from: DebugUtilsMessenger}
# these in global section so doc will work
- {action: accept, from: ^callVk}
- {action: replace, from: ^callVk}
type:
- {action: accept, from: "^ANativeWindow$"}
- {action: replace, from: "KHR$"}
- {action: replace, from: "EXT$"}
function:
- {action: replace, from: "KHR$"}
- {action: replace, from: "EXT$"}
const:
- {action: ignore, from: NULL_HANDLE$}
- {action: replace, from: "KHR$"}
- {action: replace, from: "EXT$"}
- {transform: lower}
- {action: accept, from: "(?i)^VK_"}
- {action: replace, from: "(?i)^VK_", to: "_"}
- {load: snakecase}
private:
- {transform: unexport}
post-global:
- {action: doc, from: "KHR$",
to: "https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/xhtml/vkspec.html#Vk$goname"}
- {action: doc, from: "NVX$",
to: "https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#Vk$goname"}
- {action: doc, from: "AMD$",
to: "https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#Vk$goname"}
- {action: doc, from: "MVK$"}
- {action: doc, from: "^callVk",
to: "https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vk$goname.html"}
- {action: doc, from: "^Vk",
to: "https://www.khronos.org/registry/vulkan/specs/1.0/man/html/Vk$goname.html"}
- {action: replace, from: _$}
- {action: replace, from: ^_}
- {transform: export}
MemTips:
- {target: VkAllocationCallbacks, self: raw}
- {target: DebugUtilsMessengerCallback, self: raw}
- {target: ANativeWindow, self: raw}
PtrTips:
function:
- {target: ^callVkEnumeratePhysicalDevices$, tips: [0,ref,arr]}
- {target: ^callVkGetPhysicalDeviceQueueFamilyProperties$, tips: [0,ref,arr]}
- {target: ^callVkEnumerateInstanceExtensionProperties$, tips: [0,ref,arr]}
- {target: ^callVkEnumerateDeviceExtensionProperties$, tips: [0,0,ref,arr]}
- {target: ^callVkEnumerateInstanceLayerProperties$, tips: [ref,arr]}
- {target: ^callVkEnumerateDeviceLayerProperties$, tips: [0,ref,arr]}
- {target: ^callVkQueueSubmit$, tips: [0,size,arr]}
- {target: ^callVkFlushMappedMemoryRanges$, tips: [0,size,arr]}
- {target: ^callVkInvalidateMappedMemoryRanges$, tips: [0,size,arr]}
- {target: ^callVkGetImageSparseMemoryRequirements$, tips: [0,0,size,arr]}
- {target: ^callVkGetPhysicalDeviceSparseImageFormatProperties$, tips: [0,0,0,0,0,0,size,arr]}
- {target: ^callVkQueueBindSparse$, tips: [0,size,arr]}
- {target: ^callVkResetFences$, tips: [0,size,arr]}
- {target: ^callVkWaitForFences$, tips: [0,size,arr]}
- {target: ^callVkMergePipelineCaches$, tips: [0,0,size,arr]}
- {target: ^callVkCreateGraphicsPipelines$, tips: [0,0,size,arr,ref,arr]}
- {target: ^callVkCreateComputePipelines$, tips: [0,0,size,arr,ref,arr]}
- {target: ^callVkUpdateDescriptorSets$, tips: [0,size,arr,size,arr]}
- {target: ^callVkAllocateCommandBuffers$, tips: [0,ref,arr]}
- {target: ^callVkFreeCommandBuffers$, tips: [0,0,size,arr]}
- {target: ^callVkMapMemory, tips: [0,0,0,0,0,ref]}
- {target: ^callVkCmdSetViewport$, tips: [0,0,size,arr]}
- {target: ^callVkCmdSetScissor$, tips: [0,0,size,arr]}
- {target: ^callVkCmdBindDescriptorSets$, tips: [0,0,0,0,size,arr,size,arr]}
- {target: ^callVkCmdBindVertexBuffers$, tips: [0,0,size2,arr,arr]}
- {target: ^callVkCmdCopyBuffer$, tips: [0,0,0,size,arr]}
- {target: ^callVkCmdCopyImage$, tips: [0,0,0,0,0,size,arr]}
- {target: ^callVkCmdBlitImage$, tips: [0,0,0,0,0,size,arr]}
- {target: ^callVkCmdCopyBufferToImage$, tips: [0,0,0,0,size,arr]}
- {target: ^callVkCmdCopyImageToBuffer$, tips: [0,0,0,0,size,arr]}
- {target: ^callVkCmdClearColorImage$, tips: [0,0,0,ref,size,arr]}
- {target: ^callVkCmdClearDepthStencilImage$, tips: [0,0,0,ref,size,arr]}
- {target: ^callVkCmdClearAttachments$, tips: [0,size,arr,size,arr]}
- {target: ^callVkCmdResolveImage$, tips: [0,0,0,0,0,size,arr]}
- {target: ^callVkCmdWaitEvents$, tips: [0,size,arr,0,0,size,arr,size,arr,size,arr]}
- {target: ^callVkCmdPipelineBarrier$, tips: [0,0,0,0,size,arr,size,arr,size,arr]}
- {target: ^callVkCmdExecuteCommands$, tips: [0,size,arr]}
- {target: ^callVkGetPhysicalDeviceSurfaceFormatsKHR$, tips: [0,0,ref,arr]}
- {target: ^callVkGetPhysicalDeviceSurfacePresentModesKHR$, tips: [0,0,ref,arr]}
- {target: ^callVkGetSwapchainImagesKHR$, tips: [0,0,ref,arr]}
- {target: ^callVkGetPhysicalDeviceDisplayPropertiesKHR$, tips: [0,ref,arr]}
- {target: ^callVkGetPhysicalDeviceDisplayPlanePropertiesKHR$, tips: [0,ref,arr]}
- {target: ^callVkGetDisplayPlaneSupportedDisplaysKHR$, tips: [0,0,ref,arr]}
- {target: ^callVkGetDisplayModePropertiesKHR$, tips: [0,0,ref,arr]}
- {target: ^callVkCreateSharedSwapchainsKHR$, tips: [0,size,arr,ref,ref]}
# this covers all other cases
- {target: ^callVk, tips: [sref,sref,sref,sref,sref,sref,sref,sref]}
struct:
- {target: VkSubpassDescription, tips: [0,0,size,arr,size,arr,arr,ref,size,arr]}
- {target: VkGraphicsPipelineCreateInfo, tips: [0,0,0,0,arr,ref,ref,ref,ref,ref,ref,ref,ref,ref]}
- {target: VkInstanceCreateInfo, tips: [0,0,0,ref]}