From 6aaa34b52df7f895be88dd3df6788d8c4d0c9e3e Mon Sep 17 00:00:00 2001 From: JMS55 <47158642+JMS55@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:10:28 -0800 Subject: [PATCH] Add gpu debug group --- crates/bevy_pbr/src/meshlet/visibility_buffer_node.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/meshlet/visibility_buffer_node.rs b/crates/bevy_pbr/src/meshlet/visibility_buffer_node.rs index 829c17c7443bb..b12612eef6c8d 100644 --- a/crates/bevy_pbr/src/meshlet/visibility_buffer_node.rs +++ b/crates/bevy_pbr/src/meshlet/visibility_buffer_node.rs @@ -57,6 +57,10 @@ impl ViewNode for MeshletVisibilityBufferPassNode { } .into(); + render_context + .command_encoder() + .push_debug_group(draw_3d_graph::node::MESHLET_VISIBILITY_BUFFER_PASS); + { let command_encoder = render_context.command_encoder(); let mut cull_pass = command_encoder.begin_compute_pass(&ComputePassDescriptor { @@ -73,7 +77,7 @@ impl ViewNode for MeshletVisibilityBufferPassNode { { let mut draw_pass = render_context.begin_tracked_render_pass(RenderPassDescriptor { - label: Some(draw_3d_graph::node::MESHLET_VISIBILITY_BUFFER_PASS), + label: Some("meshlet_visibility_buffer_render_pass"), color_attachments: &[ Some(RenderPassColorAttachment { view: &meshlet_view_resources.visibility_buffer.default_view, @@ -146,6 +150,8 @@ impl ViewNode for MeshletVisibilityBufferPassNode { copy_pass.draw(0..3, 0..1); } + render_context.command_encoder().pop_debug_group(); + Ok(()) } }