mesa: add index_size_shift = log2(index_size) into _mesa_index_buffer
[mesa.git] / src / mesa / tnl / t_vertex_sse.c
index 98058f3bdac4b19d0a47be32b78b99f0b14522e4..191a68d7e6df0cb2bb052c64d779fd6546529da9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003 Tungsten Graphics, inc.
+ * Copyright 2003 VMware, Inc.
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * 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 THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * VMWARE AND/OR THEIR 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.
  *
  * Authors:
- *    Keith Whitwell <keithw@tungstengraphics.com>
+ *    Keith Whitwell <keithw@vmware.com>
  */
 
+#include <stdio.h>
+
 #include "main/glheader.h"
 #include "main/context.h"
-#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;
@@ -590,7 +591,7 @@ static GLboolean build_vertex_emit( struct x86_program *p )
            break;
         case GL_UNSIGNED_SHORT:
         default:
-           printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE));
+           printf("unknown CHAN_TYPE %s\n", _mesa_enum_to_string(CHAN_TYPE));
            return GL_FALSE;
         }
         break;
@@ -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;   
@@ -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 */
 }