Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / mesa / drivers / dri / unichrome / via_render.c
index 201235410db0a2643908c346c157d276e2c1def2..10e2b4eaddfd43e598291716c3b496c219dfdadf 100644 (file)
  * dma buffers.  Use strip/fan hardware acceleration where possible.
  *
  */
-#include "glheader.h"
-#include "context.h"
-#include "macros.h"
-#include "mtypes.h"
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/mtypes.h"
+
+#include "math/m_xform.h"
 
 #include "tnl/t_context.h"
 
 #include "via_context.h"
 #include "via_tris.h"
-#include "via_state.h"
 #include "via_ioctl.h"
 
 /*
@@ -85,7 +86,7 @@
 /**********************************************************************/
 /*                          Fast Render pipeline stage                */
 /**********************************************************************/
-static GLboolean via_run_fastrender(GLcontext *ctx,
+static GLboolean via_run_fastrender(struct gl_context *ctx,
                                     struct tnl_pipeline_stage *stage)
 {
     struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -106,7 +107,7 @@ static GLboolean via_run_fastrender(GLcontext *ctx,
     tnl->clipspace.new_inputs |= VERT_BIT_POS;
 
     for (i = 0; i < VB->PrimitiveCount; ++i) {
-        GLuint mode = VB->Primitive[i].mode;
+        GLuint mode = _tnl_translate_prim(&VB->Primitive[i]);
         GLuint start = VB->Primitive[i].start;
         GLuint length = VB->Primitive[i].count;
         if (length)
@@ -118,33 +119,13 @@ static GLboolean via_run_fastrender(GLcontext *ctx,
     return GL_FALSE;            /* finished the pipe */
 }
 
-
-static void via_check_fastrender(GLcontext *ctx, 
-                                struct tnl_pipeline_stage *stage)
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-
-static void fastdtr(struct tnl_pipeline_stage *stage)
-{
-    (void)stage;
-}
-
-
 const struct tnl_pipeline_stage _via_fastrender_stage =
 {
     "via fast 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 */
-    fastdtr,                     /* destructor */
-    via_check_fastrender,        /* check - initially set to alloc data */
+    NULL,
+    NULL,
+    NULL,
+    NULL,
     via_run_fastrender           /* run */
 };