aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-12-08 13:32:05 -0700
committerTobin Ehlis <tobine@google.com>2016-12-08 13:52:38 -0700
commit9f8f3b1cf390851eb40fa00ba45ff5227fda47b9 (patch)
tree04696a5971fc9bcea6da9acf851dba7ead94f350
parent5ec37011c95f261eb3ded42a66758b55e13f6475 (diff)
downloadusermoji-9f8f3b1cf390851eb40fa00ba45ff5227fda47b9.tar.xz
layers:Add undefined validation error enum
Add VALIDATION_ERROR_UNDEFINED to UNIQUE_VALIDATION_ERROR_CODE enum with a value of "-1". This had been custom-defined in object_tracker.cpp so removing it from there.
-rw-r--r--layers/object_tracker.cpp2
-rw-r--r--layers/spec.py2
-rw-r--r--layers/vk_validation_error_messages.h1
3 files changed, 2 insertions, 3 deletions
diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp
index 6c60e44c..b3a086d6 100644
--- a/layers/object_tracker.cpp
+++ b/layers/object_tracker.cpp
@@ -316,8 +316,6 @@ static void DestroyObject(T1 dispatchable_object, T2 object, VkDebugReportObject
}
}
-static const int VALIDATION_ERROR_UNDEFINED = -1;
-
template <typename T1, typename T2>
static bool ValidateObject(T1 dispatchable_object, T2 object, VkDebugReportObjectTypeEXT object_type, bool null_allowed,
int error_code) {
diff --git a/layers/spec.py b/layers/spec.py
index 3ee77750..3fc58caf 100644
--- a/layers/spec.py
+++ b/layers/spec.py
@@ -175,7 +175,7 @@ class Specification:
file_contents.append('// Corresponding validation error message for each enum is given in the mapping table below')
file_contents.append('// When a given error occurs, these enum values should be passed to the as the messageCode')
file_contents.append('// parameter to the PFN_vkDebugReportCallbackEXT function')
- enum_decl = ['enum UNIQUE_VALIDATION_ERROR_CODE {']
+ enum_decl = ['enum UNIQUE_VALIDATION_ERROR_CODE {\n VALIDATION_ERROR_UNDEFINED = -1,']
error_string_map = ['static std::unordered_map<int, char const *const> validation_error_map{']
for enum in sorted(self.val_error_dict):
#print "Header enum is %s" % (enum)
diff --git a/layers/vk_validation_error_messages.h b/layers/vk_validation_error_messages.h
index e9b91a76..11e0f0c0 100644
--- a/layers/vk_validation_error_messages.h
+++ b/layers/vk_validation_error_messages.h
@@ -29,6 +29,7 @@
// When a given error occurs, these enum values should be passed to the as the messageCode
// parameter to the PFN_vkDebugReportCallbackEXT function
enum UNIQUE_VALIDATION_ERROR_CODE {
+ VALIDATION_ERROR_UNDEFINED = -1,
VALIDATION_ERROR_00000 = 0,
VALIDATION_ERROR_00001 = 1,
VALIDATION_ERROR_00002 = 2,