"No OpEntryPoint instruction was found" for public function
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- rust
- Lĩnh vực
- compilers, computer-graphics
Hướng nghiên cứu
Tái hiện lỗi với một hàm shader trong một submodule không công khai, sử dụng macro #[spirv(..)] đã được báo cáo và so sánh với workaround #[unsafe(no_mangle)]. Kiểm tra cách macro xử lý các hàm công khai và các entry point SPIR-V được tạo; được coi là hoàn thành khi trường hợp submodule không công khai được xác thực mà không yêu cầu thuộc tính thủ công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Rust
- Star
- 3.4k
- Fork
- 126
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Rust-GPU/rust-gpu
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
enhancement
Rust-GPU/rust-gpu#643 · 2 bình luận · 1 reaction · 1 người được giao ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
async functions cause ICE Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của Rust-GPU/rust-gpu
Issue tương tự
-
risk:low runtime status:in-progress type:test
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
EricSpencer00/Resilient#4835 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cesarferreira/stax#890 ·