-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Add GPUTracer for impeller metal backend #36499
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
9e4ae4a
to
d8f83ff
Compare
Gold has detected about 2 new digest(s) on patchset 13. |
I think this is ready for review ^_^ |
impeller/renderer/frame_captor.h
Outdated
/// The frame capture should only be used in development for frame | ||
/// offline analysis. | ||
/// | ||
class FrameCaptor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we rename this to something like GPUTracer
? Since we will be using this to trace more than just frames (like compute workloads).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done^_^
impeller/renderer/frame_captor.h
Outdated
/// capture finishes. Otherwise, the Xcode will automatically open and show | ||
/// trace result. | ||
/// | ||
bool mtlSaveGPUTraceDocument = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header is backend agnostic so I am not sure how best to reconcile the Metal specificity of this option. Perhaps just a MetalConfiguration
sub-struct? Also, please use the style guide for naming save_gpu_trace_as_document
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for reviewing this^_^
This is what I think about:
In this config, we gather all backends gpu trace params. And every backend just picks the corresponding params to use.
Such as...
struct GPUTracerConfiguration {
/// Params for metal backend.
bool mtl_frame_capture_save_trace_as_document = false;
bool mtl_xxxxxx = false;
/// Params for GLES backend.
bool gles_frame_capture_save_trace_as_document = false;
/// Param for Vulkan backend.
bool vk_xxxx = false
};
I just added |
List which issues are fixed by this PR. You must list at least one issue.
flutter/flutter#111421
We can add this in info.plist in our test app to get gputrace file if we save it locally.
Preview
metal_capture.mp4
Pre-launch Checklist
writing and running engine tests.
///
).