diff options
| author | Jamie Madill <jmadill@chromium.org> | 2017-11-08 14:11:26 -0500 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-11-09 09:51:07 -0700 |
| commit | c284bde6b1c4a4af3ff651c70836f31deb7532a4 (patch) | |
| tree | b513df9967d13f3f70d0e9c9fbb5028265a04068 /scripts/object_tracker_generator.py | |
| parent | 931a3936ecf30348013e0e3dd14cce02eb0c0beb (diff) | |
| download | usermoji-c284bde6b1c4a4af3ff651c70836f31deb7532a4.tar.xz | |
layers: Don't confuse VkResult/VkBool32 in generators.
In some cases, the generator would return the special error for
validation failed for functions that return a VkBool32. Fix this, and
also some cases of initializing a VkBool32 with VkResult.
Change-Id: Icc071e647f293848d62a922d492ed41dfc5a4be1
Diffstat (limited to 'scripts/object_tracker_generator.py')
| -rw-r--r-- | scripts/object_tracker_generator.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/object_tracker_generator.py b/scripts/object_tracker_generator.py index 50e19cc3..4350fa39 100644 --- a/scripts/object_tracker_generator.py +++ b/scripts/object_tracker_generator.py @@ -937,7 +937,12 @@ class ObjectTrackerOutputGenerator(OutputGenerator): API = cmdinfo.elem.attrib.get('name').replace('vk', dispatch_table, 1) # Put all this together for the final down-chain call if assignresult != '': - self.appendSection('command', ' if (skip) return VK_ERROR_VALIDATION_FAILED_EXT;') + if resulttype.text == 'VkResult': + self.appendSection('command', ' if (skip) return VK_ERROR_VALIDATION_FAILED_EXT;') + elif resulttype.text == 'VkBool32': + self.appendSection('command', ' if (skip) return VK_FALSE;') + else: + raise Exception('Unknown result type ' + resulttype.text) else: self.appendSection('command', ' if (skip) return;') self.appendSection('command', ' ' + assignresult + API + '(' + paramstext + ');') |
