diff --git a/wgpu-core-remote/src/global/queue.rs b/wgpu-core-remote/src/global/queue.rs index 8aa5c9659..ec9d143f0 100644 --- a/wgpu-core-remote/src/global/queue.rs +++ b/wgpu-core-remote/src/global/queue.rs @@ -1,10 +1,8 @@ -use core::ptr::NonNull; - use wgpu_core::device::queue::{QueueSubmitError, QueueWriteError, SubmittedWorkDoneClosure}; use wgpu_core::SubmissionIndex; use crate::global::Global; -use crate::id::{BufferId, CommandBufferId, QueueId, StagingBufferId, TextureId}; +use crate::id::{BufferId, CommandBufferId, QueueId, TextureId}; impl Global { pub fn queue_write_buffer( @@ -20,34 +18,6 @@ impl Global { queue.write_buffer(buffer, buffer_offset, data) } - pub fn queue_create_staging_buffer( - &self, - queue_id: QueueId, - buffer_size: wgt::BufferSize, - id_in: Option, - ) -> Result<(StagingBufferId, NonNull), QueueWriteError> { - let queue = self.hub.queues.get(queue_id); - let (staging_buffer, ptr) = queue.create_staging_buffer(buffer_size)?; - - let fid = self.hub.staging_buffers.prepare(id_in); - let id = fid.assign(staging_buffer); - - Ok((id, ptr)) - } - - pub fn queue_write_staging_buffer( - &self, - queue_id: QueueId, - buffer_id: BufferId, - buffer_offset: wgt::BufferAddress, - staging_buffer_id: StagingBufferId, - ) -> Result<(), QueueWriteError> { - let queue = self.hub.queues.get(queue_id); - let buffer = self.hub.buffers.get(buffer_id); - let staging_buffer = self.hub.staging_buffers.remove(staging_buffer_id); - queue.write_staging_buffer(buffer, buffer_offset, staging_buffer) - } - pub fn queue_validate_write_buffer( &self, queue_id: QueueId, diff --git a/wgpu-core-remote/src/hub.rs b/wgpu-core-remote/src/hub.rs index 66e670bb3..22300df63 100644 --- a/wgpu-core-remote/src/hub.rs +++ b/wgpu-core-remote/src/hub.rs @@ -115,9 +115,7 @@ use wgpu_core::{ device::{queue::Queue, Device}, instance::Adapter, pipeline::{ComputePipeline, PipelineCache, RenderPipeline, ShaderModule}, - resource::{ - Blas, Buffer, ExternalTexture, QuerySet, Sampler, StagingBuffer, Texture, TextureView, Tlas, - }, + resource::{Blas, Buffer, ExternalTexture, QuerySet, Sampler, Texture, TextureView, Tlas}, }; use parking_lot::Mutex; @@ -191,7 +189,6 @@ pub struct Hub { pub(crate) pipeline_caches: Registry>, pub(crate) query_sets: Registry>, pub(crate) buffers: Registry>, - pub(crate) staging_buffers: Registry, pub(crate) textures: Registry>, pub(crate) texture_views: Registry>, pub(crate) external_textures: Registry>, @@ -228,7 +225,6 @@ impl Hub { pipeline_caches: Registry::new(), query_sets: Registry::new(), buffers: Registry::new(), - staging_buffers: Registry::new(), textures: Registry::new(), texture_views: Registry::new(), external_textures: Registry::new(), diff --git a/wgpu-core-remote/src/id.rs b/wgpu-core-remote/src/id.rs index a375bb60d..8a70d3767 100644 --- a/wgpu-core-remote/src/id.rs +++ b/wgpu-core-remote/src/id.rs @@ -215,7 +215,6 @@ ids! { pub type DeviceId Device; pub type QueueId Queue; pub type BufferId Buffer; - pub type StagingBufferId StagingBuffer; pub type TextureViewId TextureView; pub type TextureId Texture; pub type ExternalTextureId ExternalTexture;