mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 07:51:08 +01:00
Remove ContextCore from CoreTlas
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
1 parent
f54ae8f3b5
commit
633081c80e
2 files changed
+10
-14
No files matched your search
@@ -72,7 +72,7 @@ impl Tlas {
|
||||
&mut self,
|
||||
) -> Option<impl Deref<Target = A::AccelerationStructure>> {
|
||||
let tlas = self.inner.as_core_opt()?;
|
||||
unsafe { tlas.context.tlas_as_hal::<A>(tlas) }
|
||||
unsafe { tlas.as_hal::<A>() }
|
||||
}
|
||||
|
||||
/// Returns custom implementation of Tlas (if custom backend and is internally T)
|
||||
|
||||
@@ -233,13 +233,6 @@ impl ContextWgpuCore {
|
||||
unsafe { blas.wgpu_blas.clone().as_hal::<A>() }
|
||||
}
|
||||
|
||||
pub unsafe fn tlas_as_hal<A: hal::Api>(
|
||||
&self,
|
||||
tlas: &CoreTlas,
|
||||
) -> Option<impl Deref<Target = A::AccelerationStructure>> {
|
||||
unsafe { tlas.wgpu_tlas.clone().as_hal::<A>() }
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
#[cold]
|
||||
fn handle_error_fatal(
|
||||
@@ -505,10 +498,17 @@ pub struct CoreBlas {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CoreTlas {
|
||||
pub(crate) context: ContextWgpuCore,
|
||||
pub(crate) wgpu_tlas: Arc<wgc::resource::Tlas>,
|
||||
}
|
||||
|
||||
impl CoreTlas {
|
||||
pub unsafe fn as_hal<A: hal::Api>(
|
||||
&self,
|
||||
) -> Option<impl Deref<Target = A::AccelerationStructure>> {
|
||||
unsafe { self.wgpu_tlas.clone().as_hal::<A>() }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct CoreSurfaceOutputDetail {
|
||||
pub(crate) context: ContextWgpuCore,
|
||||
@@ -1453,11 +1453,7 @@ impl dispatch::DeviceInterface for CoreDevice {
|
||||
self.wgpu_device
|
||||
.handle_error(cause, desc.label, "Device::create_tlas");
|
||||
}
|
||||
CoreTlas {
|
||||
context: self.context.clone(),
|
||||
wgpu_tlas,
|
||||
}
|
||||
.into()
|
||||
CoreTlas { wgpu_tlas }.into()
|
||||
}
|
||||
|
||||
fn create_sampler(&self, desc: &crate::SamplerDescriptor<'_>) -> dispatch::DispatchSampler {
|
||||
|
||||
Reference in new issue
Block a user