mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 08:53:20 +00:00
[wgpu] fix as_hal
methods (#6179)
This commit is contained in:
parent
71b41c6638
commit
aadca17885
@ -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,
|
||||
)
|
||||
}
|
||||
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
@ -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,
|
||||
)
|
||||
})
|
||||
|
@ -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,
|
||||
)
|
||||
})
|
||||
|
@ -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,
|
||||
)
|
||||
})
|
||||
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user