summaryrefslogtreecommitdiff
path: root/vulkan/scripts/api_generator.py
diff options
context:
space:
mode:
authorAdithya Srinivasan <adsrini@google.com>2019-07-11 14:26:04 -0700
committerAdithya Srinivasan <adsrini@google.com>2019-07-12 15:28:58 -0700
commit8dce9d78e7aedd614cec867a8dbcd9d9e2f3ea1c (patch)
tree3bf1996653d257d4ecf7416cf4e21eec88b17476 /vulkan/scripts/api_generator.py
parent8e94c75e74bee074ddf98c79356d87b415341491 (diff)
Generate Vulkan framework from Vulkan registry (Part 4)
Instead of using the manually created vulkan.api file for generating the Vulkan driver framework, we generate it directly from the vulkan registry (vk.xml) Bug: 134711355 Test: Build and flash, dEQP tests Change-Id: Ie38d93c51ff16d2108cbe9a9a717a0bea24947df
Diffstat (limited to 'vulkan/scripts/api_generator.py')
-rw-r--r--vulkan/scripts/api_generator.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/vulkan/scripts/api_generator.py b/vulkan/scripts/api_generator.py
index 05dc9957b0..a0c648cc90 100644
--- a/vulkan/scripts/api_generator.py
+++ b/vulkan/scripts/api_generator.py
@@ -63,7 +63,7 @@ bool InitDispatchTable(
#endif // LIBVULKAN_API_GEN_H
"""
- genfile = os.path.join(os.path.dirname(__file__),'..','libvulkan','api_gen2.h')
+ genfile = os.path.join(os.path.dirname(__file__),'..','libvulkan','api_gen.h')
with open(genfile, 'w') as f:
instanceDispatchTableEntries = []
deviceDispatchTableEntries = []
@@ -93,6 +93,7 @@ bool InitDispatchTable(
f.write (tail)
f.close()
+ gencom.runClangFormat(genfile)
def defineInitProc(name, f):
f.write ('#define UNLIKELY(expr) __builtin_expect((expr), 0)\n')
@@ -233,7 +234,7 @@ def apiDispatch(functionName, f):
def api_gencpp():
- genfile = os.path.join(os.path.dirname(__file__),'..','libvulkan','api_gen2.cpp')
+ genfile = os.path.join(os.path.dirname(__file__),'..','libvulkan','api_gen.cpp')
header = """#include <log/log.h>
#include <string.h>
@@ -341,4 +342,5 @@ namespace api {\n\n""")
f.write ('}\n\n')
gencom.clang_on(f, 0)
-
+ f.close()
+ gencom.runClangFormat(genfile)