From d41b1774660e7b2ece5820f6f78baa9ed588b48e Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Wed, 29 Jun 2016 10:53:51 -0600 Subject: layers: Take care of DevLimits cleanup items Added some simplifying make_unique() calls, changed param_validation Log_msg calls to use LayerName var, added variable init to constructor, and fixed some c-style casts. Change-Id: I718e0d51b62a4b91a4c9b3645ff796d114a4432f --- layers/core_validation.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index ca296989..ab14ca14 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -38,6 +38,7 @@ #include #include #include +//#include #include #include #include @@ -154,7 +155,7 @@ struct layer_data { layer_data() : instance_state(nullptr), report_data(nullptr), device_dispatch_table(nullptr), instance_dispatch_table(nullptr), - device_extensions(), device(VK_NULL_HANDLE), phys_dev_properties{}, phys_dev_mem_props{}, + device_extensions(), device(VK_NULL_HANDLE), phys_dev_properties{}, phys_dev_mem_props{}, physical_device_features{}, physical_device_state(nullptr){}; }; @@ -3944,8 +3945,8 @@ CreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallba instance_data->report_data = debug_report_create_instance(instance_data->instance_dispatch_table, *pInstance, pCreateInfo->enabledExtensionCount, pCreateInfo->ppEnabledExtensionNames); - init_core_validation(instance_data, pAllocator); + instance_data->instance_state = unique_ptr(new INSTANCE_STATE()); ValidateLayerOrdering(*pCreateInfo); @@ -4038,8 +4039,8 @@ bool ValidateRequestedQueueFamilyProperties(layer_data *dev_data, const VkDevice static bool ValidateRequestedFeatures(layer_data *dev_data, const VkPhysicalDeviceFeatures *requested_features) { bool skip_call = false; - VkBool32 *actual = (VkBool32 *)&(dev_data->physical_device_features); - VkBool32 *requested = (VkBool32 *)requested_features; + VkBool32 *actual = reinterpret_cast(&(dev_data->physical_device_features)); + const VkBool32 *requested = reinterpret_cast(requested_features); // TODO : This is a nice, compact way to loop through struct, but a bad way to report issues // Need to provide the struct member name with the issue. To do that seems like we'll // have to loop through each struct member which should be done w/ codegen to keep in synch. -- cgit v1.2.3