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

Implement + require VK_KHR_surface_maintenance1 and VK_KHR_swapchain_maintenance1 #508

Open
devshgraphicsprogramming opened this issue Jun 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@devshgraphicsprogramming
Copy link
Member

devshgraphicsprogramming commented Jun 5, 2023

Description

In plain old regular Vulkan you can't query the following from a Surface:

  • the number of min/max images from a surface GIVEN a particular presentation mode
  • the set of presentation modes which can be easily switched between without requiring swapchain recreation
  • scaled presentation capabilities
    this is the surface_maintenance instance extension which is required for the following.

The main device extension we want to use is swapchain_maintenance1 because it fixes a bunch of spec errors and UB:

  • knowing when you can throw away an old swapchain and its images ("Specify a fence that will be signaled when the resources associated with a present operation can be safely destroyed.")
  • not "having to present" swapchain images already acquired, via a special "release" ("Allow applications to release previously acquired images without presenting them.")

Plus some fun bonuses:

  • Allow applications to define the behavior when presenting a swapchain image to a surface with different dimensions than the image. Using this feature may allow implementations to avoid returning VK_ERROR_OUT_OF_DATE_KHR in this situation.
  • Allow changing the present mode a swapchain is using at per-present granularity
  • Allow applications to defer swapchain memory allocation for improved startup time and memory footprint

Solution proposal

Both extensions are not yet ratified and device support for both extensions is hovering around 2% right now, so we need to wait before implementing.

@devshgraphicsprogramming devshgraphicsprogramming added the enhancement New feature or request label Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant