Skip to content

Conversation

@davidwrighton
Copy link
Member

Add tests for marshalling Vector2, Vector3, and Vector4 to and from native code

  • Ensure that upcoming changes to abi handling of Vector128, and Vector64 do not effect abi of Vector2/3/4.

- Anticipated work on Windows Amd64 calling conventions may affect this, so this needs testing
- Adjust some reverse p/invoke struct marshalling tests to add coverage for returning structures
  - Coverage includes a 3 byte, 4 byte struct, 8 byte struct, and a large struct
  - Note: There is a code in mlinfo.cpp which explicitly makes support for returning 3, 5, 6, and 7 on X86 follow the wrong calling convention by rounding the size to a 4 byte boundary. I've left this unfortunate detail in place.
- Fix issues noted in returning structures from reverse p/invokes
Copy link
Member

@jkoritzinsky jkoritzinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ReversePInvokeTest.cs file is showing up as binary for some reason. Once that's changed to text, this looks good to me!

@davidwrighton
Copy link
Member Author

Previously this passed CI, and the only change was a change to move a test from being encoded Utf16 to Utf8.

@davidwrighton davidwrighton merged commit 3a844ad into dotnet:master Feb 13, 2020
@BruceForstall
Copy link
Contributor

cc @CarolEidt

@BruceForstall
Copy link
Contributor

fyi, this led to new JIT assertion failures: #32379

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants