From: Dave Airlie Date: Tue, 7 Apr 2009 05:05:53 +0000 (+1000) Subject: radeon/r200/r300: fix missing dma buffer validation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86556f8bdab2c59a33619ecfda011bce8f047acb;p=mesa.git radeon/r200/r300: fix missing dma buffer validation this make gnome shell run --- diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index f040713980f..1b9724d6429 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -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); } diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index 5a87b5da43d..cf4cad73d29 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -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); } diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index a5b8d3253f8..756c09fff3b 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -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); } diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index dcca326c667..28eea444377 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -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); }