loader: Fix createDev treminator to init the logicalDevs ICD dev
authorJon Ashburn <jon@lunarg.com>
Fri, 1 Apr 2016 17:49:39 +0000 (11:49 -0600)
committerJon Ashburn <jon@lunarg.com>
Fri, 1 Apr 2016 17:49:39 +0000 (11:49 -0600)
Last commit on physDev detanglement was incompatible with the fix
to simplify the chaining loader_device_info.

Change-Id: I0468178bcffb114a9bf3038c773cf1912ad5ac72

loader/loader.c

index eecbc756914bf7ed4a4b009bc89a3ce7e72bbebd..ff793ea18a48b73b21d65172089595867f937121 100644 (file)
@@ -3850,19 +3850,18 @@ terminator_CreateDevice(VkPhysicalDevice physicalDevice,
         }
     }
 
-    VkDevice localDevice;
     // TODO: Why does fpCreateDevice behave differently than
     // this_icd->CreateDevice?
     //    VkResult res = fpCreateDevice(phys_dev->phys_dev, &localCreateInfo,
     //    pAllocator, &localDevice);
     res = phys_dev->this_icd->CreateDevice(phys_dev->phys_dev, &localCreateInfo,
-                                           pAllocator, &localDevice);
+                                           pAllocator, &dev->device);
 
     if (res != VK_SUCCESS) {
         return res;
     }
 
-    *pDevice = localDevice;
+    *pDevice = dev->device;
     loader_add_logical_device(phys_dev->this_icd->this_instance, phys_dev->this_icd, dev);
 
     /* Init dispatch pointer in new device object */