aboutsummaryrefslogtreecommitdiff
path: root/layers/parameter_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-11-02 17:56:50 +1300
committerChris Forbes <chrisforbes@google.com>2016-11-07 15:25:05 +1300
commit9996e6a75ef0a1ab2d96c2a13f7e6a17444e1d16 (patch)
treeb3c66d16dc361cf49fe994981474d2babe1792d9 /layers/parameter_validation.cpp
parenteaa597ae583a7a41b4ab4e8f0c16f13cccb6e303 (diff)
downloadusermoji-9996e6a75ef0a1ab2d96c2a13f7e6a17444e1d16.tar.xz
layers: Use uniform initialization better in PV::layer_data
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/parameter_validation.cpp')
-rw-r--r--layers/parameter_validation.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp
index 3dd15ccb..885e1bc2 100644
--- a/layers/parameter_validation.cpp
+++ b/layers/parameter_validation.cpp
@@ -54,31 +54,27 @@
namespace parameter_validation {
struct layer_data {
- VkInstance instance;
+ VkInstance instance = VK_NULL_HANDLE;
- debug_report_data *report_data;
+ debug_report_data *report_data = nullptr;
std::vector<VkDebugReportCallbackEXT> logging_callback;
// The following are for keeping track of the temporary callbacks that can
// be used in vkCreateInstance and vkDestroyInstance:
- uint32_t num_tmp_callbacks;
- VkDebugReportCallbackCreateInfoEXT *tmp_dbg_create_infos;
- VkDebugReportCallbackEXT *tmp_callbacks;
+ uint32_t num_tmp_callbacks = 0;
+ VkDebugReportCallbackCreateInfoEXT *tmp_dbg_create_infos = nullptr;
+ VkDebugReportCallbackEXT *tmp_callbacks = nullptr;
// TODO: Split instance/device structs
// Device Data
// Map for queue family index to queue count
std::unordered_map<uint32_t, uint32_t> queueFamilyIndexMap;
- VkPhysicalDeviceLimits device_limits;
- VkPhysicalDeviceFeatures physical_device_features;
- VkPhysicalDevice physical_device;
+ VkPhysicalDeviceLimits device_limits = {};
+ VkPhysicalDeviceFeatures physical_device_features = {};
+ VkPhysicalDevice physical_device = VK_NULL_HANDLE;
- bool swapchain_enabled;
- bool display_swapchain_enabled;
-
- layer_data()
- : report_data(nullptr), num_tmp_callbacks(0), tmp_dbg_create_infos(nullptr), tmp_callbacks(nullptr), device_limits{},
- physical_device_features{}, physical_device{}, swapchain_enabled(false), display_swapchain_enabled(false) {};
+ bool swapchain_enabled = false;
+ bool display_swapchain_enabled = false;
};
static std::unordered_map<void *, struct instance_extension_enables> instance_extension_map;