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 f4f4370
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
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 f4f4370

Please sign in to comment.