r300: Remove unused variable r300_tex_obj::dirty_state and related defines
authorNicolai Haehnle <nhaehnle@gmail.com>
Fri, 6 Jun 2008 19:13:12 +0000 (21:13 +0200)
committerNicolai Haehnle <nhaehnle@gmail.com>
Fri, 6 Jun 2008 19:34:34 +0000 (21:34 +0200)
This variable was only ever written to, but nobody used its value.

src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_tex.c
src/mesa/drivers/dri/r300/r300_texmem.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/r300/radeon_context.h

index a5ec5ee46e24071213868fb97dec5fbadaba2351..b33dfeafdd6173c8f2d0f8930229a1241d5bbf69 100644 (file)
@@ -179,13 +179,6 @@ struct r300_tex_obj {
        GLuint bufAddr;         /* Offset to start of locally
                                   shared texture block */
 
-       GLuint dirty_state;     /* Flags (1 per texunit) for
-                                  whether or not this texobj
-                                  has dirty hardware state
-                                  (pp_*) that needs to be
-                                  brought into the
-                                  texunit. */
-
        drm_radeon_tex_image_t image[6][RADEON_MAX_TEXTURE_LEVELS];
        /* Six, for the cube faces */
 
index 0b4acec044825935a35cf17b7b81022a6dc42c86..606c3f8a90a347bfd24085899fb4d50ca54c7290 100644 (file)
@@ -1077,7 +1077,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
                break;
 
        case GL_DEPTH_TEXTURE_MODE:
-               if (texObj->Image[0][texObj->BaseLevel]->TexFormat->BaseFormat 
+               if (texObj->Image[0][texObj->BaseLevel]->TexFormat->BaseFormat
                    == GL_DEPTH_COMPONENT) {
                        r300SetDepthTexMode(texObj);
                        break;
@@ -1092,10 +1092,6 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
        default:
                return;
        }
-
-       /* Mark this texobj as dirty (one bit per tex unit)
-        */
-       t->dirty_state = TEX_ALL;
 }
 
 static void r300BindTexture(GLcontext * ctx, GLenum target,
index 723601ac4a6bc1f1d7d3214f774b499c6fc0e88f..e0fda86ac8b70089625215a010a6128eb7b8a9ce 100644 (file)
@@ -534,10 +534,6 @@ int r300UploadTexImages(r300ContextPtr rmesa, r300TexObjPtr t, GLuint face)
                        /* hope it's safe to add that here... */
                        t->offset |= t->tile_bits;
                }
-
-               /* Mark this texobj as dirty on all units:
-                */
-               t->dirty_state = TEX_ALL;
        }
 
        /* Let the world know we've used this memory recently.
index 78fa75228e721aaee91e41dd54698c57707ded0b..131d9580050cb8645441729f95ba368275f5026a 100644 (file)
@@ -428,10 +428,6 @@ static void r300SetTexImages(r300ContextPtr rmesa,
            if (tObj->Image[0][t->base.firstLevel]->Height > 2048)
                t->pitch_reg |= R500_TXHEIGHT_BIT11;
        }
-
-       t->dirty_state = TEX_ALL;
-
-       /* FYI: r300UploadTexImages( rmesa, t ) used to be called here */
 }
 
 /* ================================================================
@@ -568,7 +564,6 @@ static GLboolean r300UpdateTexture(GLcontext * ctx, int unit)
 
                rmesa->state.texture.unit[unit].texobj = t;
                t->base.bound |= (1 << unit);
-               t->dirty_state |= 1 << unit;
                driUpdateTextureLRU((driTextureObject *) t);    /* XXX: should be locked! */
        }
 
index 38d893060169f6417a6b3197ef8c30ff9467d44f..7458d63723f706b20ec206e95e5938e575eb5ce9 100644 (file)
@@ -53,16 +53,6 @@ struct radeon_context;
 typedef struct radeon_context radeonContextRec;
 typedef struct radeon_context *radeonContextPtr;
 
-#define TEX_0   0x1
-#define TEX_1   0x2
-#define TEX_2  0x4
-#define TEX_3  0x8
-#define TEX_4  0x10
-#define TEX_5  0x20
-#define TEX_6  0x40
-#define TEX_7  0x80
-#define TEX_ALL 0xff
-
 /* Rasterizing fallbacks */
 /* See correponding strings in r200_swtcl.c */
 #define RADEON_FALLBACK_TEXTURE                0x0001