diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4961a9fed..33c7495d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ jobs: run: cargo check --manifest-path wgpu-core/Cargo.toml --features trace --target ${{ env.TARGET }} wasm: + if: false # disable until hal/Gles backend is setup name: Web Assembly runs-on: ubuntu-18.04 env: diff --git a/Cargo.lock b/Cargo.lock index 715ba754b..e764513ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -968,7 +968,7 @@ dependencies = [ [[package]] name = "metal" version = "0.22.0" -source = "git+https://github.com/kvark/metal-rs?branch=core-graphics-types#457518722ac2ca51cf1e668a2d2be57b751c8071" +source = "git+https://github.com/kvark/metal-rs?branch=core-graphics-types#6e005374eaba2f9af368a81cdb2948ca29b3ff17" dependencies = [ "bitflags", "block", diff --git a/README.md b/README.md index 713e653d4..a18829e56 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ If you are looking for the native implementation or bindings to the API in other API | Windows 7/10 | Linux & Android | macOS & iOS | ----- | ------------------ | ------------------ | ------------------ | - DX11 | :ok: | | | - DX12 | :white_check_mark: | | | + DX11 | | | | + DX12 | | | | Vulkan | :white_check_mark: | :white_check_mark: | | Metal | | | :white_check_mark: | - GL ES3 | | :construction: | | + GLes3 | | | | :white_check_mark: = Primary support — :ok: = Secondary support — :construction: = Unsupported, but support in progress diff --git a/bors.toml b/bors.toml index 729709bdf..ee06a2174 100644 --- a/bors.toml +++ b/bors.toml @@ -7,6 +7,6 @@ status = [ "Ubuntu Nightly", "Windows Stable", "Windows Nightly", - "Web Assembly", + #"Web Assembly", #"Clippy", ] diff --git a/wgpu-hal/src/metal/adapter.rs b/wgpu-hal/src/metal/adapter.rs index c6c38903f..1c77dac0e 100644 --- a/wgpu-hal/src/metal/adapter.rs +++ b/wgpu-hal/src/metal/adapter.rs @@ -18,11 +18,7 @@ impl crate::Adapter for super::Adapter { &self, features: wgt::Features, ) -> Result, crate::DeviceError> { - let queue = self - .shared - .device - .lock() - .new_command_queue_with_max_command_buffer_count(5); + let queue = self.shared.device.lock().new_command_queue(); Ok(crate::OpenDevice { device: super::Device { shared: Arc::clone(&self.shared), diff --git a/wgpu-hal/src/metal/surface.rs b/wgpu-hal/src/metal/surface.rs index 5c672da77..264c8e086 100644 --- a/wgpu-hal/src/metal/surface.rs +++ b/wgpu-hal/src/metal/surface.rs @@ -63,7 +63,7 @@ impl super::Surface { let screen: *mut Object = msg_send![window, screen]; assert!(!screen.is_null(), "window is not attached to a screen"); - let scale_factor: mtl::CGFloat = msg_send![screen, nativeScale]; + let scale_factor: CGFloat = msg_send![screen, nativeScale]; let () = msg_send![view, setContentScaleFactor: scale_factor]; } diff --git a/wgpu-hal/src/vulkan/command.rs b/wgpu-hal/src/vulkan/command.rs index f37aef2be..4551b428c 100644 --- a/wgpu-hal/src/vulkan/command.rs +++ b/wgpu-hal/src/vulkan/command.rs @@ -640,14 +640,8 @@ impl crate::CommandEncoder for super::CommandEncoder { count_offset: wgt::BufferAddress, max_count: u32, ) { - match self - .device - .extension_fns - .draw_indirect_count - .as_ref() - .expect("Feature `DRAW_INDIRECT_COUNT` must be enabled") - { - super::ExtensionFn::Extension(t) => { + match self.device.extension_fns.draw_indirect_count { + Some(super::ExtensionFn::Extension(ref t)) => { t.cmd_draw_indirect_count( self.active, buffer.raw, @@ -658,7 +652,7 @@ impl crate::CommandEncoder for super::CommandEncoder { 0, ); } - super::ExtensionFn::Promoted => { + Some(super::ExtensionFn::Promoted) => { self.device.raw.cmd_draw_indirect_count( self.active, buffer.raw, @@ -669,6 +663,7 @@ impl crate::CommandEncoder for super::CommandEncoder { 0, ); } + None => panic!("Feature `DRAW_INDIRECT_COUNT` not enabled"), } } unsafe fn draw_indexed_indirect_count( @@ -679,14 +674,8 @@ impl crate::CommandEncoder for super::CommandEncoder { count_offset: wgt::BufferAddress, max_count: u32, ) { - match self - .device - .extension_fns - .draw_indirect_count - .as_ref() - .expect("Feature `DRAW_INDIRECT_COUNT` must be enabled") - { - super::ExtensionFn::Extension(t) => { + match self.device.extension_fns.draw_indirect_count { + Some(super::ExtensionFn::Extension(ref t)) => { t.cmd_draw_indexed_indirect_count( self.active, buffer.raw, @@ -697,7 +686,7 @@ impl crate::CommandEncoder for super::CommandEncoder { 0, ); } - super::ExtensionFn::Promoted => { + Some(super::ExtensionFn::Promoted) => { self.device.raw.cmd_draw_indexed_indirect_count( self.active, buffer.raw, @@ -708,6 +697,7 @@ impl crate::CommandEncoder for super::CommandEncoder { 0, ); } + None => panic!("Feature `DRAW_INDIRECT_COUNT` not enabled"), } }