Skip to content

Commit 8a86699

Browse files
committed
Short-circuit initial_timestamp call on macOS
1 parent c224b08 commit 8a86699

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/bevy_render/src/diagnostic/tracy_gpu.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ pub fn new_tracy_gpu_context(
3030

3131
// Code copied from https://github.com/Wumpf/wgpu-profiler/blob/f9de342a62cb75f50904a98d11dd2bbeb40ceab8/src/tracy.rs
3232
fn initial_timestamp(device: &RenderDevice, queue: &RenderQueue) -> i64 {
33+
if cfg!(target_os = "macos") {
34+
// On macOS the `.poll(PollType::wait_indefinitely())` will never return
35+
// and thus freezes the application before it even gets to start properly.
36+
// I suspect this is related to the same root cause that was fixed in
37+
// https://github.com/bevyengine/bevy/pull/22365 but I'm not sure.
38+
//
39+
// 0 is probably not correct, but it works.
40+
return 0;
41+
}
42+
3343
let query_set = device.wgpu_device().create_query_set(&QuerySetDescriptor {
3444
label: None,
3545
ty: QueryType::Timestamp,

0 commit comments

Comments
 (0)