nir: use enum operator helper for nir_variable_mode and nir_metadata
[mesa.git] / src / mesa / tnl / t_vb_rendertmp.h
index 75f6f55bdceb4bfd0ecd507540fdb34984601267..4bfc6b15d3b538c76751e331d0817b818869af76 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5
  *
  * Copyright (C) 1999-2005  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>
  */
 
 
@@ -57,7 +57,7 @@
 #define RENDER_TAB_QUALIFIER static
 #endif
 
-static void TAG(render_points)( GLcontext *ctx,
+static void TAG(render_points)( struct gl_context *ctx,
                                GLuint start,
                                GLuint count,
                                GLuint flags )
@@ -70,7 +70,7 @@ static void TAG(render_points)( GLcontext *ctx,
    POSTFIX;
 }
 
-static void TAG(render_lines)( GLcontext *ctx,
+static void TAG(render_lines)( struct gl_context *ctx,
                               GLuint start,
                               GLuint count,
                               GLuint flags )
@@ -91,7 +91,7 @@ static void TAG(render_lines)( GLcontext *ctx,
 }
 
 
-static void TAG(render_line_strip)( GLcontext *ctx,
+static void TAG(render_line_strip)( struct gl_context *ctx,
                                    GLuint start,
                                    GLuint count,
                                    GLuint flags )
@@ -116,7 +116,7 @@ static void TAG(render_line_strip)( GLcontext *ctx,
 }
 
 
-static void TAG(render_line_loop)( GLcontext *ctx,
+static void TAG(render_line_loop)( struct gl_context *ctx,
                                   GLuint start,
                                   GLuint count,
                                   GLuint flags )
@@ -124,19 +124,19 @@ static void TAG(render_line_loop)( GLcontext *ctx,
    GLuint i;
    LOCAL_VARS;
 
-   (void) flags;
-
    INIT(GL_LINE_LOOP);
 
    if (start+1 < count) {
       if (TEST_PRIM_BEGIN(flags)) {
         RESET_STIPPLE;
+         /* draw the first line from v[0] to v[1] */
          if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT)
             RENDER_LINE( ELT(start), ELT(start+1) );
          else
             RENDER_LINE( ELT(start+1), ELT(start) );
       }
 
+      /* draw lines from v[1] to v[n-1] */
       for ( i = start+2 ; i < count ; i++) {
          if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT)
             RENDER_LINE( ELT(i-1), ELT(i) );
@@ -145,6 +145,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
       }
 
       if ( TEST_PRIM_END(flags)) {
+         /* draw final line from v[n-1] to v[0] (the very first vertex) */
          if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT)
             RENDER_LINE( ELT(count-1), ELT(start) );
          else
@@ -156,7 +157,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
 }
 
 
-static void TAG(render_triangles)( GLcontext *ctx,
+static void TAG(render_triangles)( struct gl_context *ctx,
                                   GLuint start,
                                   GLuint count,
                                   GLuint flags )
@@ -189,7 +190,7 @@ static void TAG(render_triangles)( GLcontext *ctx,
 
 
 
-static void TAG(render_tri_strip)( GLcontext *ctx,
+static void TAG(render_tri_strip)( struct gl_context *ctx,
                                   GLuint start,
                                   GLuint count,
                                   GLuint flags )
@@ -239,7 +240,7 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
 }
 
 
-static void TAG(render_tri_fan)( GLcontext *ctx,
+static void TAG(render_tri_fan)( struct gl_context *ctx,
                                 GLuint start,
                                 GLuint count,
                                 GLuint flags )
@@ -286,7 +287,7 @@ static void TAG(render_tri_fan)( GLcontext *ctx,
 }
 
 
-static void TAG(render_poly)( GLcontext *ctx,
+static void TAG(render_poly)( struct gl_context *ctx,
                              GLuint start,
                              GLuint count,
                              GLuint flags )
@@ -355,7 +356,7 @@ static void TAG(render_poly)( GLcontext *ctx,
    POSTFIX;
 }
 
-static void TAG(render_quads)( GLcontext *ctx,
+static void TAG(render_quads)( struct gl_context *ctx,
                               GLuint start,
                               GLuint count,
                               GLuint flags )
@@ -388,7 +389,7 @@ static void TAG(render_quads)( GLcontext *ctx,
    POSTFIX;
 }
 
-static void TAG(render_quad_strip)( GLcontext *ctx,
+static void TAG(render_quad_strip)( struct gl_context *ctx,
                                    GLuint start,
                                    GLuint count,
                                    GLuint flags )
@@ -436,7 +437,7 @@ static void TAG(render_quad_strip)( GLcontext *ctx,
    POSTFIX;
 }
 
-static void TAG(render_noop)( GLcontext *ctx,
+static void TAG(render_noop)( struct gl_context *ctx,
                              GLuint start,
                              GLuint count,
                              GLuint flags )
@@ -444,7 +445,7 @@ static void TAG(render_noop)( GLcontext *ctx,
    (void)(ctx && start && count && flags);
 }
 
-RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
+RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(struct gl_context *,
                                                           GLuint,
                                                           GLuint,
                                                           GLuint) =