diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-10-06 12:58:06 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-10-07 12:01:41 -0600 |
| commit | 335e331c1edb42d069c05326432baba26d90e085 (patch) | |
| tree | 3554dffb9d421114ed58f7531c3bdaa5c3c415a9 /layers/spec.py | |
| parent | 9d674c3b3079fb50fef0925a9fa36af97864939c (diff) | |
| download | usermoji-335e331c1edb42d069c05326432baba26d90e085.tar.xz | |
layers: Updating descriptor checks to use unique enums
Initial batch of updates to use unique validation error enums and
messages for a few checks. Updated the database file and flagged
some other checks that are missing along with "TODO" notes in the
code.
Diffstat (limited to 'layers/spec.py')
| -rw-r--r-- | layers/spec.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/layers/spec.py b/layers/spec.py index f1b23df1..5967ff9a 100644 --- a/layers/spec.py +++ b/layers/spec.py @@ -156,12 +156,13 @@ class Specification: file_contents = [] file_contents.append(self.copyright) file_contents.append('\n#pragma once') + file_contents.append('#include <unordered_map>') file_contents.append('\n// enum values for unique validation error codes') 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 {'] - error_string_map = ['std::unordered_map<int, char const *const> validation_error_map{'] + 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) enum_decl.append(' %s = %d,' % (enum, int(enum.split('_')[-1]))) |
