Remove deprecated functions

* remove CmdBuff::dispatch() which was moved to ComputePass

* remove CmdBuff::write_timestamp() which is replaced by timestamp index pair in ComputePassDescriptor
This commit is contained in:
Chad Brokaw 2022-05-04 01:59:49 -04:00
parent 41316ccd4b
commit 60bca997e5
2 changed files with 0 additions and 41 deletions

View file

@ -491,31 +491,6 @@ impl CmdBuf {
ComputePass { cmd_buf: self } ComputePass { cmd_buf: self }
} }
/// Dispatch a compute shader.
///
/// Request a compute shader to be run, using the pipeline to specify the
/// code, and the descriptor set to address the resources read and written.
///
/// Both the workgroup count (number of workgroups) and the workgroup size
/// (number of threads in a workgroup) must be specified here, though not
/// all back-ends require the latter info.
///
/// This version is deprecated because (a) you do not get timer queries and
/// (b) it doesn't aggregate multiple dispatches into a single compute
/// pass, which is a performance concern.
#[deprecated(note = "moving to ComputePass")]
pub unsafe fn dispatch(
&mut self,
pipeline: &Pipeline,
descriptor_set: &DescriptorSet,
workgroup_count: (u32, u32, u32),
workgroup_size: (u32, u32, u32),
) {
let mut pass = self.begin_compute_pass(&Default::default());
pass.dispatch(pipeline, descriptor_set, workgroup_count, workgroup_size);
pass.end();
}
/// Insert an execution and memory barrier. /// Insert an execution and memory barrier.
/// ///
/// Compute kernels (and other actions) after this barrier may read from buffers /// Compute kernels (and other actions) after this barrier may read from buffers
@ -608,17 +583,6 @@ impl CmdBuf {
self.cmd_buf().reset_query_pool(pool); self.cmd_buf().reset_query_pool(pool);
} }
/// Write a timestamp.
///
/// The query index must be less than the size of the query pool on creation.
///
/// Deprecation: for greater portability, set timestamp queries on compute
/// passes instead.
#[deprecated(note = "use compute pass descriptor instead")]
pub unsafe fn write_timestamp(&mut self, pool: &QueryPool, query: u32) {
self.cmd_buf().write_timestamp(pool, query);
}
/// Prepare the timestamps for reading. This isn't required on Vulkan but /// Prepare the timestamps for reading. This isn't required on Vulkan but
/// is required on (at least) DX12. /// is required on (at least) DX12.
/// ///

View file

@ -118,11 +118,6 @@ impl Runner {
} }
impl Commands { impl Commands {
#[deprecated(note = "use compute_pass instead")]
pub unsafe fn write_timestamp(&mut self, query: u32) {
self.cmd_buf.write_timestamp(&self.query_pool, query);
}
/// Start a compute pass with timer queries. /// Start a compute pass with timer queries.
pub unsafe fn compute_pass(&mut self, start_query: u32, end_query: u32) -> ComputePass { pub unsafe fn compute_pass(&mut self, start_query: u32, end_query: u32) -> ComputePass {
self.cmd_buf self.cmd_buf