[wgpu] fix as_hal methods (#6179)

This commit is contained in:
Teodor Tanasoaia 2024-08-28 12:55:07 +02:00 committed by GitHub
parent 71b41c6638
commit aadca17885
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 10 additions and 10 deletions

View File

@ -118,7 +118,7 @@ impl Adapter {
// Therefore, unwrap is fine here since only WgpuCoreContext based adapters have the ability to create hal devices.
.unwrap()
.create_device_from_hal(
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
hal_device,
desc,
trace_path,
@ -169,7 +169,7 @@ impl Adapter {
{
unsafe {
ctx.adapter_as_hal::<A, F, R>(
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
hal_adapter_callback,
)
}

View File

@ -217,7 +217,7 @@ impl Buffer {
{
unsafe {
ctx.buffer_as_hal::<A, F, R>(
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
hal_buffer_callback,
)
}

View File

@ -310,7 +310,7 @@ impl CommandEncoder {
.downcast_ref::<crate::backend::ContextWgpuCore>()
.map(|ctx| unsafe {
ctx.command_encoder_as_hal_mut::<A, F, R>(
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
hal_command_encoder_callback,
)
})

View File

@ -284,7 +284,7 @@ impl Device {
.unwrap()
.create_texture_from_hal::<A>(
hal_texture,
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
desc,
)
};
@ -328,7 +328,7 @@ impl Device {
.unwrap()
.create_buffer_from_hal::<A>(
hal_buffer,
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
desc,
)
};
@ -441,7 +441,7 @@ impl Device {
.downcast_ref::<crate::backend::ContextWgpuCore>()
.map(|ctx| unsafe {
ctx.device_as_hal::<A, F, R>(
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
hal_device_callback,
)
})

View File

@ -168,7 +168,7 @@ impl Surface<'_> {
.downcast_ref::<crate::backend::ContextWgpuCore>()
.map(|ctx| unsafe {
ctx.surface_as_hal::<A, F, R>(
crate::context::downcast_ref(&self.surface_data),
crate::context::downcast_ref(self.surface_data.as_ref()),
hal_surface_callback,
)
})

View File

@ -39,7 +39,7 @@ impl Texture {
{
unsafe {
ctx.texture_as_hal::<A, F, R>(
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
hal_texture_callback,
)
}

View File

@ -37,7 +37,7 @@ impl TextureView {
{
unsafe {
ctx.texture_view_as_hal::<A, F, R>(
crate::context::downcast_ref(&self.data),
crate::context::downcast_ref(self.data.as_ref()),
hal_texture_view_callback,
)
}