mesa/formats: add more MESA_FORMAT_LAYOUTs
[mesa.git] / src / mesa / tnl_dd / t_dd_dmatmp.h
index 2424204b886f4f8e08f9fa4c8dfc4daa319967ff..7be39541e43821c3746b592e8db9f1d689d21187 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.1
  *
  * 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>
  */
 
 
@@ -73,7 +73,7 @@ do {                                          \
 
 
 #if (HAVE_ELTS)
-static void *TAG(emit_elts)( GLcontext *ctx, GLuint *elts, GLuint nr,
+static void *TAG(emit_elts)( struct gl_context *ctx, GLuint *elts, GLuint nr,
                             void *buf)
 {
    GLint i;
@@ -94,7 +94,7 @@ static void *TAG(emit_elts)( GLcontext *ctx, GLuint *elts, GLuint nr,
 }
 #endif
 
-static __inline void *TAG(emit_verts)( GLcontext *ctx, GLuint start, 
+static __inline void *TAG(emit_verts)( struct gl_context *ctx, GLuint start, 
                                     GLuint count, void *buf )
 {
    return EMIT_VERTS(ctx, start, count, buf);
@@ -104,7 +104,7 @@ static __inline void *TAG(emit_verts)( GLcontext *ctx, GLuint start,
  *                    Render non-indexed primitives.
  ***********************************************************************/
 
-static void TAG(render_points_verts)( GLcontext *ctx,
+static void TAG(render_points_verts)( struct gl_context *ctx,
                                      GLuint start,
                                      GLuint count,
                                      GLuint flags )
@@ -128,12 +128,12 @@ static void TAG(render_points_verts)( GLcontext *ctx,
       }
 
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
-static void TAG(render_lines_verts)( GLcontext *ctx,
+static void TAG(render_lines_verts)( struct gl_context *ctx,
                                     GLuint start,
                                     GLuint count,
                                     GLuint flags )
@@ -163,13 +163,13 @@ static void TAG(render_lines_verts)( GLcontext *ctx,
       }
 
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_line_strip_verts)( GLcontext *ctx,
+static void TAG(render_line_strip_verts)( struct gl_context *ctx,
                                          GLuint start,
                                          GLuint count,
                                          GLuint flags )
@@ -195,13 +195,13 @@ static void TAG(render_line_strip_verts)( GLcontext *ctx,
       FLUSH();
 
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_line_loop_verts)( GLcontext *ctx,
+static void TAG(render_line_loop_verts)( struct gl_context *ctx,
                                         GLuint start,
                                         GLuint count,
                                         GLuint flags )
@@ -261,13 +261,13 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
       FLUSH();
 
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_triangles_verts)( GLcontext *ctx,
+static void TAG(render_triangles_verts)( struct gl_context *ctx,
                                         GLuint start,
                                         GLuint count,
                                         GLuint flags )
@@ -298,7 +298,7 @@ static void TAG(render_triangles_verts)( GLcontext *ctx,
 
 
 
-static void TAG(render_tri_strip_verts)( GLcontext *ctx,
+static void TAG(render_tri_strip_verts)( struct gl_context *ctx,
                                         GLuint start,
                                         GLuint count,
                                         GLuint flags )
@@ -331,12 +331,12 @@ static void TAG(render_tri_strip_verts)( GLcontext *ctx,
       FLUSH();
 
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
-static void TAG(render_tri_fan_verts)( GLcontext *ctx,
+static void TAG(render_tri_fan_verts)( struct gl_context *ctx,
                                       GLuint start,
                                       GLuint count,
                                       GLuint flags )
@@ -370,13 +370,13 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
       /* Could write code to emit these as indexed vertices (for the
        * g400, for instance).
        */
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_poly_verts)( GLcontext *ctx,
+static void TAG(render_poly_verts)( struct gl_context *ctx,
                                    GLuint start,
                                    GLuint count,
                                    GLuint flags )
@@ -409,12 +409,12 @@ static void TAG(render_poly_verts)( GLcontext *ctx,
    else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
       TAG(render_tri_fan_verts)( ctx, start, count, flags );
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
-static void TAG(render_quad_strip_verts)( GLcontext *ctx,
+static void TAG(render_quad_strip_verts)( struct gl_context *ctx,
                                          GLuint start,
                                          GLuint count,
                                          GLuint flags )
@@ -500,7 +500,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
         /* Vertices won't fit in a single buffer or elts not
          * available - should never happen.
          */
-        fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+        fprintf(stderr, "%s - cannot draw primitive\n", __func__);
         return;
       }
    }
@@ -534,13 +534,13 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
       FLUSH();
 
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_quads_verts)( GLcontext *ctx,
+static void TAG(render_quads_verts)( struct gl_context *ctx,
                                     GLuint start,
                                     GLuint count,
                                     GLuint flags )
@@ -644,12 +644,12 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
    else {
       /* Vertices won't fit in a single buffer, should never happen.
        */
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
-static void TAG(render_noop)( GLcontext *ctx,
+static void TAG(render_noop)( struct gl_context *ctx,
                              GLuint start,
                              GLuint count,
                              GLuint flags )
@@ -680,7 +680,7 @@ static tnl_render_func TAG(render_tab_verts)[GL_POLYGON+2] =
  ****************************************************************************/
 
 #if (HAVE_ELTS)
-static void TAG(render_points_elts)( GLcontext *ctx,
+static void TAG(render_points_elts)( struct gl_context *ctx,
                                     GLuint start,
                                     GLuint count,
                                     GLuint flags )
@@ -705,14 +705,14 @@ static void TAG(render_points_elts)( GLcontext *ctx,
         currentsz = dmasz;
       }
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
 
-static void TAG(render_lines_elts)( GLcontext *ctx,
+static void TAG(render_lines_elts)( struct gl_context *ctx,
                                    GLuint start,
                                    GLuint count,
                                    GLuint flags )
@@ -743,13 +743,13 @@ static void TAG(render_lines_elts)( GLcontext *ctx,
         currentsz = dmasz;
       }
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_line_strip_elts)( GLcontext *ctx,
+static void TAG(render_line_strip_elts)( struct gl_context *ctx,
                                         GLuint start,
                                         GLuint count,
                                         GLuint flags )
@@ -777,13 +777,13 @@ static void TAG(render_line_strip_elts)( GLcontext *ctx,
    } else {
       /* TODO: Try to emit as indexed lines.
        */
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_line_loop_elts)( GLcontext *ctx,
+static void TAG(render_line_loop_elts)( struct gl_context *ctx,
                                        GLuint start,
                                        GLuint count,
                                        GLuint flags )
@@ -845,7 +845,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
       FLUSH();
    } else {
       /* TODO: Try to emit as indexed lines */
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
@@ -855,7 +855,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
  * buffers.  For elts, this is probably no better (worse?) than the
  * standard path.
  */
-static void TAG(render_triangles_elts)( GLcontext *ctx,
+static void TAG(render_triangles_elts)( struct gl_context *ctx,
                                        GLuint start,
                                        GLuint count,
                                        GLuint flags )
@@ -889,7 +889,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx,
 
 
 
-static void TAG(render_tri_strip_elts)( GLcontext *ctx,
+static void TAG(render_tri_strip_elts)( struct gl_context *ctx,
                                        GLuint start,
                                        GLuint count,
                                        GLuint flags )
@@ -922,12 +922,12 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx,
       }
    } else {
       /* TODO: try to emit as indexed triangles */
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
-static void TAG(render_tri_fan_elts)( GLcontext *ctx,
+static void TAG(render_tri_fan_elts)( struct gl_context *ctx,
                                      GLuint start,
                                      GLuint count,
                                      GLuint flags )
@@ -959,13 +959,13 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx,
       }
    } else {
       /* TODO: try to emit as indexed triangles */
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
 
-static void TAG(render_poly_elts)( GLcontext *ctx,
+static void TAG(render_poly_elts)( struct gl_context *ctx,
                                   GLuint start,
                                   GLuint count,
                                   GLuint flags )
@@ -998,12 +998,12 @@ static void TAG(render_poly_elts)( GLcontext *ctx,
    } else if (HAVE_TRI_FANS && ctx->Light.ShadeModel == GL_SMOOTH) {
       TAG(render_tri_fan_verts)( ctx, start, count, flags );
    } else {
-      fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__);
+      fprintf(stderr, "%s - cannot draw primitive\n", __func__);
       return;
    }
 }
 
-static void TAG(render_quad_strip_elts)( GLcontext *ctx,
+static void TAG(render_quad_strip_elts)( struct gl_context *ctx,
                                         GLuint start,
                                         GLuint count,
                                         GLuint flags )
@@ -1071,7 +1071,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
 }
 
 
-static void TAG(render_quads_elts)( GLcontext *ctx,
+static void TAG(render_quads_elts)( struct gl_context *ctx,
                                    GLuint start,
                                    GLuint count,
                                    GLuint flags )
@@ -1173,7 +1173,7 @@ static tnl_render_func TAG(render_tab_elts)[GL_POLYGON+2] =
 /* Pre-check the primitives in the VB to prevent the need for
  * fallbacks later on.
  */
-static GLboolean TAG(validate_render)( GLcontext *ctx,
+static GLboolean TAG(validate_render)( struct gl_context *ctx,
                                       struct vertex_buffer *VB )
 {
    GLint i;
@@ -1256,7 +1256,7 @@ static GLboolean TAG(validate_render)( GLcontext *ctx,
       }
       
       if (!ok) {
-/*      fprintf(stderr, "not ok %s\n", _mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK)); */
+/*      fprintf(stderr, "not ok %s\n", _mesa_enum_to_string(prim & PRIM_MODE_MASK)); */
         return GL_FALSE;
       }
    }