Replace texobj->Complete with texobj->_Complete since it's a derived field.
authorBrian <brian.paul@tungstengraphics.com>
Mon, 11 Jun 2007 22:32:57 +0000 (16:32 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 11 Jun 2007 22:32:57 +0000 (16:32 -0600)
src/mesa/drivers/dri/i915tex/intel_tex_validate.c
src/mesa/drivers/dri/i965/intel_tex_validate.c
src/mesa/main/mtypes.h
src/mesa/main/teximage.c
src/mesa/main/texobj.c
src/mesa/main/texstate.c
src/mesa/swrast/s_texfilter.c

index 0ae4fee1ba073f050ebcd09cceeac4b9ecee1dbe..af18c26d55cd00ce3b09cfece487673cff46f8ad 100644 (file)
@@ -116,7 +116,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
 
    /* We know/require this is true by now: 
     */
-   assert(intelObj->base.Complete);
+   assert(intelObj->base._Complete);
 
    /* What levels must the tree include at a minimum?
     */
index cb23b9dd87922a4b0752205f98dc59960b0c8575..44ee94614d58822c5aa8d2c1f05b83b272c5eaa6 100644 (file)
@@ -138,7 +138,7 @@ GLuint intel_finalize_mipmap_tree( struct intel_context *intel,
    
    /* We know/require this is true by now: 
     */
-   assert(intelObj->base.Complete);
+   assert(intelObj->base._Complete);
 
    /* What levels must the tree include at a minimum?
     */
index 7dfa94ee13d5c0a55d93fcf27d01eb46d74b4a35..05c08c19fec8398a8dcfa009d88f2651886e2d1c 100644 (file)
@@ -1434,7 +1434,7 @@ struct gl_texture_object
    GLint _MaxLevel;            /**< actual max mipmap level (q in the spec) */
    GLfloat _MaxLambda;         /**< = _MaxLevel - BaseLevel (q - b in spec) */
    GLboolean GenerateMipmap;    /**< GL_SGIS_generate_mipmap */
-   GLboolean Complete;         /**< Is texture object complete? */
+   GLboolean _Complete;                /**< Is texture object complete? */
 
    /** Actual texture images, indexed by [cube face] and [mipmap level] */
    struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS];
index 1f4c9f4722ca1680147a6fe8d70a83df3f3ac9ec..f315c3de74e1b1be0d82761c620cb51794c038c2 100644 (file)
@@ -2463,7 +2463,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
         update_fbo_texture(ctx, texObj, face, level);
         
         /* state update */
-        texObj->Complete = GL_FALSE;
+        texObj->_Complete = GL_FALSE;
         ctx->NewState |= _NEW_TEXTURE;
       }
    out:
@@ -2566,7 +2566,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
         update_fbo_texture(ctx, texObj, face, level);
 
         /* state update */
-        texObj->Complete = GL_FALSE;
+        texObj->_Complete = GL_FALSE;
         ctx->NewState |= _NEW_TEXTURE;
       }
    out:
@@ -2667,7 +2667,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
         update_fbo_texture(ctx, texObj, face, level);
 
         /* state update */
-        texObj->Complete = GL_FALSE;
+        texObj->_Complete = GL_FALSE;
         ctx->NewState |= _NEW_TEXTURE;
       }
    out:
@@ -2938,7 +2938,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
       update_fbo_texture(ctx, texObj, face, level);
 
       /* state update */
-      texObj->Complete = GL_FALSE;
+      texObj->_Complete = GL_FALSE;
       ctx->NewState |= _NEW_TEXTURE;
    }
  out:
@@ -3004,7 +3004,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
       update_fbo_texture(ctx, texObj, face, level);
 
       /* state update */
-      texObj->Complete = GL_FALSE;
+      texObj->_Complete = GL_FALSE;
       ctx->NewState |= _NEW_TEXTURE;
    }
  out:
@@ -3398,7 +3398,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
                                             texObj, texImage);
 
         /* state update */
-        texObj->Complete = GL_FALSE;
+        texObj->_Complete = GL_FALSE;
         ctx->NewState |= _NEW_TEXTURE;
       }
    out:
@@ -3495,7 +3495,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
                                             texObj, texImage);
         
         /* state update */
-        texObj->Complete = GL_FALSE;
+        texObj->_Complete = GL_FALSE;
         ctx->NewState |= _NEW_TEXTURE;
       }
    out:
@@ -3591,7 +3591,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
                                             texObj, texImage);
         
         /* state update */
-        texObj->Complete = GL_FALSE;
+        texObj->_Complete = GL_FALSE;
         ctx->NewState |= _NEW_TEXTURE;
       }
    out:
index 0d2946e95a735854d3118c4cdeba16fcdc6df5b2..df64002f994308a8608ee7e46acd06b6936bcd4a 100644 (file)
@@ -209,7 +209,7 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
    dest->_MaxLambda = src->_MaxLambda;
    dest->GenerateMipmap = src->GenerateMipmap;
    dest->Palette = src->Palette;
-   dest->Complete = src->Complete;
+   dest->_Complete = src->_Complete;
 }
 
 
@@ -251,7 +251,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
    const GLint baseLevel = t->BaseLevel;
    GLint maxLog2 = 0, maxLevels = 0;
 
-   t->Complete = GL_TRUE;  /* be optimistic */
+   t->_Complete = GL_TRUE;  /* be optimistic */
 
    /* Always need the base level image */
    if (!t->Image[0][baseLevel]) {
@@ -259,7 +259,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
       _mesa_sprintf(s, "obj %p (%d) Image[baseLevel=%d] == NULL",
               (void *) t, t->Name, baseLevel);
       incomplete(t, s);
-      t->Complete = GL_FALSE;
+      t->_Complete = GL_FALSE;
       return;
    }
 
