mirror of
https://github.com/storytold/wgpu.git
synced 2026-12-01 02:24:35 +01:00
Added debug marker/groups for ComputePass & CommandEncoder
This commit is contained in:
1 parent
854b3f1c5d
commit
cb2072ed6a
6 files changed
+132
-18
No files matched your search
@@ -96,6 +96,22 @@ mod pass_impl {
|
||||
)
|
||||
}
|
||||
}
|
||||
fn insert_debug_marker(&mut self, label: &str) {
|
||||
unsafe {
|
||||
let label = std::ffi::CString::new(label).unwrap();
|
||||
wgpu_compute_pass_insert_debug_marker(self, label.as_ptr().into(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
fn push_debug_group(&mut self, group_label: &str) {
|
||||
unsafe {
|
||||
let label = std::ffi::CString::new(group_label).unwrap();
|
||||
wgpu_compute_pass_push_debug_group(self, label.as_ptr().into(), 0);
|
||||
}
|
||||
}
|
||||
fn pop_debug_group(&mut self) {
|
||||
wgpu_compute_pass_pop_debug_group(self);
|
||||
}
|
||||
fn dispatch(&mut self, x: u32, y: u32, z: u32) {
|
||||
wgpu_compute_pass_dispatch(self, x, y, z)
|
||||
}
|
||||
@@ -1244,6 +1260,22 @@ impl crate::Context for Context {
|
||||
wgc::gfx_select!(*encoder => global.command_encoder_finish(*encoder, &desc)).unwrap_pretty()
|
||||
}
|
||||
|
||||
fn command_encoder_insert_debug_marker(&self, encoder: &Self::CommandEncoderId, label: &str) {
|
||||
let global = &self.0;
|
||||
wgc::gfx_select!(*encoder => global.command_encoder_insert_debug_marker(*encoder, &label))
|
||||
.unwrap_pretty()
|
||||
}
|
||||
fn command_encoder_push_debug_group(&self, encoder: &Self::CommandEncoderId, label: &str) {
|
||||
let global = &self.0;
|
||||
wgc::gfx_select!(*encoder => global.command_encoder_push_debug_group(*encoder, &label))
|
||||
.unwrap_pretty()
|
||||
}
|
||||
fn command_encoder_pop_debug_group(&self, encoder: &Self::CommandEncoderId) {
|
||||
let global = &self.0;
|
||||
wgc::gfx_select!(*encoder => global.command_encoder_pop_debug_group(*encoder))
|
||||
.unwrap_pretty()
|
||||
}
|
||||
|
||||
fn render_bundle_encoder_finish(
|
||||
&self,
|
||||
encoder: Self::RenderBundleEncoderId,
|
||||
|
||||
@@ -88,6 +88,19 @@ impl crate::ComputePassInner<Context> for ComputePass {
|
||||
fn set_push_constants(&mut self, _offset: u32, _data: &[u32]) {
|
||||
panic!("PUSH_CONSTANTS feature must be enabled to call multi_draw_indexed_indirect")
|
||||
}
|
||||
|
||||
fn insert_debug_marker(&mut self, _label: &str) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn push_debug_group(&mut self, _group_label: &str) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn pop_debug_group(&mut self) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn dispatch(&mut self, x: u32, y: u32, z: u32) {
|
||||
self.0.dispatch_with_y_and_z(x, y, z);
|
||||
}
|
||||
@@ -1436,6 +1449,16 @@ impl crate::Context for Context {
|
||||
Sendable(encoder.finish_with_descriptor(&mapped_desc))
|
||||
}
|
||||
|
||||
fn command_encoder_insert_debug_marker(&self, encoder: &Self::CommandEncoderId, label: &str) {
|
||||
unimplemented!()
|
||||
}
|
||||
fn command_encoder_push_debug_group(&self, encoder: &Self::CommandEncoderId, label: &str) {
|
||||
unimplemented!()
|
||||
}
|
||||
fn command_encoder_pop_debug_group(&self, encoder: &Self::CommandEncoderId) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn render_bundle_encoder_finish(
|
||||
&self,
|
||||
_encoder: Self::RenderBundleEncoderId,
|
||||
|
||||
Reference in new issue
Block a user