mesa: treat Color._AdvancedBlendMode as enum
[mesa.git] / src / mesa / tnl / t_vb_texmat.c
index 38aa51fc496abf2f15d9ebb1bdf14f72f942cf76..cf8099509dcbe6a766e7334fa1ce36a01f085bea 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5
  *
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  *
  * Authors:
- *    Keith Whitwell <keith@tungstengraphics.com>
+ *    Keith Whitwell <keithw@vmware.com>
  */
 
 
 #include "main/glheader.h"
-#include "main/colormac.h"
 #include "main/macros.h"
-#include "main/imports.h"
+
 #include "main/mtypes.h"
 
 #include "math/m_xform.h"
@@ -60,7 +59,7 @@ static GLboolean run_texmat_stage( struct gl_context *ctx,
    struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
    GLuint i;
 
-   if (!ctx->Texture._TexMatEnabled || ctx->VertexProgram._Current) 
+   if (!ctx->Texture._TexMatEnabled || ctx->VertexProgram._Current)
       return GL_TRUE;
 
    /* ENABLE_TEXMAT implies that the texture matrix is not the
@@ -89,7 +88,7 @@ static GLboolean alloc_texmat_data( struct gl_context *ctx,
    struct texmat_stage_data *store;
    GLuint i;
 
-   stage->privatePtr = CALLOC(sizeof(*store));
+   stage->privatePtr = calloc(1, sizeof(*store));
    store = TEXMAT_STAGE_DATA(stage);
    if (!store)
       return GL_FALSE;
@@ -110,7 +109,7 @@ static void free_texmat_data( struct tnl_pipeline_stage *stage )
       for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++)
         if (store->texcoord[i].data)
            _mesa_vector4f_free( &store->texcoord[i] );
-      FREE( store );
+      free( store );
       stage->privatePtr = NULL;
    }
 }