Permalink
Switch branches/tags
Nothing to show
Find file Copy path
639cad2 Oct 15, 2018
1 contributor

Users who have contributed to this file

134 lines (131 sloc) 6.45 KB
---
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]}