Skip to content

Commit

Permalink
Let wgpu decide whether to support renderdoc, not wgpu-core.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblandy committed Dec 2, 2022
1 parent 3711c49 commit 259317d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 4 additions & 6 deletions wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ gles = ["hal/gles"]
dx11 = ["hal/dx11"]
dx12 = ["hal/dx12"]

# Support the Renderdoc graphics debugger:
# https://renderdoc.org/
renderdoc = ["hal/renderdoc"]

# Apply run-time checks, even in release builds. These are in addition
# to the validation carried out at public APIs in all builds.
strict_asserts = []
Expand Down Expand Up @@ -68,11 +72,5 @@ workspace = true
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
web-sys = { workspace = true, features = ["HtmlCanvasElement", "OffscreenCanvas"] }

[target.'cfg(all(not(target_arch = "wasm32"), unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }

[target.'cfg(all(not(target_arch = "wasm32"), windows))'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }

[target.'cfg(target_os = "emscripten")'.dependencies]
hal = { workspace = true, features = ["emscripten"] }
10 changes: 8 additions & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,14 @@ features = ["vulkan"]
workspace = true

# We need wgpu-hal unless we're targeting the web APIs.
[target.'cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))'.dependencies.hal]
workspace = true
[target.'cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))'.dependencies]
hal = { workspace = true }

[target.'cfg(all(not(target_arch = "wasm32"), unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }

[target.'cfg(windows)'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }

[target.'cfg(target_arch = "wasm32")'.dependencies.hal]
workspace = true
Expand Down

0 comments on commit 259317d

Please sign in to comment.