[core-remote] remove tlas/blas from hub and mark as unimplemented

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev authored and Teodor Tanasoaia committed 2026-08-14 16:30:02 +02:00
1 parent 0e62d29758
commit f80026ef83
3 files changed
+5 -44

No files matched your search

-28
View File
@@ -118,32 +118,4 @@ impl Global {
unsafe { queue.as_hal::<A>() }
}
/// # Safety
///
/// - The raw blas handle must not be manually destroyed
pub unsafe fn blas_as_hal<A: hal::Api>(
&self,
id: BlasId,
) -> Option<impl Deref<Target = A::AccelerationStructure>> {
let hub = &self.hub;
let blas = hub.blas_s.get(id);
unsafe { blas.as_hal::<A>() }
}
/// # Safety
///
/// - The raw tlas handle must not be manually destroyed
pub unsafe fn tlas_as_hal<A: hal::Api>(
&self,
id: TlasId,
) -> Option<impl Deref<Target = A::AccelerationStructure>> {
let hub = &self.hub;
let tlas = hub.tlas_s.get(id);
unsafe { tlas.as_hal::<A>() }
}
}
+4 -11
View File
@@ -497,7 +497,6 @@ impl Global {
buffer_storage: &Storage<Arc<resource::Buffer>>,
sampler_storage: &Storage<Arc<resource::Sampler>>,
texture_view_storage: &Storage<Arc<resource::TextureView>>,
tlas_storage: &Storage<Arc<resource::Tlas>>,
external_texture_storage: &Storage<Arc<resource::ExternalTexture>>,
) -> binding_model::BindGroupEntry<'a> {
let resolve_buffer = |bb: &BufferBinding| {
@@ -510,7 +509,6 @@ impl Global {
};
let resolve_sampler = |id: &id::SamplerId| sampler_storage.get(*id);
let resolve_view = |id: &id::TextureViewId| texture_view_storage.get(*id);
let resolve_tlas = |id: &id::TlasId| tlas_storage.get(*id);
let resolve_external_texture =
|id: &id::ExternalTextureId| external_texture_storage.get(*id);
let resource = match e.resource {
@@ -535,14 +533,11 @@ impl Global {
let views = views.iter().map(resolve_view).collect::<Vec<_>>();
binding_model::BindingResource::TextureViewArray(Cow::Owned(views))
}
BindingResource::AccelerationStructure(ref tlas) => {
binding_model::BindingResource::AccelerationStructure(resolve_tlas(tlas))
BindingResource::AccelerationStructure(_) => {
unimplemented!()
}
BindingResource::AccelerationStructureArray(ref tlas_array) => {
let tlas_array = tlas_array.iter().map(resolve_tlas).collect::<Vec<_>>();
binding_model::BindingResource::AccelerationStructureArray(Cow::Owned(
tlas_array,
))
BindingResource::AccelerationStructureArray(_) => {
unimplemented!()
}
BindingResource::ExternalTexture(ref et) => {
binding_model::BindingResource::ExternalTexture(resolve_external_texture(et))
@@ -558,7 +553,6 @@ impl Global {
let buffer_guard = hub.buffers.read();
let texture_view_guard = hub.texture_views.read();
let sampler_guard = hub.samplers.read();
let tlas_guard = hub.tlas_s.read();
let external_texture_guard = hub.external_textures.read();
desc.entries
.iter()
@@ -568,7 +562,6 @@ impl Global {
&buffer_guard,
&sampler_guard,
&texture_view_guard,
&tlas_guard,
&external_texture_guard,
)
})
+1 -5
View File
@@ -115,7 +115,7 @@ use wgpu_core::{
device::{queue::Queue, Device},
instance::Adapter,
pipeline::{ComputePipeline, PipelineCache, RenderPipeline, ShaderModule},
resource::{Blas, Buffer, ExternalTexture, QuerySet, Sampler, Texture, TextureView, Tlas},
resource::{Buffer, ExternalTexture, QuerySet, Sampler, Texture, TextureView},
};
use parking_lot::Mutex;
@@ -193,8 +193,6 @@ pub struct Hub {
pub(crate) texture_views: Registry<Arc<TextureView>>,
pub(crate) external_textures: Registry<Arc<ExternalTexture>>,
pub(crate) samplers: Registry<Arc<Sampler>>,
pub(crate) blas_s: Registry<Arc<Blas>>,
pub(crate) tlas_s: Registry<Arc<Tlas>>,
pub(crate) render_passes: Registry<Arc<Mutex<RenderPass>>>,
pub(crate) compute_passes: Registry<Arc<Mutex<ComputePass>>>,
pub(crate) render_bundle_encoders: Registry<Arc<Mutex<RenderBundleEncoder>>>,
@@ -229,8 +227,6 @@ impl Hub {
texture_views: Registry::new(),
external_textures: Registry::new(),
samplers: Registry::new(),
blas_s: Registry::new(),
tlas_s: Registry::new(),
render_passes: Registry::new(),
compute_passes: Registry::new(),
render_bundle_encoders: Registry::new(),