8000 The union types in the vulkan spec aren't supported. · Issue #7 · ibd1279/vks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
The union types in the vulkan spec aren't supported. #7
Open
@ibd1279

Description

@ibd1279

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0