layers: Image layer does not need to reserve space
authorMike Stroyan <mike@LunarG.com>
Fri, 25 Sep 2015 22:36:21 +0000 (16:36 -0600)
committerMike Stroyan <mike@LunarG.com>
Fri, 25 Sep 2015 22:36:21 +0000 (16:36 -0600)
Image layer had been calling imageMap.reserve to recover from memset of imageMap.
That is no longer needed.

layers/image.cpp

index d822b2eba362c699bcb892a06c1aa27ae87400a6..b6d03a147026a3eb55bc85cd950a2d55b3505d8e 100644 (file)
@@ -57,6 +57,10 @@ static unordered_map<void*, layer_data*> layer_data_map;
 static device_table_map image_device_table_map;
 static instance_table_map image_instance_table_map;
 
+template static layer_data *get_my_data_ptr<layer_data>(
+        void *data_key,
+        std::unordered_map<void *, layer_data *> &data_map);
+
 // "my device data"
 debug_report_data *mdd(const void* object)
 {
@@ -171,7 +175,6 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalDevice physicalDevice, c
         layer_data *device_data = get_my_data_ptr(get_dispatch_key(*pDevice), layer_data_map);
         device_data->report_data = layer_debug_report_create_device(instance_data->report_data, *pDevice);
         device_data->physicalDevice = physicalDevice;
-        device_data->imageMap.reserve(10);
     }
 
     return result;