We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4493eda commit 94e8321Copy full SHA for 94e8321
crates/cargo-gpu/src/build.rs
@@ -110,10 +110,12 @@ impl Build {
110
path.display(),
111
self.install.spirv_install.shader_crate.display()
112
);
113
- let path_relative_to_shader_crate = path
114
- .relative_to(&self.install.spirv_install.shader_crate)?
115
- .to_path("");
116
- Ok(Linkage::new(entry, path_relative_to_shader_crate))
+ let spv_path = path
+ .relative_to(&self.install.spirv_install.shader_crate)
+ .map_or(path, |path_relative_to_shader_crate| {
+ path_relative_to_shader_crate.to_path("")
117
+ });
118
+ Ok(Linkage::new(entry, spv_path))
119
},
120
)
121
.collect::<anyhow::Result<Vec<Linkage>>>()?;
0 commit comments