diff --git a/wgpu/src/backend/wgpu_core.rs b/wgpu/src/backend/wgpu_core.rs index f1bdf13f0aa..73c55818384 100644 --- a/wgpu/src/backend/wgpu_core.rs +++ b/wgpu/src/backend/wgpu_core.rs @@ -2049,27 +2049,6 @@ impl crate::Context for ContextWgpuCore { } } - fn command_encoder_write_timestamp( - &self, - encoder: &Self::CommandEncoderId, - encoder_data: &Self::CommandEncoderData, - query_set: &Self::QuerySetId, - _query_set_data: &Self::QuerySetData, - query_index: u32, - ) { - if let Err(cause) = wgc::gfx_select!(encoder => self.0.command_encoder_write_timestamp( - *encoder, - *query_set, - query_index - )) { - self.handle_error_nolabel( - &encoder_data.error_sink, - cause, - "CommandEncoder::write_timestamp", - ); - } - } - fn command_encoder_resolve_query_set( &self, encoder: &Self::CommandEncoderId, @@ -2362,17 +2341,6 @@ impl crate::Context for ContextWgpuCore { wgpu_compute_pass_pop_debug_group(pass_data); } - fn compute_pass_write_timestamp( - &self, - _pass: &mut Self::ComputePassId, - pass_data: &mut Self::ComputePassData, - query_set: &Self::QuerySetId, - _query_set_data: &Self::QuerySetData, - query_index: u32, - ) { - wgpu_compute_pass_write_timestamp(pass_data, *query_set, query_index) - } - fn compute_pass_begin_pipeline_statistics_query( &self, _pass: &mut Self::ComputePassId, @@ -2857,17 +2825,6 @@ impl crate::Context for ContextWgpuCore { wgpu_render_pass_pop_debug_group(pass_data); } - fn render_pass_write_timestamp( - &self, - _pass: &mut Self::RenderPassId, - pass_data: &mut Self::RenderPassData, - query_set: &Self::QuerySetId, - _query_set_data: &Self::QuerySetData, - query_index: u32, - ) { - wgpu_render_pass_write_timestamp(pass_data, *query_set, query_index) - } - fn render_pass_begin_occlusion_query( &self, _pass: &mut Self::RenderPassId, diff --git a/wgpu/src/context.rs b/wgpu/src/context.rs index 75de4361c03..64aafa600d5 100644 --- a/wgpu/src/context.rs +++ b/wgpu/src/context.rs @@ -506,14 +506,6 @@ pub trait Context: Debug + WasmNotSendSync + Sized { encoder_data: &Self::CommandEncoderData, ); - fn command_encoder_write_timestamp( - &self, - encoder: &Self::CommandEncoderId, - encoder_data: &Self::CommandEncoderData, - query_set: &Self::QuerySetId, - query_set_data: &Self::QuerySetData, - query_index: u32, - ); #[allow(clippy::too_many_arguments)] fn command_encoder_resolve_query_set( &self, @@ -646,14 +638,6 @@ pub trait Context: Debug + WasmNotSendSync + Sized { pass: &mut Self::ComputePassId, pass_data: &mut Self::ComputePassData, ); - fn compute_pass_write_timestamp( - &self, - pass: &mut Self::ComputePassId, - pass_data: &mut Self::ComputePassData, - query_set: &Self::QuerySetId, - query_set_data: &Self::QuerySetData, - query_index: u32, - ); fn compute_pass_begin_pipeline_statistics_query( &self, pass: &mut Self::ComputePassId, @@ -977,14 +961,6 @@ pub trait Context: Debug + WasmNotSendSync + Sized { pass: &mut Self::RenderPassId, pass_data: &mut Self::RenderPassData, ); - fn render_pass_write_timestamp( - &self, - pass: &mut Self::RenderPassId, - pass_data: &mut Self::RenderPassData, - query_set: &Self::QuerySetId, - query_set_data: &Self::QuerySetData, - query_index: u32, - ); fn render_pass_begin_occlusion_query( &self, pass: &mut Self::RenderPassId, @@ -1488,14 +1464,6 @@ pub(crate) trait DynContext: Debug + WasmNotSendSync { ); fn command_encoder_pop_debug_group(&self, encoder: &ObjectId, encoder_data: &crate::Data); - fn command_encoder_write_timestamp( - &self, - encoder: &ObjectId, - encoder_data: &crate::Data, - query_set: &ObjectId, - query_set_data: &crate::Data, - query_index: u32, - ); #[allow(clippy::too_many_arguments)] fn command_encoder_resolve_query_set( &self, @@ -1620,14 +1588,6 @@ pub(crate) trait DynContext: Debug + WasmNotSendSync { group_label: &str, ); fn compute_pass_pop_debug_group(&self, pass: &mut ObjectId, pass_data: &mut crate::Data); - fn compute_pass_write_timestamp( - &self, - pass: &mut ObjectId, - pass_data: &mut crate::Data, - query_set: &ObjectId, - query_set_data: &crate::Data, - query_index: u32, - ); fn compute_pass_begin_pipeline_statistics_query( &self, pass: &mut ObjectId, @@ -1947,14 +1907,6 @@ pub(crate) trait DynContext: Debug + WasmNotSendSync { group_label: &str, ); fn render_pass_pop_debug_group(&self, pass: &mut ObjectId, pass_data: &mut crate::Data); - fn render_pass_write_timestamp( - &self, - pass: &mut ObjectId, - pass_data: &mut crate::Data, - query_set: &ObjectId, - query_set_data: &crate::Data, - query_index: u32, - ); fn render_pass_begin_occlusion_query( &self, pass: &mut ObjectId, @@ -2840,28 +2792,6 @@ where Context::command_encoder_pop_debug_group(self, &encoder, encoder_data) } - fn command_encoder_write_timestamp( - &self, - encoder: &ObjectId, - encoder_data: &crate::Data, - query_set: &ObjectId, - query_set_data: &crate::Data, - query_index: u32, - ) { - let encoder = ::from(*encoder); - let encoder_data = downcast_ref(encoder_data); - let query_set = ::from(*query_set); - let query_set_data = downcast_ref(query_set_data); - Context::command_encoder_write_timestamp( - self, - &encoder, - encoder_data, - &query_set, - query_set_data, - query_index, - ) - } - fn command_encoder_resolve_query_set( &self, encoder: &ObjectId, @@ -3133,28 +3063,6 @@ where Context::compute_pass_pop_debug_group(self, &mut pass, pass_data) } - fn compute_pass_write_timestamp( - &self, - pass: &mut ObjectId, - pass_data: &mut crate::Data, - query_set: &ObjectId, - query_set_data: &crate::Data, - query_index: u32, - ) { - let mut pass = ::from(*pass); - let pass_data = downcast_mut::(pass_data); - let query_set = ::from(*query_set); - let query_set_data = downcast_ref(query_set_data); - Context::compute_pass_write_timestamp( - self, - &mut pass, - pass_data, - &query_set, - query_set_data, - query_index, - ) - } - fn compute_pass_begin_pipeline_statistics_query( &self, pass: &mut ObjectId, @@ -3899,28 +3807,6 @@ where Context::render_pass_pop_debug_group(self, &mut pass, pass_data) } - fn render_pass_write_timestamp( - &self, - pass: &mut ObjectId, - pass_data: &mut crate::Data, - query_set: &ObjectId, - query_set_data: &crate::Data, - query_index: u32, - ) { - let mut pass = ::from(*pass); - let pass_data = downcast_mut::(pass_data); - let query_set = ::from(*query_set); - let query_set_data = downcast_ref(query_set_data); - Context::render_pass_write_timestamp( - self, - &mut pass, - pass_data, - &query_set, - query_set_data, - query_index, - ) - } - fn render_pass_begin_occlusion_query( &self, pass: &mut ObjectId, diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 2807c55cb99..6692d7173cf 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -4317,27 +4317,6 @@ impl<'a> RenderPass<'a> { } } -/// [`Features::TIMESTAMP_QUERY_INSIDE_PASSES`] must be enabled on the device in order to call these functions. -impl<'a> RenderPass<'a> { - /// Issue a timestamp command at this point in the queue. The - /// timestamp will be written to the specified query set, at the specified index. - /// - /// Must be multiplied by [`Queue::get_timestamp_period`] to get - /// the value in nanoseconds. Absolute values have no meaning, - /// but timestamps can be subtracted to get the time it takes - /// for a string of operations to complete. - pub fn write_timestamp(&mut self, query_set: &QuerySet, query_index: u32) { - DynContext::render_pass_write_timestamp( - &*self.parent.context, - &mut self.id, - self.data.as_mut(), - &query_set.id, - query_set.data.as_ref(), - query_index, - ) - } -} - impl<'a> RenderPass<'a> { /// Start a occlusion query on this render pass. It can be ended with /// `end_occlusion_query`. Occlusion queries may not be nested. @@ -4519,26 +4498,6 @@ impl<'a> ComputePass<'a> { } } -/// [`Features::TIMESTAMP_QUERY_INSIDE_PASSES`] must be enabled on the device in order to call these functions. -impl<'a> ComputePass<'a> { - /// Issue a timestamp command at this point in the queue. The timestamp will be written to the specified query set, at the specified index. - /// - /// Must be multiplied by [`Queue::get_timestamp_period`] to get - /// the value in nanoseconds. Absolute values have no meaning, - /// but timestamps can be subtracted to get the time it takes - /// for a string of operations to complete. - pub fn write_timestamp(&mut self, query_set: &QuerySet, query_index: u32) { - DynContext::compute_pass_write_timestamp( - &*self.parent.context, - &mut self.id, - self.data.as_mut(), - &query_set.id, - query_set.data.as_ref(), - query_index, - ) - } -} - /// [`Features::PIPELINE_STATISTICS_QUERY`] must be enabled on the device in order to call these functions. impl<'a> ComputePass<'a> { /// Start a pipeline statistics query on this compute pass. It can be ended with