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

Fix entrypoint naming in glsl backend. #5320

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

csyonghe
Copy link
Collaborator

When there is

[shader("compute")]
void inner() { ... }

[shader("compute")]
void outer() { inner(); }

And the user trys to compile outer to glsl, we are currently generating two functions named main in the output glsl because both functions are marked as entrypoint, and there is the logic to emit all entrypoints as main. This is wrong if a user-declared entrypoint isn't being selected as the entrypoint in the current compilation session.

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Oct 16, 2024
Copy link
Collaborator

@jkwak-work jkwak-work left a comment

Choose a reason for hiding this comment

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

Looks good to me

@csyonghe csyonghe merged commit 2f7f48a into shader-slang:master Oct 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants