KhronosGroup / KhronosGroup/Vulkan-Docs
Race condition in VkDisplaySurfaceCreateInfoKHR
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253 says:
> [...]
> otherwise `planeStackIndex` **must** equal the `currentStackIndex` member of `VkDisplayPlanePropertiesKHR` returned by `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` for the display plane corresponding to `displayMode`
The "current" part of the name `currentStackIndex` already reveals that this property can change over time. This means that it can also change between when you call `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` to retrieve the plane properties, and when you call `vkCreateDisplayPlaneSurfaceKHR` for which this VUID applies. Therefore there doesn't seem to be any way to ensure this requirement; the required value can always change out from under you.
Note https://github.com/KhronosGroup/Vulkan-Docs/issues/1144, a very similar issue also dealing with a mutable "current" property versus a VUID that depends on it.
Contributor guide
Assessment
This issue has not been assessed yet.