From 9f8f3b1cf390851eb40fa00ba45ff5227fda47b9 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Thu, 8 Dec 2016 13:32:05 -0700 Subject: 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. --- layers/object_tracker.cpp | 2 -- layers/spec.py | 2 +- layers/vk_validation_error_messages.h | 1 + 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 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 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, -- cgit v1.2.3