aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2015-04-22 15:06:12 -0600
committerMark Lobodzinski <mark@lunarg.com>2015-04-22 15:06:12 -0600
commit028e91a5bfc83a2eafc17cf79d9a90f71373b65a (patch)
tree9c6268998fc9c92b07fe873f29063da943d80aab
parent76fe4c623501aea729eff51b6d2b09107a7f93e9 (diff)
downloadusermoji-028e91a5bfc83a2eafc17cf79d9a90f71373b65a.tar.xz
layers: Added fence validation check to object_tracker
Validate that all fences in WaitForFences call have been submitted.
-rwxr-xr-xvk-layer-generate.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/vk-layer-generate.py b/vk-layer-generate.py
index 5a19ddfa..c5c62275 100755
--- a/vk-layer-generate.py
+++ b/vk-layer-generate.py
@@ -1132,6 +1132,11 @@ class ObjectTrackerSubcommand(Subcommand):
elif 'GetFenceStatus' in proto.name:
using_line += ' // Warn if submitted_flag is not set\n'
using_line += ' validate_status(fence, VkObjectTypeFence, OBJSTATUS_FENCE_IS_SUBMITTED, OBJSTATUS_FENCE_IS_SUBMITTED, VK_DBG_MSG_ERROR, OBJTRACK_INVALID_FENCE, "Status Requested for Unsubmitted Fence");\n'
+ elif 'WaitForFences' in proto.name:
+ using_line += ' // Warn if waiting on unsubmitted fence\n'
+ using_line += ' for (uint32_t i = 0; i < fenceCount; i++) {\n'
+ using_line += ' validate_status(pFences[i], VkObjectTypeFence, OBJSTATUS_FENCE_IS_SUBMITTED, OBJSTATUS_FENCE_IS_SUBMITTED, VK_DBG_MSG_ERROR, OBJTRACK_INVALID_FENCE, "Waiting for Unsubmitted Fence");\n'
+ using_line += ' }\n'
elif 'EndCommandBuffer' in proto.name:
using_line += ' reset_status(cmdBuffer, VkObjectTypeCmdBuffer, (OBJSTATUS_VIEWPORT_BOUND |\n'
using_line += ' OBJSTATUS_RASTER_BOUND |\n'