mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
Merge #465
465: Fix Vulkan portability support on macOS r=cwfitzgerald a=kvark Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
commit
4e49a60804
3 files changed
+8
-5
No files matched your search
+6
-3
@@ -1036,6 +1036,11 @@ impl Instance {
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a surface from `CoreAnimationLayer`.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// - layer must be a valid object to create a surface upon.
|
||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||
pub unsafe fn create_surface_from_core_animation_layer(
|
||||
&self,
|
||||
@@ -1043,9 +1048,7 @@ impl Instance {
|
||||
) -> Surface {
|
||||
let surface = wgc::instance::Surface {
|
||||
#[cfg(feature = "vulkan-portability")]
|
||||
vulkan: self.context.instance.vulkan.as_ref().map(|inst| {
|
||||
inst.create_surface_from_layer(layer as *mut _, cfg!(debug_assertions))
|
||||
}),
|
||||
vulkan: None, //TODO: create_surface_from_layer ?
|
||||
metal: self.context.instance.metal.as_ref().map(|inst| {
|
||||
inst.create_surface_from_layer(layer as *mut _, cfg!(debug_assertions))
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user