(
&'a self,
wanted_entry: &str,
)
| 94 | |
| 95 | impl CompiledShaderModules { |
| 96 | fn spv_module_for_entry_point<'a>( |
| 97 | &'a self, |
| 98 | wanted_entry: &str, |
| 99 | ) -> wgpu::ShaderModuleDescriptorSpirV<'a> { |
| 100 | for (name, spv_module) in &self.named_spv_modules { |
| 101 | match name { |
| 102 | Some(name) if name != wanted_entry => continue, |
| 103 | _ => { |
| 104 | return wgpu::ShaderModuleDescriptorSpirV { |
| 105 | label: name.as_deref(), |
| 106 | source: Cow::Borrowed(&spv_module.source), |
| 107 | }; |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | unreachable!( |
| 112 | "{wanted_entry:?} not found in modules {:?}", |
| 113 | self.named_spv_modules |
| 114 | .iter() |
| 115 | .map(|(name, _)| name) |
| 116 | .collect::<Vec<_>>() |
| 117 | ); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | fn maybe_watch( |
no outgoing calls
no test coverage detected