Skip to content

Commit

Permalink
just make it compile
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev committed Jan 3, 2025
1 parent f52082a commit ce9fc9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions wgpu/src/api/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,19 @@ impl Instance {
/// Creates Instance from custom context implementation
pub fn from_custom_instance<T: InstanceInterface>(instance: T) -> Self {
Self {
inner: dispatch::DispatchInstance::Custom(backend::custom::DynContext::new(instance)),
inner: Arc::new(dispatch::DispatchInstance::Custom(
backend::custom::DynContext::new(instance),
)),
}
}

//#[cfg(custom)]
/// Converts current instance into instance using DynContext
pub fn into_dyn_instance(self) -> Self {
Self {
inner: dispatch::DispatchInstance::Custom(self.inner.into_dyn()),
inner: Arc::new(dispatch::DispatchInstance::Custom(
Arc::into_inner(self.inner).unwrap().into_dyn(),
)),
}
}

Expand Down
4 changes: 2 additions & 2 deletions wgpu/src/backend/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ impl DeviceInterface for DynDevice {
fn create_shader_module(
&self,
desc: crate::ShaderModuleDescriptor<'_>,
shader_bound_checks: wgt::ShaderBoundChecks,
shader_runtime_checks: wgt::ShaderRuntimeChecks,
) -> dispatch::DispatchShaderModule {
self.0.create_shader_module(desc, shader_bound_checks)
self.0.create_shader_module(desc, shader_runtime_checks)
}

unsafe fn create_shader_module_spirv(
Expand Down

0 comments on commit ce9fc9f

Please sign in to comment.