KhronosGroup / KhronosGroup/Vulkan-Hpp

vk::MemoryBarrier conflicts with winnt.h

Open
#1,519 0 comments 0 reactions 0 assignees View on GitHub
information
Dominant language
C++
Stars
3.8k
Forks
374
Avg merge
23h 4m
Merged PRs (30d)
32

Description

Microsoft helpfully defines `MemoryBarrier` to be `__faststorefence` in winnt.h
https://learn.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-memorybarrier

The effect of this is that if you try to declare a `vk::MemoryBarrier` on windows, MSVC fails to compile with the message:
```
error C2039: '__faststorefence': is not a member of 'vk'
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the Windows/MSVC failure by including winnt.h and declaring vk::MemoryBarrier, then inspect how the Vulkan-Hpp declaration interacts with winnt.h's MemoryBarrier definition. Done means the declaration compiles on Windows without the __faststorefence lookup error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.