1 //
2 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // DebugAnnotatorVk.h: Vulkan helpers for adding trace annotations.
7 //
8 
9 #ifndef LIBANGLE_RENDERER_VULKAN_DEBUGANNOTATORVK_H_
10 #define LIBANGLE_RENDERER_VULKAN_DEBUGANNOTATORVK_H_
11 
12 #include "libANGLE/LoggingAnnotator.h"
13 
14 namespace rx
15 {
16 
17 class DebugAnnotatorVk : public angle::LoggingAnnotator
18 {
19   public:
20     DebugAnnotatorVk();
21     ~DebugAnnotatorVk() override;
22     void beginEvent(gl::Context *context,
23                     angle::EntryPoint entryPoint,
24                     const char *eventName,
25                     const char *eventMessage) override;
26     void endEvent(gl::Context *context,
27                   const char *eventName,
28                   angle::EntryPoint entryPoint) override;
29     bool getStatus() override;
30 
31   private:
32     bool isDrawEntryPoint(angle::EntryPoint entryPoint) const;
33     bool isDispatchEntryPoint(angle::EntryPoint entryPoint) const;
34     bool isClearOrQueryEntryPoint(angle::EntryPoint entryPoint) const;
35 
36     // Note: To avoid any race conditions between threads, this class has no private data; all
37     // events are stored in ContextVk.
38 };
39 
40 }  // namespace rx
41 
42 #endif  // LIBANGLE_RENDERER_VULKAN_DEBUGANNOTATORVK_H_
43