Minor tweaks to make CI happy

This commit is contained in:
Dzmitry Malyshau 2021-06-16 20:28:45 -04:00
parent fb662dfbec
commit 54d7391df0
7 changed files with 16 additions and 29 deletions

View File

@ -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:

2
Cargo.lock generated
View File

@ -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",

View File

@ -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

View File

@ -7,6 +7,6 @@ status = [
"Ubuntu Nightly",
"Windows Stable",
"Windows Nightly",
"Web Assembly",
#"Web Assembly",
#"Clippy",
]

View File

@ -18,11 +18,7 @@ impl crate::Adapter<super::Api> for super::Adapter {
&self,
features: wgt::Features,
) -> Result<crate::OpenDevice<super::Api>, 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),

View File

@ -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];
}

View File

@ -640,14 +640,8 @@ impl crate::CommandEncoder<super::Api> 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<super::Api> 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<super::Api> 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<super::Api> 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<super::Api> 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<super::Api> for super::CommandEncoder {
0,
);
}
None => panic!("Feature `DRAW_INDIRECT_COUNT` not enabled"),
}
}