Skip to content

[Migrated] Warn (or error) on a non-pub entrypoint #60

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

Open
rust-gpu-bot opened this issue Nov 13, 2024 · 1 comment
Open

[Migrated] Warn (or error) on a non-pub entrypoint #60

rust-gpu-bot opened this issue Nov 13, 2024 · 1 comment

Comments

@rust-gpu-bot
Copy link

Issue automatically imported from old repo: EmbarkStudios/rust-gpu#1140
Old labels: t: enhancement
Originally creatd by LegNeato on 2024-03-26T15:36:56Z


When setting #[spirv(fragment)] on a non-pub function, rust-gpu errors with an obtuse error:

error: error:0:0 - No OpEntryPoint instruction was found. This is only allowed if the Linkage capability is being used.

This case should be detected and warned or even made an error if it is not supported. Further, the error message should be fixed as suggested in EmbarkStudios/rust-gpu#1139.

@rust-gpu-bot
Copy link
Author

Comment from LegNeato (CONTRIBUTOR) on 2024-03-28T13:54:37Z


From discord eddyb says:

to add context to this, it's silly like this because specifically the #[spirv(...)] attributes that denote an entry-point are only processed when that function is codegen'd. this also means you can probably cause it to be monomorphized more than once if you do weird things with calling it from other functions :/

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

No branches or pull requests

1 participant