KhronosGroup / KhronosGroup/Vulkan-Docs

Race condition in VkDisplaySurfaceCreateInfoKHR

Open
#2,196 1 comment 0 reactions 1 assignee Claimed by @linyaa-kiwi View on GitHub
Resolving Inside Khronos System Integration
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.