From b6dbe3960bd2c1a90d6fb4517f09991cc93b6668 Mon Sep 17 00:00:00 2001 From: Lain-dono Date: Mon, 11 Mar 2019 04:44:54 +0300 Subject: [PATCH 1/3] Fix vertex format mapping --- wgpu-native/src/conv.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wgpu-native/src/conv.rs b/wgpu-native/src/conv.rs index 7126e353e..25b80ab6b 100644 --- a/wgpu-native/src/conv.rs +++ b/wgpu-native/src/conv.rs @@ -373,11 +373,11 @@ pub fn map_vertex_format(vertex_format: pipeline::VertexFormat) -> hal::format:: Char2 => H::Rg8Int, Char3 => H::Rgb8Int, Char4 => H::Rgba8Int, - UcharNorm => H::R8Srgb, - Uchar2Norm => H::Rg8Srgb, - Uchar3Norm => H::Rgb8Srgb, - Uchar4Norm => H::Rgba8Srgb, - Uchar4NormBgra => H::Bgra8Srgb, + UcharNorm => H::R8Unorm, + Uchar2Norm => H::Rg8Unorm, + Uchar3Norm => H::Rgb8Unorm, + Uchar4Norm => H::Rgba8Unorm, + Uchar4NormBgra => H::Bgra8Unorm, CharNorm => H::R8Inorm, Char2Norm => H::Rg8Inorm, Char3Norm => H::Rgb8Inorm, From 6368a9fba4a36b189c9e6e759f778daf7dccacc4 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Mon, 18 Mar 2019 11:00:43 -0400 Subject: [PATCH 2/3] Helpful error message on empty backend --- wgpu-native/src/instance.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wgpu-native/src/instance.rs b/wgpu-native/src/instance.rs index 1c6336e1d..7bb135c14 100644 --- a/wgpu-native/src/instance.rs +++ b/wgpu-native/src/instance.rs @@ -149,7 +149,9 @@ pub fn instance_get_adapter(instance_id: InstanceId, desc: &AdapterDescriptor) - PowerPreference::LowPower => low.or(high), PowerPreference::HighPerformance | PowerPreference::Default => high.or(low), }; - some.or(other).unwrap() + some + .or(other) + .expect("No adapters found. Please enable the feature for one of the graphics backends: vulkan, metal, dx12, dx11") } #[cfg(feature = "local")] From c72931b0975db7b49d8eb404320ace6ecd943c9e Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 19 Mar 2019 00:04:20 -0400 Subject: [PATCH 3/3] Version bump to 0.2.1 --- Cargo.lock | 8 ++++---- wgpu-native/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 534e64dc9..fca96d108 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,7 +321,7 @@ version = "0.1.0" dependencies = [ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "wgpu 0.2.0", - "wgpu-native 0.2.0", + "wgpu-native 0.2.1", ] [[package]] @@ -1387,7 +1387,7 @@ name = "wgpu" version = "0.2.0" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wgpu-native 0.2.0", + "wgpu-native 0.2.1", ] [[package]] @@ -1399,7 +1399,7 @@ dependencies = [ [[package]] name = "wgpu-native" -version = "0.2.0" +version = "0.2.1" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1425,7 +1425,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "wgpu-native 0.2.0", + "wgpu-native 0.2.1", ] [[package]] diff --git a/wgpu-native/Cargo.toml b/wgpu-native/Cargo.toml index ab06f10f1..3fe7c90c7 100644 --- a/wgpu-native/Cargo.toml +++ b/wgpu-native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-native" -version = "0.2.0" +version = "0.2.1" authors = [ "Dzmitry Malyshau ", "Joshua Groves ",