The union types in the vulkan spec aren't supported.
Opened this issue · 0 comments
The union types in the vulkan specification (e.g. VkClearColorValue) are not supported.
Expected -- the ability to use these union types.
Actual -- they are supported.
Details
The identifier for the unions exist, they get output as a renamed typed (e.g. type ClearColorValue C.VkClearColorValue
), but the ability to access any of the underlying types does not exist. This is partly because Cgo does not export union members. Instead it treats the union type as an array of bytes that can hold the largest member. (See this old golang-nuts thread ).
To experiment, I added some helpers to unblock the tutorial code, but the reality is that the header-generator stuff needs to provide some level of support for the union types by either generating these helpers or by creating a different abstraction.