Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with MSVC, fix VectorAddition test. #556

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

hvdijk
Copy link
Collaborator

@hvdijk hvdijk commented Oct 8, 2024

Overview

Fix build with MSVC, fix VectorAddition test.

Reason for change

  • MSVC wants max to be captured if it has automatic storage. It should not, but the MSVC option to behave in a standards-conforming manner is only available in newer versions than what we aim to support.
  • VectorAddition calls vkMapMemory which takes a pointer to a void* output parameter, then copies the result to a int32_t* variable for easier access. In commit ea1a63d, I missed one copy.

Description of change

  • Work around this by changing the storage to static.
  • Add the missing copy.

Anything else we should know?

If there's any other relevant information we should know that may help us in
understanding and verifying your patch, please include it here.

Checklist

  • Read and follow the project Code of Conduct.
  • Make sure the project builds successfully with your changes.
  • Run relevant testing locally to avoid regressions.
  • Run clang-format-19 on all modified code.

* MSVC wants max to be captured if it has automatic storage. It should
  not, but the MSVC option to behave in a standards-conforming manner is
  only available in newer versions than what we aim to support, so work
  around this by changing the storage to static.
* VectorAddition calls vkMapMemory which takes a pointer to a void*
  output parameter, then copies the result to a int32_t* variable for
  easier access. In commit ea1a63d, I missed one copy.
@hvdijk hvdijk changed the title Fix build with MSVC. Fix build with MSVC, fix VectorAddition test. Oct 8, 2024
@hvdijk hvdijk merged commit 3a580b6 into uxlfoundation:main Oct 8, 2024
6 checks passed
@hvdijk hvdijk deleted the fix-msvc-build branch October 8, 2024 16:59
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.

2 participants