diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-05-30 14:21:21 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-05-31 14:26:36 -0600 |
| commit | 46c9057d3060697b4af73274d022bc0e083d5429 (patch) | |
| tree | a41d60547938cf7871a59bb32be1b9cbd7475ab7 /layers | |
| parent | 1256d00dbd8a7ce0c8b344e355631e415c683028 (diff) | |
| download | usermoji-46c9057d3060697b4af73274d022bc0e083d5429.tar.xz | |
layers: Move PV layer data structs into header
Change-Id: Ie8fb823f1bfa97047cb2d361bc0daea5ee504673
Diffstat (limited to 'layers')
| -rw-r--r-- | layers/parameter_validation.cpp | 30 | ||||
| -rw-r--r-- | layers/parameter_validation_utils.h | 32 |
2 files changed, 32 insertions, 30 deletions
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 7e74d1e5..0205f543 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -52,7 +52,6 @@ #include "parameter_name.h" #include "parameter_validation.h" -#include "device_extensions.h" // TODO: remove on NDK update (r15 will probably have proper STL impl) #ifdef __ANDROID__ @@ -69,35 +68,6 @@ std::string to_string(T var) { namespace parameter_validation { -struct instance_layer_data { - VkInstance instance = VK_NULL_HANDLE; - - 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 = 0; - VkDebugReportCallbackCreateInfoEXT *tmp_dbg_create_infos = nullptr; - VkDebugReportCallbackEXT *tmp_callbacks = nullptr; - InstanceExtensions extensions = {}; - std::unordered_set<std::string> enabled_extensions; - VkLayerInstanceDispatchTable dispatch_table = {}; -}; - -struct layer_data { - debug_report_data *report_data = nullptr; - // 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 = VK_NULL_HANDLE; - VkDevice device = VK_NULL_HANDLE; - DeviceExtensions enables; - std::unordered_set<std::string> enabled_extensions; - - VkLayerDispatchTable dispatch_table = {}; -}; // TODO : This can be much smarter, using separate locks for separate global data static std::mutex global_lock; diff --git a/layers/parameter_validation_utils.h b/layers/parameter_validation_utils.h index 791a7a1a..a0f268ba 100644 --- a/layers/parameter_validation_utils.h +++ b/layers/parameter_validation_utils.h @@ -30,11 +30,43 @@ #include "vk_enum_string_helper.h" #include "vk_layer_logging.h" #include "vk_validation_error_messages.h" +#include "device_extensions.h" + #include "parameter_name.h" namespace parameter_validation { +struct instance_layer_data { + VkInstance instance = VK_NULL_HANDLE; + + 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 = 0; + VkDebugReportCallbackCreateInfoEXT *tmp_dbg_create_infos = nullptr; + VkDebugReportCallbackEXT *tmp_callbacks = nullptr; + InstanceExtensions extensions = {}; + std::unordered_set<std::string> enabled_extensions; + VkLayerInstanceDispatchTable dispatch_table = {}; +}; + +struct layer_data { + debug_report_data *report_data = nullptr; + // 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 = VK_NULL_HANDLE; + VkDevice device = VK_NULL_HANDLE; + DeviceExtensions enables; + std::unordered_set<std::string> enabled_extensions; + + VkLayerDispatchTable dispatch_table = {}; +}; + enum ErrorCode { NONE, // Used for INFO & other non-error messages INVALID_USAGE, // The value of a parameter is not consistent |
