diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-01-22 23:12:21 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-01-22 23:31:18 +0000 |
commit | bb6634d322702f08600b88b54fb26eea59e22a5d (patch) | |
tree | 27d760ef37f2e97d3c744a446d9b8e69b772e2d1 /retrace/glretrace_main.cpp | |
parent | fe43ae7be35a0ccba915ea6dfa5f479419d01c40 (diff) |
glretrace: Move call no markers away from dumper interface.
Dumper is only for dumping state to JSON.
Diffstat (limited to 'retrace/glretrace_main.cpp')
-rwxr-xr-x | retrace/glretrace_main.cpp | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/retrace/glretrace_main.cpp b/retrace/glretrace_main.cpp index 01356628..3cc88370 100755 --- a/retrace/glretrace_main.cpp +++ b/retrace/glretrace_main.cpp @@ -143,6 +143,27 @@ checkGlError(trace::Call &call) { } } + +void +insertCallNoMarker(trace::Call &call, Context *currentContext) +{ + if (!currentContext || + !currentContext->KHR_debug) { + return; + } + + char *str; + int len = asprintf(&str, "%d:%s", call.no, call.name()); + if (len > 0) { + glDebugMessageInsert(GL_DEBUG_SOURCE_THIRD_PARTY, + GL_DEBUG_TYPE_MARKER, 0, + GL_DEBUG_SEVERITY_NOTIFICATION, + len, str); + } + free(str); +} + + static inline int64_t getCurrentTime(void) { if (retrace::profilingGpuTimes && supportsTimestamp) { @@ -767,23 +788,6 @@ public: dumpState(StateWriter &writer) { glstate::dumpCurrentContext(writer); } - - void - log(trace::Call &call) { - glretrace::Context *currentContext = glretrace::getCurrentContext(); - if (currentContext && currentContext->KHR_debug) { - char *str; - int len = asprintf(&str, "%d:%s", call.no, call.name()); - if (len > 0) { - glDebugMessageInsert(GL_DEBUG_SOURCE_THIRD_PARTY, - GL_DEBUG_TYPE_MARKER, 0, - GL_DEBUG_SEVERITY_NOTIFICATION, - len, str); - free(str); - } - } - } - }; static GLDumper glDumper; |