KhronosGroup / KhronosGroup/Vulkan-Docs
Semantic tagging of pointer type for struct members
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
Re: [Additional Semantic Tagging](https://www.khronos.org/registry/vulkan/specs/1.1/registry.html#_additional_semantic_tagging)
Someone cannot generate complete code for FFIs that explicitly distinguish C pointer types and non-pointer types with the current state of `vk.xml`. Take this selection of the specification, which shows a member with `void*` as opposed to something like `void*`.
```
VkStructureType sType
const void* pNext
VkDescriptorSetLayoutCreateFlags flags
uint32_t bindingCountNumber of bindings in the descriptor set layout
const VkDescriptorSetLayoutBinding* pBindingsArray of descriptor set layout bindings
```
FFI generators for other languages would have to inspect CDATA immediately following `` children of `` elements or seek out a `p`-prefix to detect use of pointer types. This makes things harder, and I think an attribute should clarify how a member type is decorated such that an FFI binding stays in sync with generated C code
Contributor guide
Assessment
This issue has not been assessed yet.