Skip to content

Commit

Permalink
[rs] Merge gfx-rs#122
Browse files Browse the repository at this point in the history
122: Wholesome update for the git master of wgpu-native r=grovesNL a=kvark

Depends on gfx-rs#382

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
  • Loading branch information
bors[bot] and kvark authored Nov 20, 2019
2 parents 6b19641 + 46cead4 commit fcc162a
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 142 deletions.
11 changes: 9 additions & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@ license = "MPL-2.0"
[features]
default = []
# Make Vulkan backend available on platforms where it is by default not, e.g. macOS
vulkan = ["wgn/gfx-backend-vulkan"]
vulkan = ["wgn/vulkan-portability"]

[dependencies.wgn]
package = "wgpu-native"
version = "0.4"
features = ["local"]
git = "https://github.com/gfx-rs/wgpu"
rev = "73b33ea76e2f91b3114aa7640b1d60518d39f915"

[dependencies.core]
package = "wgpu-core"
version = "0.1"
git = "https://github.com/gfx-rs/wgpu"
rev = "73b33ea76e2f91b3114aa7640b1d60518d39f915"

[dependencies]
arrayvec = "0.5"
Expand Down
10 changes: 6 additions & 4 deletions wgpu/examples/capture/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ use std::mem::size_of;
fn main() {
env_logger::init();

let adapter = wgpu::Adapter::request(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
backends: wgpu::BackendBit::PRIMARY,
}).unwrap();
let adapter = wgpu::Adapter::request(
&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
},
wgpu::BackendBit::PRIMARY,
).unwrap();

let (device, mut queue) = adapter.request_device(&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions {
Expand Down
10 changes: 6 additions & 4 deletions wgpu/examples/describe/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
fn main() {
env_logger::init();

let adapter = wgpu::Adapter::request(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
backends: wgpu::BackendBit::PRIMARY,
}).unwrap();
let adapter = wgpu::Adapter::request(
&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
},
wgpu::BackendBit::PRIMARY,
).unwrap();

println!("{:?}", adapter.get_info())
}
11 changes: 6 additions & 5 deletions wgpu/examples/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ pub fn run<E: Example>(title: &str) {
(window, instance, hidpi_factor, size, surface)
};

let adapter = wgpu::Adapter::request(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
backends: wgpu::BackendBit::PRIMARY,
})
.unwrap();
let adapter = wgpu::Adapter::request(
&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
},
wgpu::BackendBit::PRIMARY,
).unwrap();

let (device, mut queue) = adapter.request_device(&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions {
Expand Down
10 changes: 6 additions & 4 deletions wgpu/examples/hello-compute/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ fn main() {

let size = (numbers.len() * std::mem::size_of::<u32>()) as wgpu::BufferAddress;

let adapter = wgpu::Adapter::request(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
backends: wgpu::BackendBit::PRIMARY,
}).unwrap();
let adapter = wgpu::Adapter::request(
&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
},
wgpu::BackendBit::PRIMARY,
).unwrap();

let (device, mut queue) = adapter.request_device(&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions {
Expand Down
10 changes: 6 additions & 4 deletions wgpu/examples/hello-triangle/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ fn main() {
(window, instance, size, surface)
};

let adapter = wgpu::Adapter::request(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
backends: wgpu::BackendBit::PRIMARY,
}).unwrap();
let adapter = wgpu::Adapter::request(
&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
},
wgpu::BackendBit::PRIMARY,
).unwrap();

let (device, mut queue) = adapter.request_device(&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions {
Expand Down
Loading

0 comments on commit fcc162a

Please sign in to comment.