summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-10-31 21:52:56 +0000
committerBrian Paul <[email protected]>2005-10-31 21:52:56 +0000
commitffec105109f5b16bfe8282bd477d4aa32b550015 (patch)
treecb7680c14b8d0630b3075745aa9ec07889743643 /src/mesa/drivers/dri/savage
parentdcf4c17fb1624af47181c63af4c3ad29f919c17a (diff)
fix problems found with gcc 2.96 (bug 4934)
Diffstat (limited to 'src/mesa/drivers/dri/savage')
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.c4
-rw-r--r--src/mesa/drivers/dri/savage/savagerender.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/savage/savageioctl.c b/src/mesa/drivers/dri/savage/savageioctl.c
index 1906c78cc34..244959d64f9 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.c
+++ b/src/mesa/drivers/dri/savage/savageioctl.c
@@ -632,18 +632,18 @@ void savageFlushCmdBuf( savageContextPtr imesa, GLboolean discard )
static void savageDDFlush( GLcontext *ctx )
{
+ savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
if (SAVAGE_DEBUG & DEBUG_VERBOSE_MSG)
fprintf (stderr, "%s\n", __FUNCTION__);
- savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
savageFlushVertices (imesa);
savageFlushCmdBuf(imesa, GL_FALSE);
}
static void savageDDFinish( GLcontext *ctx )
{
+ savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
if (SAVAGE_DEBUG & DEBUG_VERBOSE_MSG)
fprintf (stderr, "%s\n", __FUNCTION__);
- savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
savageFlushVertices (imesa);
savageFlushCmdBuf(imesa, GL_FALSE);
WAIT_IDLE_EMPTY(imesa);
diff --git a/src/mesa/drivers/dri/savage/savagerender.c b/src/mesa/drivers/dri/savage/savagerender.c
index 9eda9a591e0..22e3f133962 100644
--- a/src/mesa/drivers/dri/savage/savagerender.c
+++ b/src/mesa/drivers/dri/savage/savagerender.c
@@ -246,11 +246,6 @@ static GLboolean run_texnorm_stage( GLcontext *ctx,
return GL_TRUE;
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
- if (!ctx->Texture.Unit[i]._ReallyEnabled ||
- VB->TexCoordPtr[i]->size == 4)
- /* Never try to normalize homogenous tex coords! */
- continue;
-
GLuint reallyEnabled = ctx->Texture.Unit[i]._ReallyEnabled;
struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current;
GLboolean normalizeS = (texObj->WrapS == GL_REPEAT);
@@ -261,6 +256,11 @@ static GLboolean run_texnorm_stage( GLcontext *ctx,
GLfloat (*out)[4] = store->texcoord[i].data;
GLint j;
+ if (!ctx->Texture.Unit[i]._ReallyEnabled ||
+ VB->TexCoordPtr[i]->size == 4)
+ /* Never try to normalize homogenous tex coords! */
+ continue;
+
if (normalizeS && normalizeT) {
/* take first texcoords as rough estimate of mean value */
GLfloat correctionS = -floor(in[0]+0.5);