Skip to content

Commit e70e1f0

Browse files
committed
clean up linkage file
1 parent 5abba1e commit e70e1f0

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed
Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
11
#![allow(dead_code)]
2-
//! Automatically generated by Renderling's `build.rs`.
3-
use crate :: linkage :: ShaderLinkage ; # [cfg (not (target_arch = "wasm32"))] mod target { pub const ENTRY_POINT : & str = "cull::compute_culling" ; pub fn descriptor () -> wgpu :: ShaderModuleDescriptor < 'static > { wgpu :: include_spirv ! ("../../shaders/cull-compute_culling.spv") } pub fn linkage (device : & wgpu :: Device) -> super :: ShaderLinkage { log :: debug ! ("creating native linkage for {}" , "compute_culling") ; super :: ShaderLinkage { entry_point : ENTRY_POINT , module : device . create_shader_module (descriptor ()) . into () } } } # [cfg (target_arch = "wasm32")] mod target { pub const ENTRY_POINT : & str = "cullcompute_culling" ; pub fn descriptor () -> wgpu :: ShaderModuleDescriptor < 'static > { wgpu :: include_wgsl ! ("../../shaders/cull-compute_culling.wgsl") } pub fn linkage (device : & wgpu :: Device) -> super :: ShaderLinkage { log :: debug ! ("creating web linkage for {}" , "compute_culling") ; super :: ShaderLinkage { entry_point : ENTRY_POINT , module : device . create_shader_module (descriptor ()) . into () } } } pub fn linkage (device : & wgpu :: Device) -> ShaderLinkage { target :: linkage (device) }
4-
2+
//! Automatically generated by Renderling's `build.rs`.
3+
use crate::linkage::ShaderLinkage;
4+
#[cfg(not(target_arch = "wasm32"))]
5+
mod target {
6+
pub const ENTRY_POINT: &str = "cull::compute_culling";
7+
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> {
8+
wgpu::include_spirv!("../../shaders/cull-compute_culling.spv")
9+
}
10+
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage {
11+
log::debug!("creating native linkage for {}", "compute_culling");
12+
super::ShaderLinkage {
13+
entry_point: ENTRY_POINT,
14+
module: device.create_shader_module(descriptor()).into(),
15+
}
16+
}
17+
}
18+
#[cfg(target_arch = "wasm32")]
19+
mod target {
20+
pub const ENTRY_POINT: &str = "cullcompute_culling";
21+
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> {
22+
wgpu::include_wgsl!("../../shaders/cull-compute_culling.wgsl")
23+
}
24+
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage {
25+
log::debug!("creating web linkage for {}", "compute_culling");
26+
super::ShaderLinkage {
27+
entry_point: ENTRY_POINT,
28+
module: device.create_shader_module(descriptor()).into(),
29+
}
30+
}
31+
}
32+
pub fn linkage(device: &wgpu::Device) -> ShaderLinkage {
33+
target::linkage(device)
34+
}

0 commit comments

Comments
 (0)