summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r600/r700_clear.c
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>2010-08-02 04:17:03 +0200
committerJerome Glisse <jglisse@redhat.com>2010-08-02 13:29:44 -0400
commit646d2e9fbc41bf49075013009e9583bec4a51168 (patch)
treee85b296ce4e1736cda0282d82f0297e9b06ab77e /src/mesa/drivers/dri/r600/r700_clear.c
parent3d39f56a8721ec6aa6d00965b7740fc8cb5edaae (diff)
radeon: Add DRI2 flush extension support, so we synchronize properly.
When a DRI2 swap buffer is pending we need to make sure we have the flush extension so radeon doesn't resume rendering to or reading from the not yet blitted front buffer. This fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28341 https://bugs.freedesktop.org/show_bug.cgi?id=28410 Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Diffstat (limited to 'src/mesa/drivers/dri/r600/r700_clear.c')
-rw-r--r--src/mesa/drivers/dri/r600/r700_clear.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_clear.c b/src/mesa/drivers/dri/r600/r700_clear.c
index 09c48565b6..d1008f28b9 100644
--- a/src/mesa/drivers/dri/r600/r700_clear.c
+++ b/src/mesa/drivers/dri/r600/r700_clear.c
@@ -48,6 +48,7 @@ static GLboolean r700ClearFast(context_t *context, GLbitfield mask)
void r700Clear(GLcontext * ctx, GLbitfield mask)
{
context_t *context = R700_CONTEXT(ctx);
+ radeonContextPtr radeon = &context->radeon;
__DRIdrawable *dPriv = radeon_get_drawable(&context->radeon);
const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask[0]);
GLbitfield swrast_mask = 0, tri_mask = 0;
@@ -60,6 +61,8 @@ void r700Clear(GLcontext * ctx, GLbitfield mask)
context->radeon.front_buffer_dirty = GL_TRUE;
}
+ radeon_prepare_render(radeon);
+
if( GL_TRUE == r700ClearFast(context, mask) )
{
return;