|author||Lingfeng Yang <firstname.lastname@example.org>||Wed Mar 13 23:59:44 2019 -0700|
|committer||Lingfeng Yang <email@example.com>||Thu Mar 14 00:03:17 2019 -0700|
Add basic vk.xml parsing code Replaces functionality of Vulkan Registry's reg.py: https://github.com/KhronosGroup/Vulkan-Docs/blob/master/xml/reg.py w/ a stripped-down, simplified procedural version. - Parse the required vulkan API levels and extensions - Get the closure of vulkan types (both explicitly required by the core API and by extensions and by types referenced in core/extension-required commands) - Add a test vk.xml long with a test module. - Add test.py script for running tests of the code generator. Change-Id: Ic078ea19530ee22334a5614efa96a0e50c8bffc3
Vulkan Cereal is a code generator that makes it easier to serialize and forward Vulkan API calls from one place to another, such as:
Currently, Vulkan Cereal is written in Python as it is a well-known language with batteries included that is easy to edit by many developers. However, it's possible this can change in the future to an Ocaml / Haskell DSL as it will be much easier to specify generic and correct code generators.
Vulkan Cereal requires Python 3+ along with lxml for XML parsing.
python cereal.py [path-to-vk.xml] [target-module.json]
We realize that due to the broad set of possible use cases, it can get confusing. We choose to go with the terms “guest” and “host” for now as it reflects the current actual usage the best.
Cereal takes as input a Vulkan specification in the form of an XML document along with a target module that consists of:
We will include some widely-used target modules as examples. Target modules are specified in .json format.