aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hubbard <david.c.hubbard@gmail.com>2016-08-19 13:30:06 -0600
committerArda Coskunses <arda@lunarg.com>2016-08-19 13:37:07 -0600
commitc79277ae0703934a65bdab11629664c863768751 (patch)
treed8425b3aa6c8fda9397b79a1cb3aeb6258896500
parente7451b3973db31f6018915567c1048e3db19afbf (diff)
downloadusermoji-c79277ae0703934a65bdab11629664c863768751.tar.xz
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
-rw-r--r--vulkan.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/vulkan.py b/vulkan.py
index 97d87069..4a9b7966 100644
--- a/vulkan.py
+++ b/vulkan.py
@@ -159,11 +159,12 @@ class Proto(object):
(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 @@ ext_khr_xlib_surface = Extension(
name="VK_KHR_xlib_surface",
headers=["vulkan/vulkan.h"],
objects=[],
+ ifdef="VK_USE_PLATFORM_XLIB_KHR",
protos=[
Proto("VkResult", "CreateXlibSurfaceKHR",
[Param("VkInstance", "instance"),