From 1e1d5456ba3dff82301ad4bbdde2fb6e2f562fe3 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Sun, 12 Apr 2015 18:23:58 +0200 Subject: i965: Flush batchbuffer containing the query on glQueryCounter. This change fixes a regression with timer queries introduced with commit 3eb6258. There the pending batchbuffer is flushed only if glEndQuery is executed. This present change adds such a flush to glQueryCounter which also schedules a value query just like glEndQuery does. The patch fixes GPU timer queries going mad from within osgviewer. Reviewed-by: Kenneth Graunke Signed-off-by: Mathias Froehlich Cc: mesa-stable@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_queryobj.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c index 917a24f81d5..667c9009304 100644 --- a/src/mesa/drivers/dri/i965/brw_queryobj.c +++ b/src/mesa/drivers/dri/i965/brw_queryobj.c @@ -472,6 +472,8 @@ brw_query_counter(struct gl_context *ctx, struct gl_query_object *q) drm_intel_bo_unreference(query->bo); query->bo = drm_intel_bo_alloc(brw->bufmgr, "timestamp query", 4096, 4096); brw_write_timestamp(brw, query->bo, 0); + + query->flushed = false; } /** -- cgit v1.2.3