- 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) }
0 commit comments