Skip to content

Commit e2e810f

Browse files
Firestar99LegNeato
authored andcommitted
wgpu 27: fixup example-runner-wgpu for android
1 parent e8cb6a2 commit e2e810f

File tree

1 file changed

+5
-9
lines changed
  • examples/runners/wgpu/src

1 file changed

+5
-9
lines changed

examples/runners/wgpu/src/lib.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,14 @@ fn maybe_watch(
210210
{
211211
let module = match options.shader {
212212
RustGPUShader::Simplest => {
213-
wgpu::include_spirv_raw!(env!("simplest_shader.spv"))
213+
wgpu::include_spirv!(env!("simplest_shader.spv"))
214214
}
215-
RustGPUShader::Sky => wgpu::include_spirv_raw!(env!("sky_shader.spv")),
216-
RustGPUShader::Compute => wgpu::include_spirv_raw!(env!("compute_shader.spv")),
217-
RustGPUShader::Mouse => wgpu::include_spirv_raw!(env!("mouse_shader.spv")),
218-
};
219-
let spirv = match module {
220-
wgpu::ShaderModuleDescriptorPassthrough::SpirV(spirv) => spirv,
221-
_ => panic!("not spirv"),
215+
RustGPUShader::Sky => wgpu::include_spirv!(env!("sky_shader.spv")),
216+
RustGPUShader::Compute => wgpu::include_spirv!(env!("compute_shader.spv")),
217+
RustGPUShader::Mouse => wgpu::include_spirv!(env!("mouse_shader.spv")),
222218
};
223219
CompiledShaderModules {
224-
named_spv_modules: vec![(None, spirv)],
220+
named_spv_modules: vec![(None, module)],
225221
}
226222
}
227223
}

0 commit comments

Comments
 (0)