summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2005-10-24 10:24:23 +0000
committerEric Anholt <[email protected]>2005-10-24 10:24:23 +0000
commit414b742c97301e3894278ef9e821ebb1100d22f8 (patch)
treeb25961b075d0d397dd08dbf66b3296269be9eb77 /src/mesa
parent60b639b9a6df6e53997d3c8acdb768229b654a5f (diff)
Since we memcpy texture data synchronously to the card, idle the engine before
we start copying. I haven't seen it go wrong before, but I'm pretty sure this fix is correct.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/sis/sis_tex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c
index e2b7e93b807..a97bed833a2 100644
--- a/src/mesa/drivers/dri/sis/sis_tex.c
+++ b/src/mesa/drivers/dri/sis/sis_tex.c
@@ -380,6 +380,7 @@ static void sisTexImage1D( GLcontext *ctx, GLenum target, GLint level,
sisAllocTexImage(smesa, t, level, texImage);
/* Upload the texture */
+ WaitEngIdle(smesa);
memcpy(t->image[level].Data, texImage->Data, t->image[level].size);
if (smesa->PrevTexFormat[ctx->Texture.CurrentUnit] != t->format)
@@ -422,6 +423,7 @@ static void sisTexSubImage1D( GLcontext *ctx,
sisAllocTexImage(smesa, t, level, texImage);
/* Upload the texture */
+ WaitEngIdle(smesa);
texelBytes = texImage->TexFormat->TexelBytes;
copySize = width * texelBytes;
@@ -465,6 +467,7 @@ static void sisTexImage2D( GLcontext *ctx, GLenum target, GLint level,
sisAllocTexImage(smesa, t, level, texImage);
/* Upload the texture */
+ WaitEngIdle(smesa);
memcpy(t->image[level].Data, texImage->Data, t->image[level].size);
if (smesa->PrevTexFormat[ctx->Texture.CurrentUnit] != t->format)
@@ -508,6 +511,7 @@ static void sisTexSubImage2D( GLcontext *ctx,
sisAllocTexImage(smesa, t, level, texImage);
/* Upload the texture */
+ WaitEngIdle(smesa);
texelBytes = texImage->TexFormat->TexelBytes;
copySize = width * texelBytes;