Vulkan-Samples icon indicating copy to clipboard operation
Vulkan-Samples copied to clipboard

direct-to-display window improvements

Open gary-sweet opened this issue 2 years ago • 2 comments

Description

Rather than just taking the first plane of the first display we now gather a list of valid candidates and pick the best fit.

An additional display 'FullscreenStretch' mode has been added. This uses VkDisplayPresentInfoKHR from the VK_KHR_display_swapchain extension, when available, to specify separate src and dst rectangles for the surface and display. This enables you to have a 640x360 surface stretched fullscreen onto the display for example, rather than just appearing in a corner.

In standard or stretch mode, with direct-to-display, specifying --width & --height controls the surface size. In fullscreen or borderless modes, the surface is the same size as the display regardless of the width and height settings. The width and height are used to select the best display/plane combination however.

General Checklist:

Please ensure the following points are checked:

  • [x] My code follows the coding style
  • [x] I have reviewed file licenses
  • [x] I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
  • [x] I have commented any added functions (in line with Doxygen)
  • [x] I have commented any code that could be hard to understand
  • [x] My changes do not add any new compiler warnings
  • [x] My changes do not add any new validation layer errors or warnings
  • [x] I have used existing framework/helper functions where possible
  • [x] My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions
  • [x] My changes do not add any regressions
  • [x] I have tested every sample to ensure everything runs correctly
  • [x] This PR describes the scope and expected impact of the changes I am making

Note: Built and tested only on Linux

gary-sweet avatar Aug 04 '22 11:08 gary-sweet

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 04 '22 11:08 CLAassistant

Besides the fact, that I have not checked the actual functionality (just checked on Windows where it is not used): LGTM now!

asuessenbach avatar Aug 10 '22 06:08 asuessenbach

I suspect that no-one else will actually be able to test the direct-to-display changes, so this may be a code-review only change.

gary-sweet avatar Aug 31 '22 07:08 gary-sweet