mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
remove tracing from Destroyed{Buffer,Texture}
drop impl
we already trace buffer drop and destroy in the corresponding `Global` methods so we might end up with double drop/destroy actions
This commit is contained in:
parent
f2ea30772c
commit
812a562331
@ -850,11 +850,6 @@ impl<A: HalApi> Drop for DestroyedBuffer<A> {
|
|||||||
if let Some(raw) = self.raw.take() {
|
if let Some(raw) = self.raw.take() {
|
||||||
resource_log!("Destroy raw Buffer (destroyed) {:?}", self.label());
|
resource_log!("Destroy raw Buffer (destroyed) {:?}", self.label());
|
||||||
|
|
||||||
#[cfg(feature = "trace")]
|
|
||||||
if let Some(t) = self.device.trace.lock().as_mut() {
|
|
||||||
t.add(trace::Action::DestroyBuffer(self.id));
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
use hal::Device;
|
use hal::Device;
|
||||||
self.device.raw().destroy_buffer(raw);
|
self.device.raw().destroy_buffer(raw);
|
||||||
@ -1355,11 +1350,6 @@ impl<A: HalApi> Drop for DestroyedTexture<A> {
|
|||||||
if let Some(raw) = self.raw.take() {
|
if let Some(raw) = self.raw.take() {
|
||||||
resource_log!("Destroy raw Texture (destroyed) {:?}", self.label());
|
resource_log!("Destroy raw Texture (destroyed) {:?}", self.label());
|
||||||
|
|
||||||
#[cfg(feature = "trace")]
|
|
||||||
if let Some(t) = self.device.trace.lock().as_mut() {
|
|
||||||
t.add(trace::Action::DestroyTexture(self.id));
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
use hal::Device;
|
use hal::Device;
|
||||||
self.device.raw().destroy_texture(raw);
|
self.device.raw().destroy_texture(raw);
|
||||||
|
Loading…
Reference in New Issue
Block a user