r300: cleanup swtcl a little
authorMaciej Cencora <m.cencora@gmail.com>
Thu, 19 Mar 2009 20:17:01 +0000 (21:17 +0100)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 25 Mar 2009 19:41:28 +0000 (12:41 -0700)
- remove disabled code
- silence compiler warnings (uinitialized values)
- remove unneeded code

src/mesa/drivers/dri/r300/r300_swtcl.c

index d463ab3a2d68483b46e6b77800224dbe3358354f..ba3621b16b232bef0d8f2774d427f0fa9da49f2f 100644 (file)
@@ -504,7 +504,7 @@ do {                                                        \
 
 #define LOCAL_VARS(n)                                                  \
    r300ContextPtr rmesa = R300_CONTEXT(ctx);                   \
-   GLuint color[n], spec[n];                                           \
+   GLuint color[n] = { 0, }, spec[n] = { 0, };                         \
    GLuint coloroffset = rmesa->swtcl.coloroffset;      \
    GLuint specoffset = rmesa->swtcl.specoffset;                        \
    (void) color; (void) spec; (void) coloroffset; (void) specoffset;
@@ -629,7 +629,6 @@ static void r300ChooseRenderState( GLcontext *ctx )
 static void r300RenderStart(GLcontext *ctx)
 {
         r300ContextPtr rmesa = R300_CONTEXT( ctx );
-       //      fprintf(stderr, "%s\n", __FUNCTION__);
 
        r300ChooseRenderState(ctx);
        r300SetVertexFormat(ctx);
@@ -669,8 +668,6 @@ static void r300RenderPrimitive(GLcontext *ctx, GLenum prim)
          return;
 
        r300RasterPrimitive( ctx, reduced_prim[prim] );
-       //      fprintf(stderr, "%s\n", __FUNCTION__);
-
 }
 
 static void r300ResetLineStipple(GLcontext *ctx)
@@ -713,11 +710,6 @@ void r300InitSwtcl(GLcontext *ctx)
 
        _tnl_need_projected_coords( ctx, GL_FALSE );
        r300ChooseRenderState(ctx);
-
-       _mesa_validate_all_lighting_tables( ctx );
-
-       tnl->Driver.NotifyMaterialChange =
-         _mesa_validate_all_lighting_tables;
 }
 
 void r300DestroySwtcl(GLcontext *ctx)