shader_object: Use VulkanObject in codegen#498
Open
charles-lunarg wants to merge 1 commit intoKhronosGroup:mainfrom
Open
shader_object: Use VulkanObject in codegen#498charles-lunarg wants to merge 1 commit intoKhronosGroup:mainfrom
charles-lunarg wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
Collaborator
|
CI Vulkan-ExtensionLayer build queued with queue ID 608431. |
Collaborator
|
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
Collaborator
|
CI Vulkan-ExtensionLayer build queued with queue ID 608444. |
Collaborator
|
CI Vulkan-ExtensionLayer build # 1099 running. |
Collaborator
|
CI Vulkan-ExtensionLayer build # 1099 passed. |
ziga-lunarg
approved these changes
Dec 23, 2025
spencer-lunarg
approved these changes
Dec 24, 2025
daniel-story
approved these changes
Jan 24, 2026
Collaborator
daniel-story
left a comment
There was a problem hiding this comment.
Please try to land this in the 341 SDK.
daniel-story
requested changes
Jan 26, 2026
Collaborator
daniel-story
left a comment
There was a problem hiding this comment.
We provided some comments offline, please resolve those before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.