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

Document better which functions/values are not invariant #2198

Open
Rua opened this issue Aug 17, 2023 · 2 comments
Open

Document better which functions/values are not invariant #2198

Rua opened this issue Aug 17, 2023 · 2 comments

Comments

@Rua
Copy link
Contributor

Rua commented Aug 17, 2023

https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap3.html#fundamentals-commandsyntax-results-lifetime states that vkGet* and vkEnumerate* functions are invariant by default, and will return the same information if called again. If otherwise, this should be specified in the documentation of that command. For example, the documentation of vkGetPhysicalDevicePresentRectanglesKHR says this.

In practice, however, this doesn't seem to be documented nearly as much as it ought to be, even for relatively obvious cases:

  • vkGetPhysicalDeviceSurfaceCapabilities(2)KHR returns the current, minimum and maximum extent, which are very well known to change over time.
  • The properties of each display returned by vkGetPhysicalDeviceDisplayPropertiesKHR may be invariant, but the selection of available displays seems like it could change, by plugging or unplugging something.
  • vkGetPhysicalDeviceDisplayPlanePropertiesKHR returns the current display and stack index of a display plane, which by the naming alone seem like they can also change. I'm not sure what a display plane really represents, but maybe the selection of available planes can also change.
  • It is conceivable that the output of vkGetPhysicalDeviceSurfaceFormatsKHR could change too, if the display is switched to another mode with a different colour depth by the user.
  • vkEnumeratePhysicalDevices could return different devices if, for example, a driver were removed or added in the system in the intervening time.

There are surely other cases of this, that I haven't listed here.

@krOoze
Copy link
Contributor

krOoze commented Aug 17, 2023

link #388

@oddhack
Copy link
Contributor

oddhack commented Aug 23, 2023

@versalinyaa we would like SI TSG to take a look at this and respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants