KhronosGroup / KhronosGroup/Vulkan-Docs
Function pointers are difficult to parse in vk.xml
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
Vk.xml is a nice but there are a couple spots where it is hard to parse, the worst being function pointer types definition. Here is an example:
``` xml
typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
void* pUserData,
size_t size,
VkInternalAllocationType allocationType,
VkSystemAllocationScope allocationScope);
```
Getting the return type of the function and splitting the parameters is tricky, and this is made worse by the fact that a `const` can appear before the `` tag.
I suggest using the same structure as `` tags that clearly separate the prototype (and return type) as well as the parameters:
``` xml
void vkCmdDrawIndirect
VkCommandBuffer commandBuffer
VkBuffer buffer
VkDeviceSize offset
uint32_t drawCount
uint32_t stride
[skipped]
```
Contributor guide
Assessment
This issue has not been assessed yet.