Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade some of wgpu_core's logging level from info to trace and debug #4771

Merged
merged 5 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wgpu-core/src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl<A: HalApi> CommandBuffer<A> {
}

pub(crate) fn extract_baked_commands(&mut self) -> BakedCommands<A> {
log::info!(
log::trace!(
"Extracting BakedCommands from CommandBuffer {:?}",
self.info.label()
);
Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/device/life.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ impl<A: HalApi> LifetimeTracker<A> {

let mut work_done_closures: SmallVec<_> = self.work_done_closures.drain(..).collect();
for a in self.active.drain(..done_count) {
log::info!("Active submission {} is done", a.index);
log::debug!("Active submission {} is done", a.index);
self.free_resources.extend(a.last_resources);
self.ready_to_map.extend(a.mapped);
for encoder in a.encoders {
Expand Down Expand Up @@ -979,7 +979,7 @@ impl<A: HalApi> LifetimeTracker<A> {
};
if is_removed {
*buffer.map_state.lock() = resource::BufferMapState::Idle;
log::info!("Buffer ready to map {:?} is not tracked anymore", buffer_id);
log::trace!("Buffer ready to map {:?} is not tracked anymore", buffer_id);
self.free_resources.insert(buffer_id, buffer.clone());
} else {
let mapping = match std::mem::replace(
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/present.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
};

let (id, resource) = fid.assign(texture);
log::info!("Created CURRENT Surface Texture {:?}", id);
log::debug!("Created CURRENT Surface Texture {:?}", id);

{
// register it in the device tracker as uninitialized
Expand Down
8 changes: 4 additions & 4 deletions wgpu-core/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ where
}

pub(crate) fn insert(&mut self, id: I, value: Arc<T>) {
log::info!("User is inserting {}{:?}", T::TYPE, id);
log::trace!("User is inserting {}{:?}", T::TYPE, id);
let (index, epoch, _backend) = id.unzip();
self.insert_impl(index as usize, epoch, Element::Occupied(value, epoch))
}

pub(crate) fn insert_error(&mut self, id: I, label: &str) {
log::info!("User is insering as error {}{:?}", T::TYPE, id);
log::trace!("User is insering as error {}{:?}", T::TYPE, id);
let (index, epoch, _) = id.unzip();
self.insert_impl(
index as usize,
Expand Down Expand Up @@ -225,13 +225,13 @@ where
}

pub(crate) fn force_replace(&mut self, id: I, value: T) {
log::info!("User is replacing {}{:?}", T::TYPE, id);
log::trace!("User is replacing {}{:?}", T::TYPE, id);
let (index, epoch, _) = id.unzip();
self.map[index as usize] = Element::Occupied(Arc::new(value), epoch);
}

pub(crate) fn remove(&mut self, id: I) -> Option<Arc<T>> {
log::info!("User is removing {}{:?}", T::TYPE, id);
log::trace!("User is removing {}{:?}", T::TYPE, id);
let (index, epoch, _) = id.unzip();
match std::mem::replace(&mut self.map[index as usize], Element::Vacant) {
Element::Occupied(value, storage_epoch) | Element::Destroyed(value, storage_epoch) => {
Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/track/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ impl<A: HalApi> ResourceTracker<BufferId, Buffer<A>> for BufferTracker<A> {
let min_ref_count = 1 + external_count;
if existing_ref_count <= min_ref_count {
self.metadata.remove(index);
log::info!("Buffer {:?} is not tracked anymore", id,);
log::trace!("Buffer {:?} is not tracked anymore", id,);
return true;
} else {
log::info!(
log::trace!(
"Buffer {:?} is still referenced from {}",
id,
existing_ref_count
Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/track/stateless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ impl<A: HalApi, Id: TypedId, T: Resource<Id>> ResourceTracker<Id, T>
let min_ref_count = 1 + external_count;
if existing_ref_count <= min_ref_count {
self.metadata.remove(index);
log::info!("{} {:?} is not tracked anymore", T::TYPE, id,);
log::trace!("{} {:?} is not tracked anymore", T::TYPE, id,);
return true;
} else {
log::info!(
log::trace!(
"{} {:?} is still referenced from {}",
T::TYPE,
id,
Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/track/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ impl<A: HalApi> ResourceTracker<TextureId, Texture<A>> for TextureTracker<A> {
self.start_set.complex.remove(&index);
self.end_set.complex.remove(&index);
self.metadata.remove(index);
log::info!("Texture {:?} is not tracked anymore", id,);
log::trace!("Texture {:?} is not tracked anymore", id,);
return true;
} else {
log::info!(
log::trace!(
"Texture {:?} is still referenced from {}",
id,
existing_ref_count
Expand Down
Loading