mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
remove ResourceInfo.label()
This commit is contained in:
parent
c4e067b394
commit
8106028f23
@ -506,10 +506,7 @@ impl<A: HalApi> CommandBuffer<A> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn extract_baked_commands(&mut self) -> BakedCommands<A> {
|
pub(crate) fn extract_baked_commands(&mut self) -> BakedCommands<A> {
|
||||||
log::trace!(
|
log::trace!("Extracting BakedCommands from {}", self.error_ident());
|
||||||
"Extracting BakedCommands from CommandBuffer {:?}",
|
|
||||||
self.info.label()
|
|
||||||
);
|
|
||||||
let data = self.data.lock().take().unwrap();
|
let data = self.data.lock().take().unwrap();
|
||||||
BakedCommands {
|
BakedCommands {
|
||||||
encoder: data.encoder.raw,
|
encoder: data.encoder.raw,
|
||||||
|
@ -151,7 +151,7 @@ pub(crate) enum DeferredDestroy<A: HalApi> {
|
|||||||
impl<A: HalApi> std::fmt::Debug for Device<A> {
|
impl<A: HalApi> std::fmt::Debug for Device<A> {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
f.debug_struct("Device")
|
f.debug_struct("Device")
|
||||||
.field("adapter", &self.adapter.info.label())
|
.field("label", &self.info.label)
|
||||||
.field("limits", &self.limits)
|
.field("limits", &self.limits)
|
||||||
.field("features", &self.features)
|
.field("features", &self.features)
|
||||||
.field("downlevel", &self.downlevel)
|
.field("downlevel", &self.downlevel)
|
||||||
|
@ -103,21 +103,6 @@ impl<T: Resource> ResourceInfo<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn label(&self) -> &dyn Debug
|
|
||||||
where
|
|
||||||
Id<T::Marker>: Debug,
|
|
||||||
{
|
|
||||||
if !self.label.is_empty() {
|
|
||||||
return &self.label;
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(id) = &self.id {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
&""
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn id(&self) -> Id<T::Marker> {
|
pub(crate) fn id(&self) -> Id<T::Marker> {
|
||||||
self.id.unwrap()
|
self.id.unwrap()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user