vulkaninfo: Check support for surface extensions before using them
authorGabríel Arthúr Pétursson <gabriel@system.is>
Fri, 19 Apr 2019 13:35:24 +0000 (13:35 +0000)
committerjeremyk-lunarg <jeremyk@lunarg.com>
Tue, 30 Apr 2019 20:36:36 +0000 (14:36 -0600)
commit8f1b03927b85b5e1a4a64b39b04ad6845064cb1e
tree3513d09300e35d8db4c5ade28893afa8162084a3
parentf8d925987ba7e60ae99e9c4cc50a7df326ecdf16
vulkaninfo: Check support for surface extensions before using them

Not all ICDs support all the surface extensions that vulkaninfo
enumerates.

For example, on Linux with an ICD that only support VK_KHR_xcb_surface,
vulkaninfo crashes:

Presentable Surfaces:
=====================
ERROR: VK_KHR_xlib_surface extension not enabled.  vkCreateXlibSurfaceKHR not executed!

vulkaninfo/vulkaninfo.c:1427: failed with VK_ERROR_EXTENSION_NOT_PRESENT
vulkaninfo/vulkaninfo.c