unique_object: Remove unneccessary code.
authorMark Young <marky@lunarg.com>
Mon, 19 Sep 2016 20:25:33 +0000 (14:25 -0600)
committerMark Young <marky@lunarg.com>
Mon, 19 Sep 2016 20:25:33 +0000 (14:25 -0600)
There is some duplication in querying the WSI extensions in the
unique_object layer.  Remove the duplication.

Change-Id: I2f240e8f801bd3d154fce8b1cbc486b62b5a50ee

layers/unique_objects.h

index ead78a4..36be705 100644 (file)
@@ -275,13 +275,6 @@ void explicit_DestroyInstance(VkInstance instance, const VkAllocationCallbacks *
 // Handle CreateDevice
 static void createDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo, VkDevice device) {
     layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
-    VkLayerDispatchTable *pDisp = get_dispatch_table(unique_objects_device_table_map, device);
-    PFN_vkGetDeviceProcAddr gpa = pDisp->GetDeviceProcAddr;
-    pDisp->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)gpa(device, "vkCreateSwapchainKHR");
-    pDisp->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)gpa(device, "vkDestroySwapchainKHR");
-    pDisp->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)gpa(device, "vkGetSwapchainImagesKHR");
-    pDisp->AcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)gpa(device, "vkAcquireNextImageKHR");
-    pDisp->QueuePresentKHR = (PFN_vkQueuePresentKHR)gpa(device, "vkQueuePresentKHR");
     my_device_data->wsi_enabled = false;
 
     for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {