Skip to content

Commit

Permalink
Remove webgl feature from wgpu-core as webgl is the only wasm32 bac…
Browse files Browse the repository at this point in the history
…kend
  • Loading branch information
haraldreingruber-dedalus committed Jun 6, 2022
1 parent 158c416 commit 95ca719
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ replay = ["serde", "wgt/replay", "arrayvec/serde", "naga/deserialize"]
serial-pass = ["serde", "wgt/serde", "arrayvec/serde"]
id32 = []
vulkan-portability = ["hal/vulkan"]
webgl = ["web-sys"]

[dependencies]
arrayvec = "0.7"
Expand Down Expand Up @@ -59,7 +58,7 @@ version = "0.12"

[target.'cfg(target_arch = "wasm32")'.dependencies]
hal = { path = "../wgpu-hal", package = "wgpu-hal", version = "0.12", features = ["gles"] }
web-sys = { version = "0.3", features = ["HtmlCanvasElement"], optional = true }
web-sys = { version = "0.3", features = ["HtmlCanvasElement"] }

[target.'cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))'.dependencies]
hal = { path = "../wgpu-hal", package = "wgpu-hal", version = "0.12", features = ["metal"] }
Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
id.0
}

#[cfg(all(target_arch = "wasm32", feature = "webgl", not(target_os = "emscripten")))]
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
pub fn create_surface_webgl_canvas(
&self,
canvas: &web_sys::HtmlCanvasElement,
Expand All @@ -516,7 +516,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
id.0
}

#[cfg(all(target_arch = "wasm32", feature = "webgl", not(target_os = "emscripten")))]
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
pub fn create_surface_webgl_offscreen_canvas(
&self,
canvas: &web_sys::OffscreenCanvas,
Expand Down
2 changes: 1 addition & 1 deletion wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ glsl = ["naga/glsl-in"]
trace = ["serde", "wgc/trace"]
replay = ["serde", "wgc/replay"]
angle = ["wgc/angle"]
webgl = ["wgc", "wgc/webgl"]
webgl = ["wgc"]
emscripten = ["webgl"]
vulkan-portability = ["wgc/vulkan-portability"]

Expand Down

0 comments on commit 95ca719

Please sign in to comment.