-
Notifications
You must be signed in to change notification settings - Fork 127
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
Zulauf vulkan codegen tranche 5 #2009
base: dev
Are you sure you want to change the base?
Zulauf vulkan codegen tranche 5 #2009
Conversation
CI gfxreconstruct build queued with queue ID 365905. |
CI gfxreconstruct build # 6018 running. |
CI gfxreconstruct build # 6018 passed. |
size_t bytes_read = DecodeAttributes(buffer, buffer_size); | ||
|
||
// We should only be decoding structs. | ||
assert((GetAttributeMask() & format::PointerAttributes::kIsStruct) == format::PointerAttributes::kIsStruct); |
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.
prefer GFXRECON_ASSERT
here and some other places close by.
the output is a bit more expressive I think.
#!/usr/bin/python3 -i | ||
# | ||
# Copyright (c) 2018 Valve Corporation | ||
# Copyright (c) 2018-2024 LunarG, Inc. |
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.
2018-2025
here and in other .py
license-headers
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.
All the commits are from 2024. Will ensure any commit with date > Jan 1 is updated
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 good.
codegen-codebase seems to become both more tidy and capable.
output has not really changed.
only left minor remarks.
Move the consumer header contents into stand-alone methods which can be migrated to the khronos folder.
Add ability to skip generating commands that are not needed. This will be needed for future Khronos APIs.
I also modified the if check when adding the skip to continue instead of adding another "and not". This cleans up the logic and shifts code to the left.
And ran yapf
Add skip to each "if" and modify the if checks to add a continue to move code to the left.
Also update if statement iwht skip and modified it to continue allowing remaining code to shift left.
Also modify if check to perform a continue allow code to shift to the left.
Make the Khronos enum to string body Khronos API agnostic.
Make the Khronos enum to string header Khronos API agnostic.
Add support for allocating and decoding parent/child structure relationships.
Add children decoding to the struct_pointer_decoder header.
Add struct members to the list of structures we need to generate if they have handles.
Add recursion to determine what structures need output helper functions
Move a type defined in the Vulkan script into the Khronos script and only define it in the places it is needed. This also moves the assistant methods to closer to where they are needed.
Update the struct handle mappers header to generate structures recursively which may require output handle detection. Also rename the primary method for the Khronos version from `endFile` to `writeStructHandleMapperHeader`.
Update the output struct handle detection for the body script to use recursion to make sure no structure is missed.
Add parent/child support in the struct handle mappers body code.
Add support for defining necessary functions to handle parent/child struct array encoding.
Add support of encoding parent/child structures in the Khronos struct_encoder_body script
Cleanup the khronos struct decoder header generator script so that the normal and child struct decoder definitions are split into seperate methods. Also, rename the remaining methods to the expected lowerSnakeCase standard.
Rename the main method for KhronosStructDecodersBodyGenerator from endFile to generateStructDecoderContent
Move the basic functionality of the struct decoder forward header information into a generic khronos script.
This allows us to remove DUPLICATE_HANDLE_TYPES since that was used to detect aliased handles
This moves the previous handle code into a method which is then called per handle, atom, and opaque type.
Rename the script to clarify it is for Vulkan.
79819f6
to
c51f5f8
Compare
CI gfxreconstruct build queued with queue ID 370967. |
CI gfxreconstruct build # 6059 running. |
CI gfxreconstruct build # 6059 passed. |
@MarkY-LunarG @bradgrantham -- addressed @fabian-lunarg 's comments rebased/testing on dev cleanly |
40 commits. Minimal changes to output (one file renamed).