"No OpEntryPoint instruction was found" for public function
オープン
まだ誰も着手していません。
bug
- 主要言語
- Rust
- スター
- 3.4k
- フォーク
- 126
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
非公開サブモジュール内のシェーダー関数で、報告された #[spirv(..)] マクロを使用し、#[unsafe(no_mangle)] の回避策と比較して失敗を再現する。マクロによる公開関数の処理と、生成される SPIR-V エントリポイントを調査する。完了の条件は、手動属性を要求せずに非公開サブモジュールのケースが検証に成功すること。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers, computer-graphics
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 42/100