Skip to content

Fix generated struct sizes with byte arrays - #862

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-generated-struct-size
Nov 24, 2026
Merged

tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-generated-struct-size

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Note

Preserve a field's natural alignment when applying low-alignment record packing, rather than substituting the field size. This fixes generated size expectations for StdVideoEncodeH265WeightTable and similar records.

Add regression coverage for the Vulkan struct and a minimal low-alignment byte-array case.

Validation: the focused P/Invoke generator test passes on .NET 10 and .NET 11.

Fixes #861.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tannergooding
tannergooding merged commit 52fa40a into dotnet:main Nov 24, 2026
12 checks passed
@tannergooding
tannergooding deleted the tannergooding-generated-struct-size branch November 24, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect expected size for StdVideoEncodeH265WeightTable in tests generated by PInvokeGenerator

1 participant