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

layers: Don't pre-query surface attributes during creation #3452

Merged
merged 5 commits into from
Oct 25, 2021

Commits on Oct 25, 2021

  1. tests: Check for surface support first in InitSwapchain()

    Before calling InitSwapchainInfo(), make sure the physical
    device and surface are supported. The vulkan calls in
    InitSwapchainInfo() require this to be true or they are invalid
    to make.
    jeremyg-lunarg committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    c9b45a5 View commit details
    Browse the repository at this point in the history
  2. tests: Fix test for VUID 01270

    VUID-VkSwapchainCreateInfoKHR-surface-01270 requires that the device
    support the surface, it doesn't require that you actually call
    vkGetPhysicalDeviceSurfaceSupportKHR(). (You should, but that's a best
    practice...)
    
    Change the test to create a device that doesn't support surface present,
    and then use it to try to create a swapchain.
    jeremyg-lunarg committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    4797913 View commit details
    Browse the repository at this point in the history
  3. tests: Only get requested queues in Device::init_queues()

    Make sure it only calls vkGetDeviceQueue() on the queues specified
    in the device create info. This allows creating devices with a limited
    set of queues rather than everything the phyiscal device supports.
    jeremyg-lunarg committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    bb63d68 View commit details
    Browse the repository at this point in the history
  4. layers: Fix IMAGE_STATE::Unlink() for swapchain images

    Since these images are only destroyed when the swapchain is
    destroyed, calling RemoveParent on it is unnecessary and can
    cause the parent_nodes_ set to be corrupted.
    jeremyg-lunarg committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    3be7454 View commit details
    Browse the repository at this point in the history
  5. layers: Don't pre-query surface attributes during creation

    Some of the calls to get surface capabilities, formats or
    presentation modes are very slow in some implementations.
    Revert back to caching results made by the application, but
    store them in SURFACE_STATE rather than PHYSICAL_DEVICE_STATE.
    The original code assumed that the same results would apply
    to all surfaces, which doesn't appear to be true.
    jeremyg-lunarg committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    60eacee View commit details
    Browse the repository at this point in the history