From: Eric Anholt Date: Mon, 24 Oct 2005 10:24:23 +0000 (+0000) Subject: Since we memcpy texture data synchronously to the card, idle the engine before X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=414b742c97301e3894278ef9e821ebb1100d22f8;p=mesa.git 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. --- 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;