i965: Change the SF unit from state caching to state streaming.
[mesa.git] / src / mesa / drivers / dri / i810 / i810render.c
index bb8db8dbcddcfb559c380145bee956fc8a153fdd..45f0954bbe26369b158ae5e5ba06953b27c47159 100644 (file)
  * dma buffers.  Use strip/fan hardware acceleration where possible.
  *
  */
-#include "glheader.h"
-#include "context.h"
-#include "macros.h"
-#include "imports.h"
-#include "mtypes.h"
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
+
+#include "math/m_xform.h"
 
 #include "tnl/t_context.h"
 
@@ -44,7 +46,6 @@
 
 #include "i810context.h"
 #include "i810tris.h"
-#include "i810state.h"
 #include "i810vb.h"
 #include "i810ioctl.h"
 
@@ -123,7 +124,7 @@ static const GLenum reduced_prim[GL_POLYGON+1] = {
 /**********************************************************************/
 
 
-static GLboolean i810_run_render( GLcontext *ctx,
+static GLboolean i810_run_render( struct gl_context *ctx,
                                  struct tnl_pipeline_stage *stage )
 {
    i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -144,7 +145,7 @@ static GLboolean i810_run_render( GLcontext *ctx,
 
    for (i = 0 ; i < VB->PrimitiveCount ; i++)
    {
-      GLuint prim = VB->Primitive[i].mode;
+      GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
       GLuint start = VB->Primitive[i].start;
       GLuint length = VB->Primitive[i].count;
 
@@ -161,31 +162,13 @@ static GLboolean i810_run_render( GLcontext *ctx,
 }
 
 
-static void i810_check_render( GLcontext *ctx, 
-                              struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
 
 const struct tnl_pipeline_stage _i810_render_stage =
 {
    "i810 render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, 0,                       /* changed_inputs, private */
-   dtr,                                /* destructor */
-   i810_check_render,          /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    i810_run_render             /* run */
 };