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

APPLE: Rename MemoryBarrier func to InsertMemoryBarrier to avoid Windows issue #2124

Merged

Conversation

creijon
Copy link
Contributor

@creijon creijon commented Dec 7, 2022

Description of Change(s)

In Windows.h there is the statement: #define MemoryBarrier __faststorefence. Depending on whether this header is included and in which order it is, this results in the MemoryBarrier symbol on HgiGraphicsCmds HgiComputeCmds and HgiBlitCmds being renamed as __faststorefence

We had to work around this in the GPU frustum culling PR, #2053, by using an #undef, but this is fragile since re-ordering the includes could cause a regression.

Perhaps a more effective solution is to rename the function? In this case to InsertMemoryBarrier.

Fixes Issue(s)

  • Potential build issues on Windows platforms.
  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@creijon creijon changed the title Rename MemoryBarrier func to InsertMemoryBarrier to avoid Windows issue APPLE: Rename MemoryBarrier func to InsertMemoryBarrier to avoid Windows issue Dec 7, 2022
@sunyab
Copy link
Contributor

sunyab commented Dec 9, 2022

Filed as internal issue #USD-7820

@pixar-oss pixar-oss merged commit 9ae37f5 into PixarAnimationStudios:dev Jan 4, 2023
@creijon creijon deleted the jon/dev/memorybarrier_rename branch January 5, 2023 08:06
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.

3 participants