Skip to content

[Bug] Missing info in auto generated headers #1786

@abysal

Description

@abysal

Describe the bug

The headers generated for consumption via the APIs are missing info. The most recent mcapi fulfillment has a showcase of this bug. That struct bgfx::View has a forced alignment of 64 bytes. Making the size 0x1C0. However in levi its size is 0x1B8. Meaning if an array of these is found (such as in bgfx::Context) the iteration wouldn't work correctly due to a mismatched size.

You can see the alignas in the bgfx repo. So as long as the blob info which levi has contains alignment info about the top level struct it should be as simple as adding an alignas(N) before the class

To Reproduce

Unneeded

Expected behavior

Custom alignment requirements for types are respected

Screenshots

No response

Platform

No response

Version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions