mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
Use enums for trace event categories
Explicit enums are simpler to use in Dawn and allow only specific categories which the perf tests understand. Also adds trace events around command recording and validation on all backends. Bug: dawn:208 Change-Id: I7859ffd6668b20893780c6081bf2c9019a7115e0 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12781 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
7a7d547381
commit
73d5bb57e6
@@ -21,11 +21,18 @@
|
||||
|
||||
namespace dawn_platform {
|
||||
|
||||
enum class TraceCategory {
|
||||
General, // General trace events
|
||||
Validation, // Dawn validation
|
||||
Recording, // Native command recording
|
||||
GPUWork, // Actual GPU work
|
||||
};
|
||||
|
||||
class DAWN_NATIVE_EXPORT Platform {
|
||||
public:
|
||||
virtual ~Platform() {
|
||||
}
|
||||
virtual const unsigned char* GetTraceCategoryEnabledFlag(const char* name) = 0;
|
||||
virtual const unsigned char* GetTraceCategoryEnabledFlag(TraceCategory category) = 0;
|
||||
|
||||
virtual double MonotonicallyIncreasingTime() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user