Skip to content

Commit

Permalink
fix merge mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
TornaxO7 committed Oct 5, 2023
1 parent aeab7cf commit 75f709b
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions wgpu-hal/src/gles/egl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,9 @@ impl crate::Instance<super::Api> for Instance {
khronos_egl::DEFAULT_DISPLAY,
&display_attributes,
)
.unwrap();
(
display,
Some(Rc::new(library)),
WindowKind::Wayland,
)
}
.unwrap();
(display, Some(Rc::new(library)), WindowKind::Wayland)
} else if let (Some(display_owner), Some(egl)) = (x11_display_library, egl1_5) {
log::info!("Using X11 platform");
let display_attributes = [khronos_egl::ATTRIB_NONE];
Expand All @@ -811,12 +808,9 @@ impl crate::Instance<super::Api> for Instance {
display_owner.display.as_ptr(),
&display_attributes,
)
.unwrap();
(
display,
Some(Rc::new(display_owner)),
WindowKind::X11,
)
}
.unwrap();
(display, Some(Rc::new(display_owner)), WindowKind::X11)
} else if let (Some(display_owner), Some(egl)) = (angle_x11_display_library, egl1_5) {
log::info!("Using Angle platform with X11");
let display_attributes = [
Expand All @@ -832,12 +826,9 @@ impl crate::Instance<super::Api> for Instance {
display_owner.display.as_ptr(),
&display_attributes,
)
.unwrap();
(
display,
Some(Rc::new(display_owner)),
WindowKind::AngleX11,
)
}
.unwrap();
(display, Some(Rc::new(display_owner)), WindowKind::AngleX11)
} else if client_ext_str.contains("EGL_MESA_platform_surfaceless") {
log::info!("No windowing system present. Using surfaceless platform");
let egl = egl1_5.expect("Failed to get EGL 1.5 for surfaceless");
Expand All @@ -849,6 +840,7 @@ impl crate::Instance<super::Api> for Instance {
)
}
.unwrap();

(display, None, WindowKind::Unknown)
} else {
log::info!("EGL_MESA_platform_surfaceless not available. Using default platform");
Expand Down Expand Up @@ -1320,7 +1312,7 @@ impl crate::Surface<super::Api> for Surface {
};

if let Some(window) = wl_window {
let library = &self.wsi.display_owner.as_ref().unwrap().library ;
let library = &self.wsi.display_owner.as_ref().unwrap().library;
let wl_egl_window_resize: libloading::Symbol<WlEglWindowResizeFun> =
unsafe { library.get(b"wl_egl_window_resize") }.unwrap();
unsafe {
Expand Down

0 comments on commit 75f709b

Please sign in to comment.