Fixed MAXFIFO_S4. Removed WAIT_IDLE_EMPTY from savage_BCI_swap which resulted
[mesa.git] / src / mesa / tnl / t_save_loopback.c
index 4e299f6b6319d4ba69991e56b69e9558c0408495..088b73609a6d1372ea63c8771fdf57affd7c5baa 100644 (file)
@@ -27,6 +27,7 @@
  *    Keith Whitwell <keith@tungstengraphics.com>
  */
 
+#include "glheader.h"
 #include "context.h"
 #include "enums.h"
 #include "glapi.h"
@@ -168,7 +169,7 @@ static void index_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
 
 static void edgeflag_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
 {
-   ctx->Exec->EdgeFlag((v[0] == 1.0));
+   ctx->Exec->EdgeFlag((GLboolean)(v[0] == 1.0));
 }
 
 struct loopback_attr {
@@ -182,8 +183,8 @@ struct loopback_attr {
  * precalculated wrapping is wrong.
  */
 static void loopback_prim( GLcontext *ctx,
-                          struct tnl_vertex_list *list, GLuint i,
-                          struct loopback_attr *la, GLuint nr )
+                          const struct tnl_vertex_list *list, GLuint i,
+                          const struct loopback_attr *la, GLuint nr )
 {
    struct tnl_prim *prim = &list->prim[i];
    GLint begin = prim->start;
@@ -194,7 +195,8 @@ static void loopback_prim( GLcontext *ctx,
 
    if (prim->mode & PRIM_BEGIN) {
       glBegin( prim->mode & PRIM_MODE_MASK );
-   } else {
+   }
+   else {
       assert(i == 0);
       assert(begin == 0);
       begin += list->wrap_count;
@@ -230,8 +232,8 @@ static void loopback_prim( GLcontext *ctx,
  * primitives.
  */
 static void loopback_weak_prim( GLcontext *ctx,
-                               struct tnl_vertex_list *list, GLuint i,
-                               struct loopback_attr *la, GLuint nr )
+                               const struct tnl_vertex_list *list, GLuint i,
+                               const struct loopback_attr *la, GLuint nr )
 {
    if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) 
       loopback_prim( ctx, list, i, la, nr );
@@ -254,7 +256,8 @@ static void loopback_weak_prim( GLcontext *ctx,
 
 
 
-void _tnl_loopback_vertex_list( GLcontext *ctx, struct tnl_vertex_list *list )
+void _tnl_loopback_vertex_list( GLcontext *ctx,
+                                const struct tnl_vertex_list *list )
 {
    struct loopback_attr la[_TNL_ATTRIB_MAX];
    GLuint i, nr = 0;