summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/performance_monitor.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-11-13 17:12:37 -0800
committerKenneth Graunke <kenneth@whitecape.org>2013-11-17 18:51:07 -0800
commitbde5e4a1e64cd0ddd89556f654185d256743728f (patch)
treea2353a2974ff16fd502e6986c9ba539e0ef217b6 /src/mesa/main/performance_monitor.c
parenta6712f51093f24be08afe14f67e78518b3754266 (diff)
downloadexternal_mesa3d-bde5e4a1e64cd0ddd89556f654185d256743728f.zip
external_mesa3d-bde5e4a1e64cd0ddd89556f654185d256743728f.tar.gz
external_mesa3d-bde5e4a1e64cd0ddd89556f654185d256743728f.tar.bz2
mesa: Track whether a performance monitor has ever ended.
If a monitor has ended, it means a result should eventually become available, pending some flushing. This is distinct from !m->Active; if a monitor has not been started, then m->Active == false and m->Ended == false. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/performance_monitor.c')
-rw-r--r--src/mesa/main/performance_monitor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c
index 5a295b1..c168bf5 100644
--- a/src/mesa/main/performance_monitor.c
+++ b/src/mesa/main/performance_monitor.c
@@ -359,8 +359,10 @@ _mesa_DeletePerfMonitorsAMD(GLsizei n, GLuint *monitors)
if (m) {
/* Give the driver a chance to stop the monitor if it's active. */
- if (m->Active)
+ if (m->Active) {
ctx->Driver.ResetPerfMonitor(ctx, m);
+ m->Ended = false;
+ }
_mesa_HashRemove(ctx->PerfMonitor.Monitors, monitors[i]);
ralloc_free(m->ActiveGroups);
@@ -478,6 +480,7 @@ _mesa_BeginPerfMonitorAMD(GLuint monitor)
*/
if (ctx->Driver.BeginPerfMonitor(ctx, m)) {
m->Active = true;
+ m->Ended = false;
} else {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBeginPerfMonitor(driver unable to begin monitoring)");
@@ -507,6 +510,7 @@ _mesa_EndPerfMonitorAMD(GLuint monitor)
ctx->Driver.EndPerfMonitor(ctx, m);
m->Active = false;
+ m->Ended = true;
}
/**