i965/vec4: Add the ability for attributes to be interleaved.
[mesa.git] / src / mesa / tnl / t_vertex_sse.c
index 7a255d680a10efc741c27f6cea61f66c897de6b7..e0141c36fac8f7950c58ba93b09c3444b4b6421e 100644 (file)
@@ -30,6 +30,7 @@
 #include "main/colormac.h"
 #include "main/simple_list.h"
 #include "main/enums.h"
+#include "swrast/s_chan.h"
 #include "t_context.h"
 #include "t_vertex.h"
 
@@ -54,7 +55,7 @@
 struct x86_program {
    struct x86_function func;
 
-   GLcontext *ctx;
+   struct gl_context *ctx;
    GLboolean inputs_safe;
    GLboolean outputs_safe;
    GLboolean have_sse2;
@@ -342,7 +343,7 @@ static void update_src_ptr( struct x86_program *p,
  */
 static GLboolean build_vertex_emit( struct x86_program *p )
 {
-   GLcontext *ctx = p->ctx;
+   struct gl_context *ctx = p->ctx;
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
    GLuint j = 0;
@@ -496,7 +497,7 @@ static GLboolean build_vertex_emit( struct x86_program *p )
            update_src_ptr(p, srcECX, vtxESI, a);
         }
         else {
-           _mesa_printf("Can't emit 1ub %x %x %d\n", a->vertoffset, a[-1].vertoffset, a[-1].vertattrsize );
+           printf("Can't emit 1ub %x %x %d\n", a->vertoffset, a[-1].vertoffset, a[-1].vertattrsize );
            return GL_FALSE;
         }
         break;
@@ -542,7 +543,7 @@ static GLboolean build_vertex_emit( struct x86_program *p )
            j++;                /* NOTE: two attrs consumed */
         }
         else {
-           _mesa_printf("Can't emit 3ub\n");
+           printf("Can't emit 3ub\n");
            return GL_FALSE;    /* add this later */
         }
         break;
@@ -590,12 +591,12 @@ static GLboolean build_vertex_emit( struct x86_program *p )
            break;
         case GL_UNSIGNED_SHORT:
         default:
-           _mesa_printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE));
+           printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE));
            return GL_FALSE;
         }
         break;
       default:
-        _mesa_printf("unknown a[%d].format %d\n", j, a->format);
+        printf("unknown a[%d].format %d\n", j, a->format);
         return GL_FALSE;       /* catch any new opcodes */
       }
       
@@ -638,7 +639,7 @@ static GLboolean build_vertex_emit( struct x86_program *p )
 
 
 
-void _tnl_generate_sse_emit( GLcontext *ctx )
+void _tnl_generate_sse_emit( struct gl_context *ctx )
 {
    struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
    struct x86_program p;   
@@ -648,7 +649,7 @@ void _tnl_generate_sse_emit( GLcontext *ctx )
       return;
    }
 
-   _mesa_memset(&p, 0, sizeof(p));
+   memset(&p, 0, sizeof(p));
 
    p.ctx = ctx;
    p.inputs_safe = 0;          /* for now */
@@ -676,7 +677,7 @@ void _tnl_generate_sse_emit( GLcontext *ctx )
 
 #else
 
-void _tnl_generate_sse_emit( GLcontext *ctx )
+void _tnl_generate_sse_emit( struct gl_context *ctx )
 {
    /* Dummy version for when USE_SSE_ASM not defined */
 }