loader: GH54: Fix setfault with VK_EXT_debug_utils
authorMark Young <marky@lunarg.com>
Mon, 16 Jul 2018 15:45:55 +0000 (09:45 -0600)
committerMark Young <marky@lunarg.com>
Mon, 16 Jul 2018 16:53:35 +0000 (10:53 -0600)
The loader was not setting the device flag indicating that the
VK_EXT_debug_utils extension had been set in the instance unless
one or more device extensions had been added to the list.

This fixes the bug caught by nikitablack on StackOverflow.

Change-Id: I23c24ee059ab5a66b9dbfdb9fa9ddab009fb2118

loader/loader.c

index fc56b904496a624d3e0a5826b3e27ea7c82229c1..1d8dfdf730108ab726289b4b2133ce185d94aacd 100644 (file)
@@ -5582,8 +5582,8 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(VkPhysicalDevice physical
         } else if (!strcmp(localCreateInfo.ppEnabledExtensionNames[i], VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
             dev->extensions.ext_debug_marker_enabled = true;
         }
-        dev->extensions.ext_debug_utils_enabled = icd_term->this_instance->enabled_known_extensions.ext_debug_utils;
     }
+    dev->extensions.ext_debug_utils_enabled = icd_term->this_instance->enabled_known_extensions.ext_debug_utils;
 
     res = fpCreateDevice(phys_dev_term->phys_dev, &localCreateInfo, pAllocator, &dev->icd_device);
     if (res != VK_SUCCESS) {