-
Notifications
You must be signed in to change notification settings - Fork 128
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
Vulkan Codegen refactor -- next tranche #1916
Vulkan Codegen refactor -- next tranche #1916
Conversation
CI gfxreconstruct build queued with queue ID 323366. |
CI gfxreconstruct build # 5554 running. |
CI gfxreconstruct build # 5554 passed. |
This is your 5 day friendly reminder... @bradgrantham @MarkY-LunarG @fabian-lunarg @davidd-lunarg |
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.
looks very good, 400loc less, logic became much friendlier already and better accounts for additional APIs (OpenXR).
changes are cleanup/corrections/simplification in codegen only,
while still yielding the same generated code (minus whitespace changes). approved :)
38ce152
to
6e11909
Compare
CI gfxreconstruct build queued with queue ID 332699. |
CI gfxreconstruct build # 5661 running. |
CI gfxreconstruct build # 5661 passed. |
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.
Approved pending a spelling pass (e.g. "memebers")
@@ -709,6 +779,13 @@ def is_method_black_listed(self, class_name, method_name=None): | |||
return True | |||
return False | |||
|
|||
def get_all_filtered_struct_names(self): | |||
"""Retrieves a filtered list of keys from self.all_struct_memebers with blacklisted items removed.""" |
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.
memebers
-> members
and also below
Move the Vulkan generator scripts under a khronos_generators folder to prepare it for for sharing with other khronos APIs.
Vulkan/OpenXR has no need for the class funcs
Add global struct/union items since we're going to have to perform some work at endFile time in order to properly work for OpenXR.
Remove the feature break because when we move everything the breaks won't be in the same place. This way the changes are done prior to the move to make sure nothing important changes. Plus, eventually, we'll remove the "process_cmds", "process_structs" and "feature_break" variables since they are not really useful and are often mis-used.
Force process_cmds and process_structs to true prior to removing the variables.
Remove now unused "process_structs", "process_cmds", and "feature_break" variables which were not always used correctly. NOTE: No generated code was changed after running scripts.
First change to add base_header and extended_struct info
The base_header variable is more tightly tied to OpenXR and not other Khronos APIs. So rename it to children_structs.
Generate the structure type and save it at genStruct time.
Use variables and functions from teh khronos_base_generator for pNext encode/decode.
Add an API Data class to track API-specific settings.
This moves the struct processing into a separate function and adds a missing function to detect the StructureType enum.
Instead of generating the structure type manually, use the structure type we already generated while parsing the structure.
Start using the ApiData structure information to replace hardcoded specific strings, mostly pNext sType, variable and enum names
Move the decoding/encoding of the pnext items into separate defs. This is a first step to moving the content into a separate file.
Move the actual defs for generating the enc/decode of the pnext items into a khronos generic file.
Rename to write_includes_of_common_api_headers and move to the base Khronos api directory.
... and use the defined API data struct->json header move to endFile struct->json body gen at endFile time struct->json body use khronos types struct->json header struct->json migration change struct->json body
Move the common struct to json body code into a Khronos file now.
Update the type used in the struct body generation to take into account an alias.
Add the ability to generate the correct information when we encounter a parent/child structure in the JSON output.
Move the generation of content to endFile time for the vulkan_command_buffer_util generation.
Move code generation to endFile time for the Vulkan API call encoder functionality.
Update more Vulkan python scripts to generate at endFile time instead of generate_feature time.
Generate the Vulkan struct handle wrapping content at endFile time instead of generate_feature time.
6e11909
to
5ab8d35
Compare
CI gfxreconstruct build queued with queue ID 339487. |
CI gfxreconstruct build # 5703 running. |
CI gfxreconstruct build # 5703 passed. |
This is the last of the changes that have only whitespace and typo effects on code generation --
git diff --ignore-blank-lines dev -- framework/generated/\*.cpp framework/generated/\*.h
shows.After this batch, there will be mass re-orderings of changes. An additional 110 commits (before some squashing) remain after this.