intel/compiler: Implement TCS 8_PATCH mode and INTEL_DEBUG=tcs8
[mesa.git] / src / intel / vulkan / anv_entrypoints_gen.py
index 5f53501b35bcedabcb3e483a68499c5122aed812..4dfde4513f074973988c6e1edcfebe56f0d15398 100644 (file)
@@ -582,12 +582,15 @@ def get_entrypoints_defines(doc):
     """Maps entry points to extension defines."""
     entrypoints_to_defines = {}
 
+    platform_define = {}
+    for platform in doc.findall('./platforms/platform'):
+        name = platform.attrib['name']
+        define = platform.attrib['protect']
+        platform_define[name] = define
+
     for extension in doc.findall('./extensions/extension[@platform]'):
         platform = extension.attrib['platform']
-        ext = '_KHR'
-        if platform.upper() == 'XLIB_XRANDR':
-            ext = '_EXT'
-        define = 'VK_USE_PLATFORM_' + platform.upper() + ext
+        define = platform_define[platform]
 
         for entrypoint in extension.findall('./require/command'):
             fullname = entrypoint.attrib['name']
@@ -661,7 +664,7 @@ def main():
                                       device_strmap=device_strmap,
                                       filename=os.path.basename(__file__)))
     except Exception:
-        # In the even there's an error this imports some helpers from mako
+        # In the event there's an error, this imports some helpers from mako
         # to print a useful stack trace and prints it, then exits with
         # status 1, if python is run with debug; otherwise it just raises
         # the exception