Skip to content

Commit 65779f3

Browse files
authored
Fix flickering on macOS 26 when tracy is enabled (#22365)
# Objective - Fix flickering/strobing when using tracy. - Close #22257 ## Solution - Disable writing timestamps in command encoders on macOS. ## Testing - Can no longer repro with `cargo run --example bloom_3d --features=trace_tracy` - `bevy_bistro_scene` also no longer exhibits the flickering
1 parent e457025 commit 65779f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/bevy_render/src/diagnostic/internal.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,13 @@ pub trait WriteTimestamp {
643643

644644
impl WriteTimestamp for CommandEncoder {
645645
fn write_timestamp(&mut self, query_set: &QuerySet, index: u32) {
646+
if cfg!(target_os = "macos") {
647+
// When using tracy (and thus this function), rendering was flickering on macOS Tahoe.
648+
// See: https://github.com/bevyengine/bevy/issues/22257
649+
// The issue seems to be triggered when `write_timestamp` is called very close to frame
650+
// presentation.
651+
return;
652+
}
646653
CommandEncoder::write_timestamp(self, query_set, index);
647654
}
648655
}

0 commit comments

Comments
 (0)