adding vulkan.py extension.ifdef field to vulkan.py
Some extensions are disabled at compile time and must not be included
in generated code. Issue #72 gh72. This adds a new optional field
ifdef which contains the #define symbol to insert as a guard around
generated code.
Change-Id: I30b521dd1ff77d0db1608cb11c8c999cef40dff2
diff --git a/vulkan.py b/vulkan.py
index 97d8706..4a9b796 100644
--- a/vulkan.py
+++ b/vulkan.py
@@ -159,11 +159,12 @@
(self.ret, self.name, param_str)
class Extension(object):
- def __init__(self, name, headers, objects, protos):
+ def __init__(self, name, headers, objects, protos, ifdef = None):
self.name = name
self.headers = headers
self.objects = objects
self.protos = protos
+ self.ifdef = ifdef
def __repr__(self):
lines = []
@@ -1160,6 +1161,7 @@
name="VK_KHR_xlib_surface",
headers=["vulkan/vulkan.h"],
objects=[],
+ ifdef="VK_USE_PLATFORM_XLIB_KHR",
protos=[
Proto("VkResult", "CreateXlibSurfaceKHR",
[Param("VkInstance", "instance"),