Skip to content

Commit

Permalink
Add gpu debug group
Browse files Browse the repository at this point in the history
  • Loading branch information
JMS55 committed Nov 11, 2023
1 parent be6c16b commit 6aaa34b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/bevy_pbr/src/meshlet/visibility_buffer_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand Down Expand Up @@ -146,6 +150,8 @@ impl ViewNode for MeshletVisibilityBufferPassNode {
copy_pass.draw(0..3, 0..1);
}

render_context.command_encoder().pop_debug_group();

Ok(())
}
}

0 comments on commit 6aaa34b

Please sign in to comment.