Tracks GPU completion of submitted command buffers as a monotonic watermark. More...
#include <gpu_submission_tracker.h>
Public Member Functions | |
| uint64_t | RecordSubmission () |
| Records a command buffer submission and returns its id. | |
| void | RecordCompletion (uint64_t id) |
| Marks a previously recorded submission as completed by the GPU. | |
| uint64_t | CompletedThrough () const |
| uint64_t | LatestSubmission () const |
| Returns the id of the most recent submission. | |
Tracks GPU completion of submitted command buffers as a monotonic watermark.
Backends record an id for each submitted command buffer and mark it from the command buffer's completion callback. Consumers compare ids against [CompletedThrough] to find out whether the GPU is done with all work submitted up to a point in time, regardless of the order in which individual command buffers complete.
All methods are thread safe.
Definition at line 25 of file gpu_submission_tracker.h.
| uint64_t impeller::GpuSubmissionTracker::CompletedThrough | ( | ) | const |
Returns the highest id such that all submissions with ids up to and including it have completed.
Definition at line 26 of file gpu_submission_tracker.cc.
Referenced by impeller::testing::TEST().
| uint64_t impeller::GpuSubmissionTracker::LatestSubmission | ( | ) | const |
Returns the id of the most recent submission.
Definition at line 34 of file gpu_submission_tracker.cc.
Referenced by impeller::testing::TEST().
| void impeller::GpuSubmissionTracker::RecordCompletion | ( | uint64_t | id | ) |
Marks a previously recorded submission as completed by the GPU.
Definition at line 18 of file gpu_submission_tracker.cc.
Referenced by impeller::testing::TEST().
| uint64_t impeller::GpuSubmissionTracker::RecordSubmission | ( | ) |
Records a command buffer submission and returns its id.
Definition at line 11 of file gpu_submission_tracker.cc.
References id.
Referenced by impeller::testing::TEST().