aboutsummaryrefslogtreecommitdiff
path: root/layers/unique_objects.cpp
diff options
context:
space:
mode:
authorMike Weiblen <mikew@lunarg.com>2016-12-09 17:36:28 -0700
committerMike Weiblen <mikew@lunarg.com>2016-12-15 13:09:12 -0700
commitfe543f83a6dc9f2bbded8e30eb2afea8ba6c6038 (patch)
treeeff01553fcf5437e106b9b896303a10f489d4072 /layers/unique_objects.cpp
parent225d54a5fedc1ce56703fe0f44b33dd4deb3bbf4 (diff)
downloadusermoji-fe543f83a6dc9f2bbded8e30eb2afea8ba6c6038.tar.xz
layers: Update Valid Usage enums (VL-70)
Reviewed the following 5 files' invocation of log_msg() for opportunities to update for Valid Usage enums. layers/threading.h layers/vk_layer_logging.h layers/descriptor_sets.cpp layers/swapchain.cpp layers/unique_objects.cpp Split some composite checks apart, to better match the meaning of individual VUs. Added VU enums to a new file, and expanded the stats collection script to include the new file. Changed some placeholder uses of msgCode=="0" to "VALIDATION_ERROR_UNDEFINED". (0 is the value of the enum VALIDATION_ERROR_00000 which was misleading) When Valid Usage enums were referenced, also updated the VU database. Tweak #include order for Windows, to undo clang-format reordering. Completes Jira task VL-70. Change-Id: I550922b194e733f41316ae493098f70a54cbd64e
Diffstat (limited to 'layers/unique_objects.cpp')
-rw-r--r--layers/unique_objects.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp
index d4aabdfe..bd9aabd8 100644
--- a/layers/unique_objects.cpp
+++ b/layers/unique_objects.cpp
@@ -28,18 +28,21 @@
#include <list>
#include <memory>
+// For Windows, this #include must come before other Vk headers.
#include "vk_loader_platform.h"
-#include "vulkan/vk_layer.h"
-#include "vk_layer_config.h"
-#include "vk_layer_extension_utils.h"
-#include "vk_layer_utils.h"
-#include "vk_layer_table.h"
-#include "vk_layer_logging.h"
+
#include "unique_objects.h"
#include "vk_dispatch_table_helper.h"
-#include "vk_struct_string_helper_cpp.h"
+#include "vk_layer_config.h"
#include "vk_layer_data.h"
+#include "vk_layer_extension_utils.h"
+#include "vk_layer_logging.h"
+#include "vk_layer_table.h"
#include "vk_layer_utils.h"
+#include "vk_layer_utils.h"
+#include "vk_struct_string_helper_cpp.h"
+#include "vk_validation_error_messages.h"
+#include "vulkan/vk_layer.h"
// This intentionally includes a cpp file
#include "vk_safe_struct.cpp"
@@ -101,7 +104,7 @@ static void checkInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateI
layer_data *instance_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kUniqueObjectsSupportedInstanceExtensions)) {
log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
- 0, "UniqueObjects",
+ VALIDATION_ERROR_UNDEFINED, "UniqueObjects",
"Instance Extension %s is not supported by this layer. Using this extension may adversely affect "
"validation results and/or produce undefined behavior.",
pCreateInfo->ppEnabledExtensionNames[i]);
@@ -129,7 +132,7 @@ static void createDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo
// Check for recognized device extensions
if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kUniqueObjectsSupportedDeviceExtensions)) {
log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
- 0, "UniqueObjects",
+ VALIDATION_ERROR_UNDEFINED, "UniqueObjects",
"Device Extension %s is not supported by this layer. Using this extension may adversely affect "
"validation results and/or produce undefined behavior.",
pCreateInfo->ppEnabledExtensionNames[i]);