Skip to content

Commit

Permalink
[wgpu] remove trace feature temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Jul 17, 2024
1 parent 91924fb commit cca8aa9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ By @teoxoy in [#5901](https://github.com/gfx-rs/wgpu/pull/5901)
- Avoid introducing spurious features for optional dependencies. By @bjorn3 in [#5691](https://github.com/gfx-rs/wgpu/pull/5691)
- `wgpu::Error` is now `Sync`, making it possible to be wrapped in `anyhow::Error` or `eyre::Report`. By @nolanderc in [#5820](https://github.com/gfx-rs/wgpu/pull/5820)
- Added benchmark suite. By @cwfitzgerald in [#5694](https://github.com/gfx-rs/wgpu/pull/5694), compute passes by @wumpf in [#5767](https://github.com/gfx-rs/wgpu/pull/5767)
- The `trace` wgpu feature has been temporarily removed. By @teoxoy in [#5974](https://github.com/gfx-rs/wgpu/pull/5974)

#### Metal
- Removed the `link` Cargo feature.
Expand Down
5 changes: 3 additions & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ strict_asserts = ["wgc?/strict_asserts", "wgt/strict_asserts"]
## Enables serialization via `serde` on common wgpu types.
serde = ["dep:serde", "wgc/serde"]

## Allow writing of trace capture files. See [`Adapter::request_device`].
trace = ["serde", "wgc/trace"]
# Uncomment once we get to https://github.com/gfx-rs/wgpu/issues/5974
# ## Allow writing of trace capture files. See [`Adapter::request_device`].
# trace = ["serde", "wgc/trace"]

## Allow deserializing of trace capture files that were written with the `trace` feature.
## To replay a trace file use the [wgpu player](https://github.com/gfx-rs/wgpu/tree/trunk/player).
Expand Down
10 changes: 8 additions & 2 deletions wgpu/src/backend/wgpu_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,15 @@ impl ContextWgpuCore {
desc: &crate::DeviceDescriptor<'_>,
trace_dir: Option<&std::path::Path>,
) -> Result<(Device, Queue), crate::RequestDeviceError> {
if trace_dir.is_some() {
log::error!("Feature 'trace' has been removed temporarily, see https://github.com/gfx-rs/wgpu/issues/5974");
}
let (device_id, queue_id, error) = unsafe {
self.0.create_device_from_hal(
*adapter,
hal_device,
&desc.map_label(|l| l.map(Borrowed)),
trace_dir,
None,
None,
None,
)
Expand Down Expand Up @@ -640,10 +643,13 @@ impl crate::Context for ContextWgpuCore {
desc: &crate::DeviceDescriptor<'_>,
trace_dir: Option<&std::path::Path>,
) -> Self::RequestDeviceFuture {
if trace_dir.is_some() {
log::error!("Feature 'trace' has been removed temporarily, see https://github.com/gfx-rs/wgpu/issues/5974");
}
let (device_id, queue_id, error) = wgc::gfx_select!(*adapter => self.0.adapter_request_device(
*adapter,
&desc.map_label(|l| l.map(Borrowed)),
trace_dir,
None,
None,
None
));
Expand Down

0 comments on commit cca8aa9

Please sign in to comment.