mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
chore: Fix more unused_qualifications
(#5746)
This commit is contained in:
parent
7368e5107c
commit
b4abd65659
@ -1226,17 +1226,15 @@ impl crate::Surface for Surface {
|
|||||||
let native_window_ptr = match (self.wsi.kind, self.raw_window_handle) {
|
let native_window_ptr = match (self.wsi.kind, self.raw_window_handle) {
|
||||||
(WindowKind::Unknown | WindowKind::X11, Rwh::Xlib(handle)) => {
|
(WindowKind::Unknown | WindowKind::X11, Rwh::Xlib(handle)) => {
|
||||||
temp_xlib_handle = handle.window;
|
temp_xlib_handle = handle.window;
|
||||||
&mut temp_xlib_handle as *mut _ as *mut std::ffi::c_void
|
&mut temp_xlib_handle as *mut _ as *mut ffi::c_void
|
||||||
}
|
|
||||||
(WindowKind::AngleX11, Rwh::Xlib(handle)) => {
|
|
||||||
handle.window as *mut std::ffi::c_void
|
|
||||||
}
|
}
|
||||||
|
(WindowKind::AngleX11, Rwh::Xlib(handle)) => handle.window as *mut ffi::c_void,
|
||||||
(WindowKind::Unknown | WindowKind::X11, Rwh::Xcb(handle)) => {
|
(WindowKind::Unknown | WindowKind::X11, Rwh::Xcb(handle)) => {
|
||||||
temp_xcb_handle = handle.window;
|
temp_xcb_handle = handle.window;
|
||||||
&mut temp_xcb_handle as *mut _ as *mut std::ffi::c_void
|
&mut temp_xcb_handle as *mut _ as *mut ffi::c_void
|
||||||
}
|
}
|
||||||
(WindowKind::AngleX11, Rwh::Xcb(handle)) => {
|
(WindowKind::AngleX11, Rwh::Xcb(handle)) => {
|
||||||
handle.window.get() as *mut std::ffi::c_void
|
handle.window.get() as *mut ffi::c_void
|
||||||
}
|
}
|
||||||
(WindowKind::Unknown, Rwh::AndroidNdk(handle)) => {
|
(WindowKind::Unknown, Rwh::AndroidNdk(handle)) => {
|
||||||
handle.a_native_window.as_ptr()
|
handle.a_native_window.as_ptr()
|
||||||
@ -1252,9 +1250,9 @@ impl crate::Surface for Surface {
|
|||||||
window
|
window
|
||||||
}
|
}
|
||||||
#[cfg(Emscripten)]
|
#[cfg(Emscripten)]
|
||||||
(WindowKind::Unknown, Rwh::Web(handle)) => handle.id as *mut std::ffi::c_void,
|
(WindowKind::Unknown, Rwh::Web(handle)) => handle.id as *mut ffi::c_void,
|
||||||
(WindowKind::Unknown, Rwh::Win32(handle)) => {
|
(WindowKind::Unknown, Rwh::Win32(handle)) => {
|
||||||
handle.hwnd.get() as *mut std::ffi::c_void
|
handle.hwnd.get() as *mut ffi::c_void
|
||||||
}
|
}
|
||||||
(WindowKind::Unknown, Rwh::AppKit(handle)) => {
|
(WindowKind::Unknown, Rwh::AppKit(handle)) => {
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
@ -82,11 +82,9 @@ impl crate::Adapter for super::Adapter {
|
|||||||
// https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier1?language=objc
|
// https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier1?language=objc
|
||||||
// https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier2?language=objc
|
// https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier2?language=objc
|
||||||
let (read_write_tier1_if, read_write_tier2_if) = match pc.read_write_texture_tier {
|
let (read_write_tier1_if, read_write_tier2_if) = match pc.read_write_texture_tier {
|
||||||
metal::MTLReadWriteTextureTier::TierNone => (Tfc::empty(), Tfc::empty()),
|
MTLReadWriteTextureTier::TierNone => (Tfc::empty(), Tfc::empty()),
|
||||||
metal::MTLReadWriteTextureTier::Tier1 => (Tfc::STORAGE_READ_WRITE, Tfc::empty()),
|
MTLReadWriteTextureTier::Tier1 => (Tfc::STORAGE_READ_WRITE, Tfc::empty()),
|
||||||
metal::MTLReadWriteTextureTier::Tier2 => {
|
MTLReadWriteTextureTier::Tier2 => (Tfc::STORAGE_READ_WRITE, Tfc::STORAGE_READ_WRITE),
|
||||||
(Tfc::STORAGE_READ_WRITE, Tfc::STORAGE_READ_WRITE)
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
let msaa_count = pc.sample_count_mask;
|
let msaa_count = pc.sample_count_mask;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user