summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_common.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 0614c89459..b5b4fed8fa 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -83,6 +83,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_lock.h"
#include "radeon_drm.h"
#include "radeon_mipmap_tree.h"
+#include "radeon_queryobj.h"
#define DEBUG_CMDBUF 0
@@ -1042,7 +1043,7 @@ void radeonFlush(GLcontext *ctx)
we have no DMA buffer allocated.
then no point flushing anything at all.
*/
- if (!radeon->dma.flush && !radeon->cmdbuf.cs->cdw && !radeon->dma.current)
+ if (!radeon->dma.flush && !radeon->cmdbuf.cs->cdw && is_empty_list(&radeon->dma.reserved))
return;
if (radeon->dma.flush)
@@ -1072,6 +1073,9 @@ void radeonFlush(GLcontext *ctx)
}
}
}
+
+ make_empty_list(&radeon->query.not_flushed_head);
+
}
/* Make sure all commands have been sent to the hardware and have
@@ -1128,6 +1132,8 @@ int rcommonFlushCmdBufLocked(radeonContextPtr rmesa, const char *caller)
__FUNCTION__, caller, rmesa->numClipRects);
}
+ radeonEmitQueryEnd(rmesa->glCtx);
+
if (rmesa->cmdbuf.cs->cdw) {
ret = radeon_cs_emit(rmesa->cmdbuf.cs);
rmesa->hw.all_dirty = GL_TRUE;
@@ -1146,7 +1152,7 @@ int rcommonFlushCmdBuf(radeonContextPtr rmesa, const char *caller)
{
int ret;
- radeonReleaseDmaRegion(rmesa);
+ radeonReleaseDmaRegions(rmesa);
LOCK_HARDWARE(rmesa);
ret = rcommonFlushCmdBufLocked(rmesa, caller);