"No OpEntryPoint instruction was found" for public function
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- compilers, computer-graphics
Research direction
Reproduce the failure with a shader function in a non-public submodule, using the reported #[spirv(..)] macro and comparing it with the #[unsafe(no_mangle)] workaround. Inspect the macro's handling of public functions and the generated SPIR-V entry points; done means the non-public submodule case validates without requiring the manual attribute.
Written by the indexing model from the issue text.
Description
Expected Behaviour
Non-public submodules should be supported, but instead I'm getting this:
Compiling ab-proof-of-space-gpu v0.1.0 (ab-proof-of-space-gpu)
warning: function `main_cs` is never used
--> src/shaders.rs:10:8
|
10 | pub fn main_cs(
| ^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
error: No OpEntryPoint instruction was found. This is only allowed if the Linkage capability is being used.
|
= note: module `target/debug/build/ab-proof-of-space-gpu-dc89fe269d0c81ad/out/spirv-unknown-vulkan1.1/release/deps/ab_proof_of_space_gpu.spv`
warning: an unknown error occurred
|
= note: spirv-opt failed, leaving as unoptimized
= note: module `target/debug/build/ab-proof-of-space-gpu-dc89fe269d0c81ad/out/spirv-unknown-vulkan1.1/release/deps/ab_proof_of_space_gpu.spv`
error: error:0:0 - No OpEntryPoint instruction was found. This is only allowed if the Linkage capability is being used.
|
= note: spirv-val failed
= note: module `target/debug/build/ab-proof-of-space-gpu-dc89fe269d0c81ad/out/spirv-unknown-vulkan1.1/release/deps/ab_proof_of_space_gpu.spv`
Slapping #[unsafe(no_mangle)] is sufficient to bypass this error, making submodule publicly reachable too.
I think #[spirv(..)] macro should be able to do something about it automatically to ensure it is exposed properly.
Kind of related to https://github.com/Rust-GPU/rust-gpu/issues/156
Example & Steps To Reproduce
- Have a shader in submodule that is not publicly reachable
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 126
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Rust-GPU/rust-gpu
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
enhancement
Rust-GPU/rust-gpu#643 · 2 comments · 1 reaction · 1 assignee ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in Rust-GPU/rust-gpu
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100