vktrace: Add support for debug_marker_lunarg extension
authorTobin Ehlis <tobin@lunarg.com>
Thu, 27 Aug 2015 23:41:42 +0000 (17:41 -0600)
committerTobin Ehlis <tobin@lunarg.com>
Fri, 28 Aug 2015 16:14:39 +0000 (10:14 -0600)
vk_helper.py
vulkan.py

index 41f31a62a2a2ed33027d284fb1f5149cccbd5720..352afb41f69b140b5812efc14372d64acb1b677a 100755 (executable)
@@ -1277,7 +1277,7 @@ class StructWrapperGen:
             sh_funcs.append('%s}' % (indent))
             sh_funcs.append("%sreturn structSize;\n}" % (indent))
         # Now generate generic functions to loop over entire struct chain (or just handle single generic structs)
-        if 'wsi' not in self.header_filename and 'debug_report' not in self.header_filename:
+        if 'wsi' not in self.header_filename and '_debug_' not in self.header_filename:
             for follow_chain in [True, False]:
                 sh_funcs.append('%s' % self.lineinfo.get())
                 if follow_chain:
index 959d8e9f0bac2e5b26b2fe99fa212e606ce5dafe..bbae148ea52bc70574f3e45099f9f60ef8a1676e 100755 (executable)
--- a/vulkan.py
+++ b/vulkan.py
@@ -1136,9 +1136,35 @@ debug_report_lunarg = Extension(
              Param("VkDbgMsgCallback", "msgCallback")]),
     ],
 )
+debug_marker_lunarg = Extension(
+    name="VK_DEBUG_MARKER_LunarG",
+    headers=["vk_debug_marker_lunarg.h"],
+    objects=[],
+    protos=[
+        Proto("void", "CmdDbgMarkerBegin",
+            [Param("VkCmdBuffer", "cmdBuffer"),
+             Param("const char*", "pMarker")]),
 
+        Proto("void", "CmdDbgMarkerEnd",
+            [Param("VkCmdBuffer", "cmdBuffer")]),
+
+        Proto("VkResult", "DbgSetObjectTag",
+            [Param("VkDevice", "device"),
+             Param("VkDbgObjectType", "objType"),
+             Param("uint64_t", "object"),
+             Param("size_t", "tagSize"),
+             Param("const void*", "pTag")]),
+
+        Proto("VkResult", "DbgSetObjectName",
+            [Param("VkDevice", "device"),
+             Param("VkDbgObjectType", "objType"),
+             Param("uint64_t", "object"),
+             Param("size_t", "nameSize"),
+             Param("const char*", "pName")]),
+    ],
+)
 extensions = [core, wsi_swapchain, wsi_device_swapchain]
-extensions_all = [core, wsi_swapchain, wsi_device_swapchain, debug_report_lunarg]
+extensions_all = [core, wsi_swapchain, wsi_device_swapchain, debug_report_lunarg, debug_marker_lunarg]
 object_dispatch_list = [
     "VkInstance",
     "VkPhysicalDevice",