@@ -268,7 +268,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
        t->Image[0][baseLevel]->Height == 0 ||
        t->Image[0][baseLevel]->Depth == 0) {
       incomplete(t, "texture width = 0");
-      t->Complete = GL_FALSE;
+      t->_Complete = GL_FALSE;
       return;
    }
 
@@ -322,7 +322,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
         if (t->Image[face][baseLevel] == NULL ||
             t->Image[face][baseLevel]->Width2 != w ||
             t->Image[face][baseLevel]->Height2 != h) {
-           t->Complete = GL_FALSE;
+           t->_Complete = GL_FALSE;
            incomplete(t, "Non-quare cubemap image");
            return;
         }
@@ -339,7 +339,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
       GLint maxLevel = t->_MaxLevel;
 
       if (minLevel > maxLevel) {
-         t->Complete = GL_FALSE;
+         t->_Complete = GL_FALSE;
          incomplete(t, "minLevel > maxLevel");
          return;
       }
@@ -348,12 +348,12 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
       for (i = minLevel; i <= maxLevel; i++) {
          if (t->Image[0][i]) {
             if (t->Image[0][i]->TexFormat != t->Image[0][baseLevel]->TexFormat) {
-               t->Complete = GL_FALSE;
+               t->_Complete = GL_FALSE;
                incomplete(t, "Format[i] != Format[baseLevel]");
                return;
             }
             if (t->Image[0][i]->Border != t->Image[0][baseLevel]->Border) {
-               t->Complete = GL_FALSE;
+               t->_Complete = GL_FALSE;
                incomplete(t, "Border[i] != Border[baseLevel]");
                return;
             }
@@ -371,12 +371,12 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
             }
             if (i >= minLevel && i <= maxLevel) {
                if (!t->Image[0][i]) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "1D Image[0][i] == NULL");
                   return;
                }
                if (t->Image[0][i]->Width2 != width ) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "1D Image[0][i] bad width");
                   return;
                }
@@ -400,17 +400,17 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
             }
             if (i >= minLevel && i <= maxLevel) {
                if (!t->Image[0][i]) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "2D Image[0][i] == NULL");
                   return;
                }
                if (t->Image[0][i]->Width2 != width) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "2D Image[0][i] bad width");
                   return;
                }
                if (t->Image[0][i]->Height2 != height) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "2D Image[0][i] bad height");
                   return;
                }
@@ -438,26 +438,26 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
             if (i >= minLevel && i <= maxLevel) {
                if (!t->Image[0][i]) {
                   incomplete(t, "3D Image[0][i] == NULL");
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   return;
                }
                if (t->Image[0][i]->_BaseFormat == GL_DEPTH_COMPONENT) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
                   return;
                }
                if (t->Image[0][i]->Width2 != width) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "3D Image[0][i] bad width");
                   return;
                }
                if (t->Image[0][i]->Height2 != height) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "3D Image[0][i] bad height");
                   return;
                }
                if (t->Image[0][i]->Depth2 != depth) {
-                  t->Complete = GL_FALSE;
+                  t->_Complete = GL_FALSE;
                   incomplete(t, "3D Image[0][i] bad depth");
                   return;
                }
@@ -483,20 +483,20 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
               for (face = 0; face < 6; face++) {
                  /* check that we have images defined */
                  if (!t->Image[face][i]) {
-                    t->Complete = GL_FALSE;
+                    t->_Complete = GL_FALSE;
                     incomplete(t, "CubeMap Image[n][i] == NULL");
                     return;
                  }
                  /* Don't support GL_DEPTH_COMPONENT for cube maps */
                  if (t->Image[face][i]->_BaseFormat == GL_DEPTH_COMPONENT) {
-                    t->Complete = GL_FALSE;
+                    t->_Complete = GL_FALSE;
                     incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
                     return;
                  }
                  /* check that all six images have same size */
                  if (t->Image[face][i]->Width2!=width || 
                      t->Image[face][i]->Height2!=height) {
-                    t->Complete = GL_FALSE;
+                    t->_Complete = GL_FALSE;
                     incomplete(t, "CubeMap Image[n][i] bad size");
                     return;
                  }
index 18afaf4eddeafe97df548f1c5f844507d5739193..a951a024336e73ec267f1c333bf740eb98c52da9 100644 (file)
@@ -1552,7 +1552,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
          return;
    }
 
-   texObj->Complete = GL_FALSE;
+   texObj->_Complete = GL_FALSE;
 
    if (ctx->Driver.TexParameter) {
       (*ctx->Driver.TexParameter)( ctx, target, texObj, pname, params );
@@ -2839,10 +2839,10 @@ texture_override(GLcontext *ctx,
                  struct gl_texture_object *texObj, GLuint textureBit)
 {
    if (!texUnit->_ReallyEnabled && (enableBits & textureBit)) {
-      if (!texObj->Complete) {
+      if (!texObj->_Complete) {
          _mesa_test_texobj_completeness(ctx, texObj);
       }
-      if (texObj->Complete) {
+      if (texObj->_Complete) {
          texUnit->_ReallyEnabled = textureBit;
          texUnit->_Current = texObj;
       }
index d4516f6faa8929f040f2d0323eecb60d56e43389..c2a7512388ec904aa4b9fe960561373cfc16aafc 100644 (file)
@@ -3347,7 +3347,7 @@ texture_sample_func
 _swrast_choose_texture_sample_func( GLcontext *ctx,
                                    const struct gl_texture_object *t )
 {
-   if (!t || !t->Complete) {
+   if (!t || !t->_Complete) {
       return &null_sample_func;
    }
    else {