Skip to content

Conversation

@charles-lunarg
Copy link
Collaborator

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.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ExtensionLayer build queued with queue ID 608431.

@ci-tester-lunarg
Copy link
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.
@charles-lunarg charles-lunarg force-pushed the vulkan_object_codegen_refactor branch from 14d1a9a to 419a612 Compare December 23, 2025 22:21
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ExtensionLayer build queued with queue ID 608444.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ExtensionLayer build # 1099 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ExtensionLayer build # 1099 passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants