mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +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
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "dawn_native/opengl/CommandBufferGL.h"
|
||||
#include "dawn_native/opengl/DeviceGL.h"
|
||||
#include "dawn_platform/DawnPlatform.h"
|
||||
#include "dawn_platform/tracing/TraceEvent.h"
|
||||
|
||||
namespace dawn_native { namespace opengl {
|
||||
|
||||
@@ -25,9 +27,11 @@ namespace dawn_native { namespace opengl {
|
||||
MaybeError Queue::SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) {
|
||||
Device* device = ToBackend(GetDevice());
|
||||
|
||||
TRACE_EVENT_BEGIN0(GetDevice()->GetPlatform(), Recording, "CommandBufferGL::Execute");
|
||||
for (uint32_t i = 0; i < commandCount; ++i) {
|
||||
ToBackend(commands[i])->Execute();
|
||||
}
|
||||
TRACE_EVENT_END0(GetDevice()->GetPlatform(), Recording, "CommandBufferGL::Execute");
|
||||
|
||||
device->SubmitFenceSync();
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user