diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-01-31 17:18:32 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-01-31 17:18:32 +0000 |
commit | d217c94eb378e1c4387371da4e011d2e2f68d0e0 (patch) | |
tree | 9428c65293724ac5fcfb97851cdf791907b42567 | |
parent | 057735e0e3e097b752edaca78aa2032b92b8decd (diff) |
Flush dma and clear texture caches on glTexSubImage() calls.
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_tex.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c index fc19dec149..cbb41078a3 100644 --- a/src/mesa/drivers/dri/unichrome/via_tex.c +++ b/src/mesa/drivers/dri/unichrome/via_tex.c @@ -382,7 +382,6 @@ static GLboolean viaUpdateTexUnit(GLcontext *ctx, GLuint unit) /* Upload teximages (not pipelined) */ if (t->dirtyImages) { - VIA_FLUSH_DMA(vmesa); if (!viaSetTexImages(vmesa, tObj)) { if (VIA_DEBUG & DEBUG_TEXTURE) fprintf(stderr, "viaSetTexImages failed for unit %d\n", unit); @@ -569,7 +568,7 @@ static void viaTexImage(GLcontext *ctx, } vmesa->clearTexCache = 1; - + t->dirtyImages |= (1<<level); pixels = _mesa_validate_pbo_teximage(ctx, dims, width, height, 1, format, type, pixels, packing, "glTexImage"); @@ -637,15 +636,14 @@ static void viaTexSubImage2D(GLcontext *ctx, struct gl_texture_object *texObj, struct gl_texture_image *texImage) { - struct via_texture_object *t = texObj->DriverData; - - if (t) { - t->dirtyImages |= (1<<level); - } + viaContextPtr vmesa = VIA_CONTEXT(ctx); + + VIA_FLUSH_DMA(vmesa); + vmesa->clearTexCache = 1; - _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, - height, format, type, pixels, packing, texObj, - texImage); + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); } static void viaTexImage1D(GLcontext *ctx, @@ -674,15 +672,14 @@ static void viaTexSubImage1D(GLcontext *ctx, struct gl_texture_object *texObj, struct gl_texture_image *texImage) { - struct via_texture_object *t = texObj->DriverData; - - if (t) { - t->dirtyImages |= (1<<level); - } + viaContextPtr vmesa = VIA_CONTEXT(ctx); + + VIA_FLUSH_DMA(vmesa); + vmesa->clearTexCache = 1; - _mesa_store_texsubimage1d(ctx, target, level, xoffset, width, - format, type, pixels, packing, texObj, - texImage); + _mesa_store_texsubimage1d(ctx, target, level, xoffset, width, + format, type, pixels, packing, texObj, + texImage); } |