diff options
| author | Charles Giessen <charles@lunarg.com> | 2022-10-19 14:41:50 -0600 |
|---|---|---|
| committer | Juan Ramos <114601453+juan-lunarg@users.noreply.github.com> | 2022-10-24 11:45:21 -0600 |
| commit | 9bb5a7ccd009446972c88f4af153c59e0f2eac83 (patch) | |
| tree | e9c91ba7729156e3b04e301cd409a6c9f1db8b26 /vulkaninfo/vulkaninfo.cpp | |
| parent | 616c407893a935101d2e3ba0812dcacc2b3e303f (diff) | |
| download | usermoji-9bb5a7ccd009446972c88f4af153c59e0f2eac83.tar.xz | |
vulkaninfo: Fix validation errors
Required checking for surface support of a given physical device as well as
adding the correct Image usage for transient images.
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
| -rw-r--r-- | vulkaninfo/vulkaninfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 8574b176..af723207 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -1103,6 +1103,12 @@ int main(int argc, char **argv) { surface_extension.surface = surface_extension.create_surface(instance); for (auto &phys_device : phys_devices) { try { + // check if the surface is supported by the physical device before adding it to the list + VkBool32 supported = VK_FALSE; + VkResult err = instance.ext_funcs.vkGetPhysicalDeviceSurfaceSupportKHR(phys_device, 0, + surface_extension.surface, &supported); + if (err != VK_SUCCESS || supported == VK_FALSE) continue; + surfaces.push_back(std::unique_ptr<AppSurface>(new AppSurface(instance, phys_device, surface_extension))); } catch (std::exception &e) { std::cerr << "ERROR while creating surface for extension " << surface_extension.name << " : " << e.what() |
