From 60bca997e5acd0a84dd8e9c771bab99540ded681 Mon Sep 17 00:00:00 2001 From: Chad Brokaw Date: Wed, 4 May 2022 01:59:49 -0400 Subject: [PATCH] Remove deprecated functions * remove CmdBuff::dispatch() which was moved to ComputePass * remove CmdBuff::write_timestamp() which is replaced by timestamp index pair in ComputePassDescriptor --- piet-gpu-hal/src/hub.rs | 36 ------------------------------------ tests/src/runner.rs | 5 ----- 2 files changed, 41 deletions(-) diff --git a/piet-gpu-hal/src/hub.rs b/piet-gpu-hal/src/hub.rs index 5eafd0b..ea17754 100644 --- a/piet-gpu-hal/src/hub.rs +++ b/piet-gpu-hal/src/hub.rs @@ -491,31 +491,6 @@ impl CmdBuf { 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. /// /// 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); } - /// 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 /// is required on (at least) DX12. /// diff --git a/tests/src/runner.rs b/tests/src/runner.rs index f97e15a..3ba8223 100644 --- a/tests/src/runner.rs +++ b/tests/src/runner.rs @@ -118,11 +118,6 @@ impl Runner { } 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. pub unsafe fn compute_pass(&mut self, start_query: u32, end_query: u32) -> ComputePass { self.cmd_buf