fix up radeon span functions using latest r200 code from Brian,
[mesa.git] / src / mesa / drivers / dri / i915 / intel_tris.c
index 07d987880829cd2f6e5960f56efc667eb206996d..bb0a7713e605f42b8a5e490e0e2474a8dcc18348 100644 (file)
@@ -3,6 +3,26 @@
  * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
  * All Rights Reserved.
  * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ * 
+ * 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
  **************************************************************************/
 
 #include "glheader.h"
@@ -30,7 +50,7 @@ static void intelRasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim );
  *                    Emit primitives as inline vertices               *
  ***********************************************************************/
 
-#if 1
+#ifdef __i386__
 #define COPY_DWORDS( j, vb, vertsize, v )                      \
 do {                                                           \
    int __tmp;                                                  \
@@ -43,9 +63,9 @@ do {                                                          \
 #else
 #define COPY_DWORDS( j, vb, vertsize, v )      \
 do {                                           \
-   if (1) fprintf(stderr, "\n");       \
+   if (0) fprintf(stderr, "\n");       \
    for ( j = 0 ; j < vertsize ; j++ ) {                \
-      if (1) fprintf(stderr, "   -- v(%d): %x/%f\n",j, \
+      if (0) fprintf(stderr, "   -- v(%d): %x/%f\n",j, \
              ((GLuint *)v)[j],                 \
              ((GLfloat *)v)[j]);               \
       vb[j] = ((GLuint *)v)[j];                        \
@@ -265,10 +285,10 @@ do {                                              \
 
 
 static struct {
-   points_func         points;
-   line_func           line;
-   triangle_func       triangle;
-   quad_func           quad;
+   tnl_points_func             points;
+   tnl_line_func               line;
+   tnl_triangle_func   triangle;
+   tnl_quad_func               quad;
 } rast_tab[INTEL_MAX_TRIFUNC];
 
 
@@ -622,7 +642,7 @@ void intelChooseRenderState(GLcontext *ctx)
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    intelContextPtr intel = INTEL_CONTEXT(ctx);
    GLuint flags = ctx->_TriangleCaps;
-   struct fragment_program *program = ctx->FragmentProgram.Current;
+   struct fragment_program *program = ctx->FragmentProgram._Current;
    GLboolean have_wpos = (program && (program->InputsRead & FRAG_BIT_WPOS));
    GLuint index = 0;