-
Notifications
You must be signed in to change notification settings - Fork 52
shader_object: Use VulkanObject in codegen #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
shader_object: Use VulkanObject in codegen #498
Conversation
|
CI Vulkan-ExtensionLayer build queued with queue ID 608431. |
|
CI Vulkan-ExtensionLayer build # 1098 running. |
Refactors shader_object_generator.py to use VulkanObject to generate the shader object implementation files. This is done to ensure future maintainability of shader_object by utilizing definitions of types and variables in it rather than solely relying on the hand maintained shader_object_data.json. However, because Vulkan Object is lacking some API details the bulk of the contents of shader_object_data.json had to be preserved. For example, VkDynamicState enums correspond to various state setting commands but VulkanObject nor vk.xml define those relationships. Changes in this PR include: * generate_source.py added which handles running the codegen for each file. * running clang-format on the output files * Adding the CMake target `extension_layer_codegen` to automate running codegen. Must set EXTENSION_LAYER_CODEGEN build option to true to make available. * Adding `VERSION` to `project()` in the top level CMakeLists.txt, allowing dependencies to easily require a specific version of this repo.
14d1a9a to
419a612
Compare
|
CI Vulkan-ExtensionLayer build queued with queue ID 608444. |
|
CI Vulkan-ExtensionLayer build # 1099 running. |
|
CI Vulkan-ExtensionLayer build # 1099 passed. |
daniel-story
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to land this in the 341 SDK.
daniel-story
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We provided some comments offline, please resolve those before merging.
Refactors shader_object_generator.py to use VulkanObject to generate the shader object implementation files. This is done to ensure future maintainability of shader_object by utilizing definitions of types and variables in it rather than solely relying on the hand maintained shader_object_data.json. However, because Vulkan Object is lacking some API details the bulk of the contents of shader_object_data.json had to be preserved. For example, VkDynamicState enums correspond to various state setting commands but VulkanObject nor vk.xml define those relationships.
Changes in this PR include:
extension_layer_codegento automate running codegen. Must set EXTENSION_LAYER_CODEGEN build option to true to make available.VERSIONtoproject()in the top level CMakeLists.txt, allowing dependencies to easily require a specific version of this repo.