Merge branch 'mesa_7_7_branch'
[mesa.git] / src / mesa / drivers / dri / ffb / ffb_tris.c
index 63113f09ce702782cde6c29c14dd26e29cf784be..e7dd960ba16540799a5aa812d4e6089613d4a0cc 100644 (file)
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c,v 1.3 2002/10/30 12:51:28 alanh Exp $
+/* 
  *
  * GLX Hardware Device Driver for Sun Creator/Creator3D
  * Copyright (C) 2000, 2001 David S. Miller
  *    David S. Miller <davem@redhat.com>
  */
 
-#include "glheader.h"
-#include "mtypes.h"
-#include "macros.h"
-#include "mmath.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
+#include "main/macros.h"
 #include "swrast/swrast.h"
-#include "swrast_setup/swrast_setup.h"
 #include "swrast/s_context.h"
+#include "swrast_setup/swrast_setup.h"
 #include "tnl/t_context.h"
 #include "tnl/t_pipeline.h"
 
@@ -139,10 +138,10 @@ static void ffb_translate_vertex(GLcontext *ctx, const ffb_vertex *src,
        const GLfloat ty = m[13];
        const GLfloat tz = m[14];
 
-       dst->win[0] = sx * src->x + tx;
-       dst->win[1] = sy * src->y + ty;
-       dst->win[2] = sz * src->z + tz;
-       dst->win[3] = 1.0;
+       dst->attrib[FRAG_ATTRIB_WPOS][0] = sx * src->x + tx;
+       dst->attrib[FRAG_ATTRIB_WPOS][1] = sy * src->y + ty;
+       dst->attrib[FRAG_ATTRIB_WPOS][2] = sz * src->z + tz;
+       dst->attrib[FRAG_ATTRIB_WPOS][3] = 1.0;
       
        dst->color[0] = FFB_UBYTE_FROM_COLOR(src->color[0].red);
        dst->color[1] = FFB_UBYTE_FROM_COLOR(src->color[0].green);
@@ -307,8 +306,8 @@ static void ffbRasterPrimitive(GLcontext *ctx, GLenum rprim);
 #define FFB_MAX_TRIFUNC        0x08
 
 static struct {
-       triangle_func triangle;
-       quad_func quad;
+       tnl_triangle_func triangle;
+       tnl_quad_func quad;
 } rast_tab[FFB_MAX_TRIFUNC];
 
 #define DO_OFFSET   (IND & FFB_OFFSET_BIT)
@@ -353,7 +352,7 @@ static struct {
 #define LOCAL_VARS(n)                          \
    ffbContextPtr fmesa = FFB_CONTEXT(ctx);     \
    __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \
-   ffb_color color[n];                         \
+   ffb_color color[n] = { { 0 } };             \
    (void) color; (void) dPriv;
 
 /***********************************************************************
@@ -550,13 +549,13 @@ static void init_render_tab(void)
                render_tab_flat_alpha_tricull_elt;
 
        for (i = 0; i < MAX_FFB_RENDER_FUNCS; i++) {
-               render_func *rf = render_tabs[i];
-               render_func *rfe = render_tabs_elt[i];
+               tnl_render_func *rf = render_tabs[i];
+               tnl_render_func *rfe = render_tabs_elt[i];
 
                if (i & FFB_TRI_CULL_BIT) {
                        int from_idx = (i & ~FFB_TRI_CULL_BIT);
-                       render_func *rf_from = render_tabs[from_idx];
-                       render_func *rfe_from = render_tabs_elt[from_idx];
+                       tnl_render_func *rf_from = render_tabs[from_idx];
+                       tnl_render_func *rfe_from = render_tabs_elt[from_idx];
                        int j;
 
                        for (j = GL_POINTS; j < GL_TRIANGLES; j++) {