summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-05-31 09:45:49 -0700
committerPaul Berry <[email protected]>2013-06-07 13:42:34 -0700
commit9e3475b39ae34244045e0dcd6b98e1526c10c6bf (patch)
tree787937bf971747eb0ab243a065cfb25ac8edaaf1 /src/mesa
parent447df5eabac62d11740b23987cf91fb269bffcc6 (diff)
intel: flush fake front buffer if server is about to destroy it.
Fixes piglit test "spec/!OpenGL 1.0/gl-1.0-front-invalidate-back" Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 7f8a2bbfa8c..09b33b142ed 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -925,6 +925,15 @@ intel_query_dri2_buffers(struct intel_context *intel,
attachments[i++] = __DRI_BUFFER_FRONT_LEFT;
attachments[i++] = intel_bits_per_pixel(front_rb);
+ } else if (front_rb && intel->front_buffer_dirty) {
+ /* We have pending front buffer rendering, but we aren't querying for a
+ * front buffer. If the front buffer we have is a fake front buffer,
+ * the X server is going to throw it away when it processes the query.
+ * So before doing the query, make sure all the pending drawing has
+ * landed in the real front buffer.
+ */
+ intel_flush(&intel->ctx);
+ intel_flush_front(&intel->ctx);
}
if (back_rb) {