Skip to content

Commit

Permalink
build and clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Jun 10, 2021
1 parent 3172377 commit e1d2c81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion wgpu-core/src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ impl<A: HalApi> CommandBuffer<A> {
#[cfg(feature = "trace")] enable_tracing: bool,
#[cfg(debug_assertions)] label: &Label,
) -> Self {
use crate::LabelHelpers as _;
CommandBuffer {
raw: vec![raw],
status: CommandEncoderStatus::Recording,
Expand Down
5 changes: 3 additions & 2 deletions wgpu-core/src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3448,6 +3448,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
device.features,
#[cfg(feature = "trace")]
device.trace.is_some(),
#[cfg(debug_assertions)]
&desc.label,
);

Expand Down Expand Up @@ -4412,14 +4413,14 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
#[cfg(feature = "trace")]
if let Some(ref trace) = device.trace {
let mut trace = trace.lock();
let size = sub_range.size_to(buffer.size);
let size = range.end - range.start;
let data = trace.make_binary("bin", unsafe {
std::slice::from_raw_parts(ptr.as_ptr(), size as usize)
});
trace.add(trace::Action::WriteBuffer {
id: buffer_id,
data,
range: sub_range.offset..sub_range.offset + size,
range: range.clone(),
queued: false,
});
}
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/device/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub(crate) fn new_render_bundle_encoder_descriptor<'a>(
label,
color_formats: Cow::Borrowed(&context.attachments.colors),
depth_stencil_format: context.attachments.depth_stencil,
sample_count: context.sample_count as u32,
sample_count: context.sample_count,
}
}

Expand Down

0 comments on commit e1d2c81

Please sign in to comment.