summaryrefslogtreecommitdiff
path: root/vulkan/scripts/null_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/null_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/null_generator.py')
-rw-r--r--vulkan/scripts/null_generator.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/vulkan/scripts/null_generator.py b/vulkan/scripts/null_generator.py
index fcbaf393a5..ee8762e3b4 100644
--- a/vulkan/scripts/null_generator.py
+++ b/vulkan/scripts/null_generator.py
@@ -67,7 +67,7 @@ PFN_vkVoidFunction GetGlobalProcAddr(const char* name);
PFN_vkVoidFunction GetInstanceProcAddr(const char* name);
"""
- genfile = os.path.join(os.path.dirname(__file__),'..','nulldrv','null_driver_gen2.h')
+ genfile = os.path.join(os.path.dirname(__file__),'..','nulldrv','null_driver_gen.h')
with open(genfile, 'w') as f:
f.write (copyright)
f.write (gencom.warning)
@@ -85,6 +85,8 @@ VKAPI_ATTR VkResult QueueSignalReleaseImageANDROID(VkQueue queue, uint32_t waitS
f.write ('\n} // namespace null_driver\n')
f.write ('\n#endif // NULLDRV_NULL_DRIVER_H\n')
+ f.close()
+ gencom.runClangFormat(genfile)
def null_driver_gencpp():
header = """#include <algorithm>
@@ -118,7 +120,7 @@ PFN_vkVoidFunction Lookup(const char* name, const NameProc (&procs)[N]) {
const NameProc kGlobalProcs[] = {
"""
- genfile = os.path.join(os.path.dirname(__file__),'..','nulldrv','null_driver_gen2.cpp')
+ genfile = os.path.join(os.path.dirname(__file__),'..','nulldrv','null_driver_gen.cpp')
with open(genfile, 'w') as f:
f.write (copyright)
f.write (gencom.warning)
@@ -151,4 +153,6 @@ PFN_vkVoidFunction GetInstanceProcAddr(const char* name) {
}
} // namespace null_driver\n""")
+ f.close()
+ gencom.runClangFormat(genfile)