Skip to content
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

Remove consecutive platform defines #155

Conversation

charles-lunarg
Copy link
Collaborator

Generated code must macro-guard platform specific code, but did it in a naive fashion where consecutive guards for the same platform repeated the macro. With the help of PlatformGuardHelper, the code generation will elide redundant macro guards.

Copy link
Contributor

@juan-lunarg juan-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

FYI @spencer-lunarg

Copy link
Contributor

@spencer-lunarg spencer-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not disagreeing with this change, I think its a super good thing and cleans up something I hated

What I am not sure of is base_generator.py should start to become a util bin

it solo job I think should be to create VulkanObject... I feel this change in the future this would lead to just everyone wanting to add their non-related utils in this file

@charles-lunarg
Copy link
Collaborator Author

Sure, I can agree that it’s not great to have a dumping ground for utils. I’m not sure of a better place though, so I’m open to suggestions.

@spencer-lunarg
Copy link
Contributor

the VVL has a generator_utils.py, wouldn't be the worse for the short term to move it to its own file, curious to see how many "utils" will actually be shared

Generated code must macro-guard platform specific code, but did it in a
naive fashion where consecutive guards for the same platform repeated the
macro. With the help of PlatformGuardHelper, the code generation will elide
redundant macro guards.
@charles-lunarg charles-lunarg force-pushed the remove_consecutive_platform_guards branch from a571a9a to 29cfee0 Compare October 19, 2023 00:38
@charles-lunarg charles-lunarg merged commit dcfce25 into KhronosGroup:main Oct 19, 2023
13 checks passed
@charles-lunarg charles-lunarg deleted the remove_consecutive_platform_guards branch October 19, 2023 00:44
@charles-lunarg
Copy link
Collaborator Author

I'll use camelCase because the rest of the project appears to use it. Easier to keep in line with everything else and if someone wants to change it in the future, they are more than welcome to.

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.

3 participants