Skip to content

Commit 2b15a47

Browse files
committed
fix wgpu example building for android
1 parent 281fdb3 commit 2b15a47

File tree

1 file changed

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

1 file changed

+5
-1
lines changed

examples/runners/wgpu/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,12 @@ fn maybe_watch(
216216
RustGPUShader::Compute => wgpu::include_spirv_raw!(env!("compute_shader.spv")),
217217
RustGPUShader::Mouse => wgpu::include_spirv_raw!(env!("mouse_shader.spv")),
218218
};
219+
let spirv = match module {
220+
wgpu::ShaderModuleDescriptorPassthrough::SpirV(spirv) => spirv,
221+
_ => panic!("not spirv"),
222+
};
219223
CompiledShaderModules {
220-
named_spv_modules: vec![(None, module)],
224+
named_spv_modules: vec![(None, spirv)],
221225
}
222226
}
223227
}

0 commit comments

Comments
 (0)