Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
++
  • Loading branch information
jonahwilliams committed Oct 13, 2023
commit 8e1c67b914a5d9465861a5ed4e27c5558caeee23
6 changes: 4 additions & 2 deletions impeller/renderer/backend/metal/gpu_tracer_mtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ class GPUTracerMTL : public std::enable_shared_from_this<GPUTracerMTL> {
};

[[maybe_unused]] mutable Mutex trace_state_mutex_;
[[maybe_unused]] GPUTraceState trace_states_[16] IPLR_GUARDED_BY(trace_state_mutex_);
[[maybe_unused]] size_t current_state_ IPLR_GUARDED_BY(trace_state_mutex_) = 0u;
[[maybe_unused]] GPUTraceState trace_states_[16] IPLR_GUARDED_BY(
trace_state_mutex_);
[[maybe_unused]] size_t current_state_ IPLR_GUARDED_BY(trace_state_mutex_) =
0u;
};

} // namespace impeller
2 changes: 1 addition & 1 deletion impeller/renderer/backend/metal/gpu_tracer_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
state.smallest_timestamp = std::numeric_limits<float>::max();
state.largest_timestamp = 0;
FML_TRACE_COUNTER("flutter", "GPUTracer",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it should be a constant somewhere so that MTL and VK use the same one always

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where would you want this? I can put it in core?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im gonna punt on this - the trace event will probably change a few times

1234, // Trace Counter ID
reinterpret_cast<int64_t>(this), // Trace Counter ID
"FrameTimeMS", gpu_ms);
}
}];
Expand Down