radeon/r200/r300: fix missing dma buffer validation
authorDave Airlie <airlied@redhat.com>
Tue, 7 Apr 2009 05:05:53 +0000 (15:05 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 7 Apr 2009 05:08:56 +0000 (15:08 +1000)
this make gnome shell run

src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/radeon/radeon_common.c
src/mesa/drivers/dri/radeon/radeon_state.c

index f040713980f7c736ffeb04fdfb5eaa5478dec1f5..1b9724d64299a91176c874ac68eb0f070ab2dfd5 100644 (file)
@@ -2308,6 +2308,9 @@ static GLboolean r200ValidateBuffers(GLcontext *ctx)
                           RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);
    }
 
+   if (rmesa->radeon.dma.current)
+      radeon_validate_bo(&rmesa->radeon, rmesa->radeon.dma.current, RADEON_GEM_DOMAIN_GTT, 0);
+
    return radeon_revalidate_bos(ctx);
 }
 
index 5a87b5da43d821ebd86674070affe8432c829a26..cf4cad73d29f1cb986792bed4e4828e242982d74 100644 (file)
@@ -313,6 +313,8 @@ GLboolean r300ValidateBuffers(GLcontext * ctx)
                        radeon_validate_bo(&rmesa->radeon, t->mt->bo,
                                           RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);
        }
+       if (rmesa->radeon.dma.current)
+               radeon_validate_bo(&rmesa->radeon, rmesa->radeon.dma.current, RADEON_GEM_DOMAIN_GTT, 0);
 
        return radeon_revalidate_bos(ctx);
 }
index a5b8d3253f864dde88873be6051cd94dcde14477..756c09fff3ba12fe7b9abfc4ecb6e18883f3df92 100644 (file)
@@ -789,14 +789,10 @@ void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
  */
 void radeonDrawBuffer( GLcontext *ctx, GLenum mode )
 {
-       radeonContextPtr radeon = RADEON_CONTEXT(ctx);
-       
        if (RADEON_DEBUG & DEBUG_DRI)
                fprintf(stderr, "%s %s\n", __FUNCTION__,
                        _mesa_lookup_enum_by_nr( mode ));
        
-       radeon_firevertices(radeon);    /* don't pipeline cliprect changes */
-       
        radeon_draw_buffer(ctx, ctx->DrawBuffer);
 }
 
index dcca326c667a38e9edbce41f960a5631bd1b6226..28eea444377f9963e639d755b9f0d89dd81c5a4e 100644 (file)
@@ -2082,6 +2082,10 @@ static GLboolean r100ValidateBuffers(GLcontext *ctx)
                           RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);
    }
 
+   if (rmesa->radeon.dma.current)
+       radeon_validate_bo(&rmesa->radeon, rmesa->radeon.dma.current,
+                         RADEON_GEM_DOMAIN_GTT, 0);
+
    return radeon_revalidate_bos(ctx);
 }