]> git.cworth.org Git - apitrace/blobdiff - retrace/retrace_main.cpp
Add support for basic GPU profiling of draw calls to retrace.
[apitrace] / retrace / retrace_main.cpp
index f7fb7113e4178cb757fb6eefe73a13c1c3855cdc..164a596d4861830b775f73593e3f62b9b883a494 100644 (file)
@@ -49,11 +49,13 @@ namespace retrace {
 
 
 trace::Parser parser;
+trace::Profiler profiler;
 
 
 int verbosity = 0;
 bool debug = true;
 bool profiling = false;
+bool profileGPU = false;
 bool dumpingState = false;
 
 
@@ -61,7 +63,7 @@ bool doubleBuffer = true;
 bool coreProfile = false;
 
 
-static unsigned frameNo = 0;
+unsigned frameNo = 0;
 
 
 void
@@ -233,6 +235,8 @@ int main(int argc, char **argv)
             retrace::debug = false;
             retrace::profiling = true;
             retrace::verbosity = -1;
+        } else if (!strcmp(arg, "-pgpu")) {
+            retrace::profileGPU = true;
         } else if (!strcmp(arg, "-c")) {
             comparePrefix = argv[++i];
             if (compareFrequency.empty()) {