[Mesa-dev] [PATCH 22/51] i965: Refactor batch flush into intel_front_flush()
Chris Wilson
chris at chris-wilson.co.uk
Tue Jan 10 21:23:45 UTC 2017
Since we always flush the intel_batchbuffer before calling
intel_front_flush(), simply more that call into intel_front_flush()
itself.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
src/mesa/drivers/dri/i965/brw_context.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 1f5e0c86af..f4826fe727 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -378,8 +378,7 @@ intel_flush_front(struct gl_context *ctx)
__DRIscreen *const dri_screen = brw->screen->driScrnPriv;
if (brw->front_buffer_dirty && _mesa_is_winsys_fbo(ctx->DrawBuffer)) {
- if (flushFront(dri_screen) && driDrawable &&
- driDrawable->loaderPrivate) {
+ if (flushFront(dri_screen) && driDrawable && driDrawable->loaderPrivate) {
/* Resolve before flushing FAKE_FRONT_LEFT to FRONT_LEFT.
*
@@ -399,6 +398,8 @@ intel_flush_front(struct gl_context *ctx)
brw->front_buffer_dirty = false;
}
}
+
+ intel_batchbuffer_flush(brw);
}
static void
@@ -406,7 +407,6 @@ intel_glFlush(struct gl_context *ctx)
{
struct brw_context *brw = brw_context(ctx);
- intel_batchbuffer_flush(brw);
intel_flush_front(ctx);
brw->need_flush_throttle = true;
@@ -1540,7 +1540,6 @@ intel_query_dri2_buffers(struct brw_context *brw,
* query, we need to make sure all the pending drawing has landed in the
* real front buffer.
*/
- intel_batchbuffer_flush(brw);
intel_flush_front(&brw->ctx);
attachments[i++] = __DRI_BUFFER_FRONT_LEFT;
@@ -1552,7 +1551,6 @@ intel_query_dri2_buffers(struct brw_context *brw,
* So before doing the query, make sure all the pending drawing has
* landed in the real front buffer.
*/
- intel_batchbuffer_flush(brw);
intel_flush_front(&brw->ctx);
}
--
2.11.0
More information about the mesa-dev
mailing list