]> git.cworth.org Git - apitrace/blobdiff - common/trace_profiler.hpp
Move trace::findWrapper to trace_resource.cpp
[apitrace] / common / trace_profiler.hpp
index 42fd032008ca668b4fe3767947b092005996f426..d8332420c63fc6ce622fd300315d275a85ba0db2 100644 (file)
@@ -34,17 +34,10 @@ namespace trace
 {
 
 struct Profile {
-    struct CpuCall {
+    struct Call {
         unsigned no;
 
-        int64_t cpuStart;
-        int64_t cpuDuration;
-
-        std::string name;
-    };
-
-    struct DrawCall {
-        unsigned no;
+        unsigned program;
 
         int64_t gpuStart;
         int64_t gpuDuration;
@@ -65,6 +58,12 @@ struct Profile {
 
         int64_t cpuStart;
         int64_t cpuDuration;
+
+        /* Indices to profile->calls array */
+        struct {
+            unsigned begin;
+            unsigned end;
+        } calls;
     };
 
     struct Program {
@@ -73,12 +72,14 @@ struct Profile {
         uint64_t gpuTotal;
         uint64_t cpuTotal;
         uint64_t pixelTotal;
-        std::vector<DrawCall> drawCalls;
+
+        /* Indices to profile->calls array */
+        std::vector<unsigned> calls;
     };
 
+    std::vector<Call> calls;
     std::vector<Frame> frames;
     std::vector<Program> programs;
-    std::vector<CpuCall> cpuCalls;
 };
 
 class Profiler