Update wgpu with the BGL fix

This commit is contained in:
Dzmitry Malyshau
2020-05-05 00:04:24 -04:00
parent f79ee512eb
commit f3ff8d33ae
4 changed files with 10 additions and 8 deletions

View File

@@ -28,14 +28,14 @@ vulkan = ["wgc/gfx-backend-vulkan"]
package = "wgpu-core"
version = "0.5"
git = "https://github.com/gfx-rs/wgpu"
rev = "f64b2dd3bb9e11c1dfc0eb3be44fbaae81b18c7b"
rev = "bee826e79dcbe11b544296179a6bbb2c05d9639b"
features = ["raw-window-handle"]
[dependencies.wgt]
package = "wgpu-types"
version = "0.5"
git = "https://github.com/gfx-rs/wgpu"
rev = "f64b2dd3bb9e11c1dfc0eb3be44fbaae81b18c7b"
rev = "bee826e79dcbe11b544296179a6bbb2c05d9639b"
[dependencies]
arrayvec = "0.5"
@@ -57,9 +57,11 @@ name="hello-compute"
path="examples/hello-compute/main.rs"
test = true
[patch.crates-io]
[patch."https://github.com/gfx-rs/wgpu"]
#wgpu-types = { version = "0.5.0", path = "../wgpu/wgpu-types" }
#wgpu-core = { version = "0.5.0", path = "../wgpu/wgpu-core" }
[patch.crates-io]
#gfx-hal = { version = "0.5.0", path = "../gfx/src/hal" }
#gfx-backend-empty = { version = "0.5.0", path = "../gfx/src/backend/empty" }
#gfx-backend-vulkan = { version = "0.5.0", path = "../gfx/src/backend/vulkan" }

View File

@@ -224,7 +224,7 @@ impl crate::Context for Context {
fn instance_create_surface(
&self,
handle: raw_window_handle::RawWindowHandle,
handle: &impl raw_window_handle::HasRawWindowHandle,
) -> Self::SurfaceId {
self.instance_create_surface(handle, PhantomData)
}

View File

@@ -605,9 +605,9 @@ impl crate::Context for Context {
fn instance_create_surface(
&self,
handle: raw_window_handle::RawWindowHandle,
handle: &impl raw_window_handle::HasRawWindowHandle,
) -> Self::SurfaceId {
let canvas_attribute = match handle {
let canvas_attribute = match handle.raw_window_handle() {
raw_window_handle::RawWindowHandle::Web(web_handle) => web_handle.id,
_ => panic!("expected valid handle for canvas"),
};

View File

@@ -119,7 +119,7 @@ trait Context: Sized {
fn init() -> Self;
fn instance_create_surface(
&self,
handle: raw_window_handle::RawWindowHandle,
handle: &impl raw_window_handle::HasRawWindowHandle,
) -> Self::SurfaceId;
fn instance_request_adapter(
&self,
@@ -899,7 +899,7 @@ impl Instance {
window: &W,
) -> Surface {
Surface {
id: Context::instance_create_surface(&*self.context, window.raw_window_handle()),
id: Context::instance_create_surface(&*self.context, window),
}
}