diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-06-29 10:53:51 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-06-29 13:52:13 -0600 |
| commit | d41b1774660e7b2ece5820f6f78baa9ed588b48e (patch) | |
| tree | 66f8cbc405d887c0004904c40abd8f0994adef68 /layers/core_validation.cpp | |
| parent | e412970103305fcf1cd0763f82c7ade94780b2e5 (diff) | |
| download | usermoji-d41b1774660e7b2ece5820f6f78baa9ed588b48e.tar.xz | |
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
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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 <map> #include <mutex> #include <set> +//#include <memory> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -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<INSTANCE_STATE>(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<VkBool32 *>(&(dev_data->physical_device_features)); + const VkBool32 *requested = reinterpret_cast<const VkBool32 *>(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. |
