0

所以我有一个抛出错误的 proc 宏。

特别是shader!vulkano_shaders抛出:

error: proc macro panicked
  --> src\main.rs:6:5
   |
6  | /     vulkano_shaders::shader!{
7  | |         ty: "compute",
8  | |         src: "
9  | |         #version 450
...  |
16 | |         }"
17 | |     }
   | |_____^
   |
   = help: message: called `Result::unwrap()` on an `Err` value: ParseError(UnknownConstant("Capability", 61))

我怎么能调试这个?

最小的可重现示例:

main.rs

fn main() {
    println!("Hello, world!");
}

mod test_shader {
    vulkano_shaders::shader!{
        ty: "compute",
        src: "
        #version 450

        #extension GL_KHR_shader_subgroup_basic: enable

        void main() {
            uint tester0 = gl_SubgroupSize;
            uint tester1 = gl_SubgroupID;
        }"
    }
}

依赖项:

vulkano = "0.19.0"
vulkano-shaders = "0.19.0"

项目邮编:https ://drive.google.com/file/d/1fwXNZOTQOlunVAbYWK3rJRmQnDcWvySU/view?usp=sharing

4

0 回答 0