summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-05-10 15:58:06 -0400
committerKristian Høgsberg <[email protected]>2010-05-10 17:48:11 -0400
commit32942d2b1c80d3f16048d6acfedf7dbcf5e2f8cb (patch)
treeb21eb6a99d734513828fff9aa0ac0f4c08b6673a /src/mesa/drivers/dri
parent2d00d16da7f5d2255cb37b48edaf4cbb9ca7e930 (diff)
intel: Mark frontbuffer dirty in intel_prepare_render()
Now that we have intel_prepare_render() in place, we can use it to mark the front buffer dirty if we're rendering to the front buffer once we get there.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 8c947c41b44..8a38ac12aa0 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -403,6 +403,13 @@ intel_prepare_render(struct intel_context *intel)
intel_update_renderbuffers(driContext, drawable);
driContext->dri2.read_stamp = drawable->dri2.stamp;
}
+
+ /* If we're currently rendering to the front buffer, the rendering
+ * that will happen next will probably dirty the front buffer. So
+ * mark it as dirty here.
+ */
+ if (intel->is_front_buffer_rendering)
+ intel->front_buffer_dirty = GL_TRUE;
}
void
@@ -494,15 +501,7 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
(*screen->dri2.loader->flushFrontBuffer)(driContext->driDrawablePriv,
driContext->driDrawablePriv->loaderPrivate);
- /* Only clear the dirty bit if front-buffer rendering is no longer
- * enabled. This is done so that the dirty bit can only be set in
- * glDrawBuffer. Otherwise the dirty bit would have to be set at
- * each of N places that do rendering. This has worse performances,
- * but it is much easier to get correct.
- */
- if (!intel->is_front_buffer_rendering) {
- intel->front_buffer_dirty = GL_FALSE;
- }
+ intel->front_buffer_dirty = GL_FALSE;
}
}
}