mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
DynDevice exit, counters, report
This commit is contained in:
parent
9e1f1487b4
commit
1a9170e57b
@ -21,6 +21,8 @@ use super::{
|
||||
};
|
||||
|
||||
pub trait DynDevice: DynResource {
|
||||
unsafe fn exit(self: Box<Self>, queue: Box<dyn DynQueue>);
|
||||
|
||||
unsafe fn create_buffer(
|
||||
&self,
|
||||
desc: &BufferDescriptor,
|
||||
@ -160,9 +162,16 @@ pub trait DynDevice: DynResource {
|
||||
&self,
|
||||
acceleration_structure: Box<dyn DynAccelerationStructure>,
|
||||
);
|
||||
|
||||
fn get_internal_counters(&self) -> wgt::HalCounters;
|
||||
fn generate_allocator_report(&self) -> Option<wgt::AllocatorReport>;
|
||||
}
|
||||
|
||||
impl<D: Device + DynResource> DynDevice for D {
|
||||
unsafe fn exit(self: Box<Self>, queue: Box<dyn DynQueue>) {
|
||||
unsafe { D::exit(*self, queue.unbox()) }
|
||||
}
|
||||
|
||||
unsafe fn create_buffer(
|
||||
&self,
|
||||
desc: &BufferDescriptor,
|
||||
@ -558,4 +567,12 @@ impl<D: Device + DynResource> DynDevice for D {
|
||||
) {
|
||||
unsafe { D::destroy_acceleration_structure(self, acceleration_structure.unbox()) }
|
||||
}
|
||||
|
||||
fn get_internal_counters(&self) -> wgt::HalCounters {
|
||||
D::get_internal_counters(self)
|
||||
}
|
||||
|
||||
fn generate_allocator_report(&self) -> Option<wgt::AllocatorReport> {
|
||||
D::generate_allocator_report(self)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user