diff options
author | Ville Syrjälä <[email protected]> | 2015-03-23 14:47:34 +0200 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-10-06 11:36:37 -0700 |
commit | 3bcc780126ec3a479429a42befa27f141ebf8d48 (patch) | |
tree | 34d703ced00f18a33f71725fc95239955d170730 /src/mesa/drivers/dri/i915/intel_context.c | |
parent | ea8b77e892cdf6aa4cdd8a9ff312c422b3509ae7 (diff) |
i915: Drop broken front_buffer_reading/drawing optimization
Bring the following commit over to i915:
commit ec542d74578bbef6b55125dd6aba1dc7f5079e65
Author: Eric Anholt <[email protected]>
Date: Mon Mar 3 10:43:10 2014 -0800
i965: Drop broken front_buffer_reading/drawing optimization.
Not sure if it might fix anything, but since the i965 and i915 used to
share a bunch of that code, it would seem reasonable the same problems
could be present in the i915 code still, and the i965 approach is well
tested by now so bringing it over seems fairly safe.
No piglit regressions on 855.
v2: Rebase on _mesa_is_front_buffer_* refactor.
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_context.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 6c737ea6877..644bede9d47 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -243,7 +243,7 @@ intel_prepare_render(struct intel_context *intel) * that will happen next will probably dirty the front buffer. So * mark it as dirty here. */ - if (intel->is_front_buffer_rendering) + if (_mesa_is_front_buffer_drawing(intel->ctx.DrawBuffer)) intel->front_buffer_dirty = true; /* Wait for the swapbuffers before the one we just emitted, so we @@ -356,7 +356,7 @@ intel_glFlush(struct gl_context *ctx) intel_flush(ctx); intel_flush_front(ctx); - if (intel->is_front_buffer_rendering) + if (_mesa_is_front_buffer_drawing(ctx->DrawBuffer)) intel->need_throttle = true; } @@ -700,8 +700,8 @@ intel_query_dri2_buffers(struct intel_context *intel, back_rb = intel_get_renderbuffer(fb, BUFFER_BACK_LEFT); memset(attachments, 0, sizeof(attachments)); - if ((intel->is_front_buffer_rendering || - intel->is_front_buffer_reading || + if ((_mesa_is_front_buffer_drawing(fb) || + _mesa_is_front_buffer_reading(fb) || !back_rb) && front_rb) { /* If a fake front buffer is in use, then querying for * __DRI_BUFFER_FRONT_LEFT will cause the server to copy the image from @@ -866,8 +866,10 @@ intel_update_image_buffers(struct intel_context *intel, __DRIdrawable *drawable) else return; - if ((intel->is_front_buffer_rendering || intel->is_front_buffer_reading || !back_rb) && front_rb) + if (front_rb && (_mesa_is_front_buffer_drawing(fb) || + _mesa_is_front_buffer_reading(fb) || !back_rb)) { buffer_mask |= __DRI_IMAGE_BUFFER_FRONT; + } if (back_rb) buffer_mask |= __DRI_IMAGE_BUFFER_BACK; |