VulkanWrapper: fix failure to load headless surface extension

Meant to use an "#if" not "#if defined" for USE_HEADLESS_SURFACE. Before this fix, we would always request the headless surface extension, which would usually fail on Windows if no loader is installed since current GPU drivers don't implement this extension yet. Change-Id: I5bcf9e08f467fd85712d1bc3504e3f251e886664 Bug: b/176981107 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53208 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
parent 22186f07
...@@ -261,7 +261,7 @@ void VulkanTester::initialize() ...@@ -261,7 +261,7 @@ void VulkanTester::initialize()
std::vector<const char *> extensionNames std::vector<const char *> extensionNames
{ {
VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_SURFACE_EXTENSION_NAME,
#if defined(USE_HEADLESS_SURFACE) #if USE_HEADLESS_SURFACE
VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME, VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME,
#endif #endif
#if defined(VK_USE_PLATFORM_WIN32_KHR) #if defined(VK_USE_PLATFORM_WIN32_KHR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment