Open
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 #156
Example & Steps To Reproduce
- Have a shader in submodule that is not publicly reachable